我正在尝试发布iOS swift应用程序。我使用Xcode 9.4.1。该应用程序包含一个共享扩展,用于执行HTTP上载文件。共享扩展使用SwiftHTTP。应用验证失败,并出现以下错误:
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.
我在StackOverflow上检查了有关错误消息的其他答案。
我尝试将this script添加到扩展构建阶段:
cd "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/"
if [[ -d "Frameworks" ]]; then
rm -fr Frameworks
fi
使用此脚本,应用程序将通过验证,但扩展程序不起作用。它失败了:
Hub connection error Error Domain=NSCocoaErrorDomain
Code=4097 "connection to service named
xxx.FooBar.FileUploadextension"
UserInfo={NSDebugDescription=connection to service named
当我在Finder中打开我的FileUpload extension.apex时,我有一个带有SwiftHTTP.framework的Frameworks目录。如何解决问题以通过验证并使扩展工作?