matthewpalmer / Locksmith

A powerful, protocol-oriented library for working with the keychain in Swift.
MIT License
2.92k stars 268 forks source link

Fix warning when linking against Locksmith from an app extension #127

Closed brow closed 8 years ago

brow commented 8 years ago

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.

brow commented 8 years ago

(This is explained in more detail in Using an Embedded Framework to Share Code.)

matthewpalmer commented 8 years ago

Thanks! 😄