我有一个使用ObjC动态框架的Swift项目,框架必须与我的项目链接并嵌入到我的项目中.项目在设备中运行正常,当提交到App Store时,验证期间发生错误:
Found an unexpected Mach-O header code: 0x72613c21
以下是验证日志:
2015-10-12 02:32:33 +0000 [MT] Beginning distribution assistant for archive: MusicFans, task: Validate
2015-10-12 02:32:33 +0000 [MT] Automatically selecting the only availaable distribution method <IDEDistributionMethodiOSAppStoreValidation: 0x7f851c1d96c0>
2015-10-12 02:32:34 +0000 [MT] [OPTIONAL] Didn't find archived user entitlements for <DVTFilePath:0x7f851b42db10:'/Users/panzhansheng/Library/Developer/Xcode/Archives/2015-10-11/MusicFans 11-10-15 ??8.29.xcarchive/Products/Applications/MusicFans.app/Frameworks/libswiftDispatch.dylib'>: Error Domain=NSCocoaErrorDomain Code=4 "Item at "/Users/panzhansheng/Library/Developer/Xcode/Archives/2015-10-11/MusicFans 11-10-15 ??8.29.xcarchive/Products/Applications/MusicFans.app/Frameworks/libswiftDispatch.dylib" did not contain a "archived-expanded-entitlements.xcent" resource." UserInfo={NSLocalizedDescription=Item at "/Users/panzhansheng/Library/Developer/Xcode/Archives/2015-10-11/MusicFans 11-10-15 ??8.29.xcarchive/Products/Applications/MusicFans.app/Frameworks/libswiftDispatch.dylib" did not contain a "archived-expanded-entitlements.xcent" resource.}
2015-10-12 02:32:34 +0000 [MT] [OPTIONAL] Didn't …Run Code Online (Sandbox Code Playgroud) 在Swift 3中,创建了一个DispatchQueue实例:
DispatchQueue(label: String,
qos: DispatchQoS,
attributes: DispatchQueue.Attributes,
autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency,
target: DispatchQueue?)
Run Code Online (Sandbox Code Playgroud)
我看到来自StackOverFlow的示例代码,它可以是nil,.global()或.main,这个target参数的含义是什么?
我猜.main意味着队列将在主线程上运行,但是.nil或.global()是什么?
我的Xcode 7 beta3项目包含一些由Xcode 6编译的框架,这些框架通过"Build Phase"选项卡中的Embeded Frameworks选项导入到我的项目中.因为这些框架不支持bitcode,所以"Enable Bitcode"选项变为NO,编译项目时,发生Bitcode_strip错误:
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip /Users/panzhansheng/Desktop/MusicFans_2.0.4_xcode7_autoplay/MusicFans/Frameworks/FLAC.framework/FLAC -r -o /用户/ panzhansheng/Library/Developer/Xcode/DerivedData/MusicFans-bxutvotiungdbwfsxloykffnqoqs/Build/Products/Debug-iphoneos/MusicFans.app/FLAC.framework/FLAC /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault. xctoolchain/usr/bin/bitcode_strip:输入文件必须是链接的Mach-O文件而不是存档:/Users/panzhansheng/Desktop/MusicFans_2.0.4_xcode7_autoplay/MusicFans/Frameworks/FLAC.framework/FLAC(对于体系结构i386)错误: bitcode_strip /Users/panzhansheng/Desktop/MusicFans_2.0.4_xcode7_autoplay/MusicFans/Frameworks/FLAC.framework/FLAC:/ Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip退出1
我发现当Xcode将我的框架复制到我的App包并尝试从框架中删除bitcode时发生了错误,但是这些框架是由Xcode早期版本编译的,并且根本不包括bitcode.如何解决这个问题?谢谢!
bitcode ×1
dispatch ×1
dynamic ×1
frameworks ×1
queue ×1
store ×1
swift ×1
validation ×1
xcode ×1