Unless a framework has been built with the flag APPLICATION_EXTENSION_API_ONLY, Xcode emits a warning when linking against that framework from an app extension target:
linking against dylib not safe for use in application extensions
By adding the APPLICATION_EXTENSION_API_ONLY flag to Locksmith's build configs, we're asking the compiler to verify at framework compile time that the framework does not touch APIs that are unavailable to app extensions, such as UIApplication.sharedApplication.
I tested this change by building each of the framework targets.
Unless a framework has been built with the flag
APPLICATION_EXTENSION_API_ONLY
, Xcode emits a warning when linking against that framework from an app extension target:By adding the
APPLICATION_EXTENSION_API_ONLY
flag to Locksmith's build configs, we're asking the compiler to verify at framework compile time that the framework does not touch APIs that are unavailable to app extensions, such asUIApplication.sharedApplication
.I tested this change by building each of the framework targets.