Xcode 12.4 - macOS Big Sur - compiling for iOS < 13 - CryptoKit error

If you’re getting the following error on app launch when trying to include iOS 12 devices for instance:

dyld: Library not loaded: /System/Library/Frameworks/CryptoKit.framework/CryptoKit

Xcode is not properly adding CryptoKit to the linked frameworks list. To solve this issue, you must manually add the -weak_framework CryptoKit flag in your app’s target.

Ref: Conditionally use CryptoKit - #13 by bjhomer - Using Swift - Swift Forums

1 Like