I am trying to publish an iOS swift app. I use Xcode 9.4.1. The app contains a share extension that does HTTP uploads of files. The share extension uses SwiftHTTP. Validation of the app fails with the following errors:
Invalid Bundle. The bundle at 'FooBar.app/PlugIns/FileUploadextension.appex' contains disallowed nested bundles.
An unknown error occurred.
Invalid Bundle. The bundle at 'FooBar.app/PlugIns/FileUploadextension.appex' contains disallowed file 'Frameworks'.
An unknown error occurred.
I checked other answers on StackOverfllow about the error messages.
I disabled embedding of swift libraries for the extension:
Embedding is enabled for the main app:
There is a frameworks copy step for the extension:
I tried adding this script to the extension build phase:
cd "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/"
if [[ -d "Frameworks" ]]; then
rm -fr Frameworks
fi
With this script in place the app passes validation but the extension does not work. It fails with:
Hub connection error Error Domain=NSCocoaErrorDomain
Code=4097 "connection to service named
xxx.FooBar.FileUploadextension"
UserInfo={NSDebugDescription=connection to service named
When I open my my FileUploadextension.appex in Finder I have a Frameworks directory with SwiftHTTP.framework in it. How can I fix the problem to pass the validation and have the extension working?