Turns out the error is related to using Swift (both the app and the extension make use of Swift).
For the app, I had to set:
Embedded Content Contains Swift Code: YES
and for the extension:
Embedded Content Contains Swift Code: NO
Xcode 8 and 9
Looks like this has been renamed to Always Embed Swift Standard Libraries
in Xcode 8 and 9. So, for the app:
Always Embed Swift Standard Libraries: YES
and for the extension:
Always Embed Swift Standard Libraries: NO
The only solution that worked for me was to add this Run Script to the App Extension target:
cd "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/"
if [[ -d "Frameworks" ]]; then
rm -fr Frameworks
fi
Source: https://github.com/CocoaPods/CocoaPods/issues/4203
So 3 steps to fix this from build settings
Embedded Content Contains Swift Code: YES
Embedded Content Contains Swift Code: NO
@executable_path/../../Frameworks
In my case, I just upgraded to CocoaPods 1.0.1 and this appears to be a new bug.
The Pod update adds a run script to my Extension's target which creates the Frameworks folder. I found it as I was about to add @Roman's run script to remove it.
Solution was to delete this script from my extension's build phase. Here is the one which needed to go...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With