Skip to content

Conversation

@vizllx
Copy link

@vizllx vizllx commented May 27, 2023

Description:
With the release of iOS 16, Apple has introduced native support for the CommonCrypto framework. As a result, we need to update our code to take advantage of this native support and simplify the conditional import statements.

In the existing code, we have the following conditional import statements:

#if canImport(CommonCrypto)
    import CommonCrypto
#else
    import CCommonCrypto
#endif

To align with iOS 16's native support for CommonCrypto, we can now directly import the framework without the need for conditional checks. This will improve the code's clarity and remove unnecessary complexity.

import CommonCrypto

It's important to note that while we are updating the code to leverage native support in iOS 16, we should also ensure backward compatibility with earlier iOS versions if required. If necessary, we can use version checks or alternative implementations to maintain compatibility.

This update brings several benefits, including improved code readability, streamlined import statements, and taking advantage of Apple's recommended approach for cryptographic operations on iOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant