我正在发布我的iOS应用程序以供审核,但给我错误:
无效的 swift 支持 - 文件 libswiftDarwin.dylib, libswiftsimd.dylib, libswiftFoundation.dylib, libswiftDispatch.dylib, libswiftObjectiveC.dylib, libswiftCoreAudio.dylib, libswiftCoreLocation.dylib, libswiftCoreFoundation.dylib, libswiftCoreGraphics.dylib, libswiftCoreData.dylib, libswiftUIKit.dylib, libswiftQuartzCore.dylib, libswiftCoreMedia.dylib, libswiftCoreImage.dylib, libswiftAVFoundation.dylib, libswiftCore.dylib, libswiftos.dylib, libswiftMapKit.dylib, libswiftMetal.dylib 不匹配/Payload/Project.IOS.app/Frameworks/libswiftDarwin.dylib,/payload/Project.IOS.app/Frameworks/libswiftsimd.dylib,/payload/Project.IOS.app/Frameworks/libswiftFoundation.dylib,/Payload/Project.IOS.app/Frameworks/libswiftDispatch.dylib,/Payload/Project.IOS.app/Frameworks/libswiftObjectiveC.dylib,/payload/Project.IOS.app/Frameworks/libswiftCoreAudio.dylib,/Payload/Project.IOS.app/Frameworks/libswiftCoreLocation.dylib,/Payload/Project.IOS.app/Frameworks/libswiftCoreFoundation.dylib,/Payload/Project.IOS.app/Frameworks/libswiftCoreGraphics.dylib,/Payload/Project.IOS.app/Frameworks/libswiftCoreData.dylib,/payload/project.IOS.app/Frameworks/libswiftUIKit.dylib,/Payload/Project.IOS.app/Frameworks/libswiftQuartzCore.dylib,/Payload/Project.IOS.app/Frameworks/libswiftCoreMedia.dylib,/Payload/Project.IOS.app/Frameworks/libswiftCoreImage.dylib,/payload/Project.IOS.app/Frameworks/libswiftAVFoundation.dylib,/payload/project.IOS.app/Frameworks/libswiftCore.dylib,/payload/Project.IOS.app/Frameworks/libswiftos.dylib,/Payload/Project.IOS.app/Frameworks/libswiftMapKit.dylib,/payload/Project.IOS.app/Frameworks/libswiftMetal.dylib.确保 文件正确,请重新生成应用,然后重新提交。不要申请 后处理到/Payload/Project.IOS.app/Frameworks/libswiftDarwin.dylib,/payload/Project.IOS.app/Frameworks/libswiftsimd.dylib,/payload/Project.IOS.app/Frameworks/libswiftFoundation.dylib,/Payload/Project.IOS.app/Frameworks/libswiftDispatch.dylib,/Payload/Project.IOS.app/Frameworks/libswiftObjectiveC.dylib,/payload/Project.IOS.app/Frameworks/libswiftCoreAudio.dylib,/Payload/Project.IOS.app/Frameworks/libswiftCoreLocation.dylib,/Payload/Project.IOS.app/Frameworks/libswiftCoreFoundation.dylib,/Payload/Project.IOS.app/Frameworks/libswiftCoreGraphics.dylib,/Payload/Project.IOS.app/Frameworks/libswiftCoreData.dylib,/payload/project.IOS.app/Frameworks/libswiftUIKit.dylib,/Payload/Project.IOS.app/Frameworks/libswiftQuartzCore.dylib,/Payload/Project.IOS.app/Frameworks/libswiftCoreMedia.dylib,/Payload/Project.IOS.app/Frameworks/libswiftCoreImage.dylib,/payload/Project.IOS.app/Frameworks/libswiftAVFoundation.dylib,/payload/project.IOS.app/Frameworks/libswiftCore.dylib,/payload/Project.IOS.app/Frameworks/libswiftos.dylib,/Payload/Project.IOS.app/Frameworks/libswiftMapKit.dylib,/payload/Project.IOS.app/Frameworks/libswiftMetal.dylib.
发布步骤:
-
构建存档
-
使用需求预配配置文件构建 IPA
-
解压缩我的。国际音标
-
使用脚本 (https://github.com/bq/ipa-packager(
-
从应用程序加载程序到应用程序连接的新 .ipa 上传
有人对如何做到这一点有任何想法吗? 感谢您的帮助!
如果 ipa-packager 脚本在其创建的"SwiftSupport"文件夹中包含错误版本的 Swift 文件,就会发生这种情况。这将导致 .ipa 中的 Swift 版本(由 VS 构建(与 SwiftSupport 文件夹中的 .dylib 文件不匹配(由脚本添加(。
解决方案是安装与目标 Swift 版本捆绑在一起的 XCode 版本,然后在运行 ipa-packager 脚本之前,使用如下所示的命令切换用于命令行工具的 XCode,以便将正确版本的 .dylib 文件放入 SwiftSupport 文件夹中:
sudo xcode-select -switch /Applications/Xcode5.1.1/Xcode.app