Linking to a Embedded Framework from a app extension Linking to a Embedded Framework from a app extension xcode xcode

Linking to a Embedded Framework from a app extension


If your goal is to share code in between App and Extension, you do not need to create a Framework. You can add the source file to different targets:

To use a framework, set "Require Only App-Extension-Safe API" to YES in the framework target build settings. After doing so, there are no warnings in your sample project.


Opinion based addition: As you do not want to share code in between projects, using a frameworks does not make sense to me here. If you want to share the code in between projects and thus decide to use a framework, I recommend to make it an independent Xcode project under own version control.