Validation Error: Invalid Bundle. The bundle at ... contains disallowed file 'Frameworks'
Solution 1:
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
Solution 2:
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