【发布时间】:2017-10-30 05:10:19
【问题描述】:
我有一个 IBM MobileFirst 8 cordova 项目,我最近添加了插件“cordova-plugin-mfp-push”。
当我存档项目并尝试导出构建(ipa 文件)时,我收到以下错误
Found an unexpected Mach-O header code: 0x72613c21
当我点击显示日志按钮时,我可以看到以下三个日志文件
IDEDistribution.critical.log
2017-05-29 20:30:43 +0000 [MT] Failed to generate distribution items with error: Error Domain=DVTMachOErrorDomain Code=0 "Found an unexpected Mach-O header code: 0x72613c21" UserInfo={NSLocalizedDescription=Found an unexpected Mach-O header code: 0x72613c21, NSLocalizedRecoverySuggestion=}
2017-05-29 20:30:43 +0000 [MT] Presenting: Error Domain=DVTMachOErrorDomain Code=0 "Found an unexpected Mach-O header code: 0x72613c21" UserInfo={NSLocalizedDescription=Found an unexpected Mach-O header code: 0x72613c21, NSLocalizedRecoverySuggestion=}
IDEDistribution.standard.log
2017-05-29 20:30:39 +0000 [MT] Beginning distribution assistant for archive: my_custom_app, task: Export
2017-05-29 20:30:41 +0000 [MT] Proceeding to distribution step IDEDistributionSigningAssetsStepViewController, context: <IDEDistributionContext: 0x7fafaadba400; archive(resolved)='<IDEArchive: 0x7fafa97005d0>', distributionTask(resolved)='2', distributionMethod(resolved)='<IDEDistributionMethodAdHoc: 0x7fafc584f070>', teamID(resolved)='(null)'>
Chain (2, self inclusive):
<IDEDistributionContext: 0x7fafaadba400; archive = '(null)', distributionMethod='(null)', teamID='(null)'>
<IDEDistributionContext: 0x7fafa96425c0; archive = '<IDEArchive: 0x7fafa97005d0>', distributionMethod='<IDEDistributionMethodAdHoc: 0x7fafc584f070>', teamID='(null)'>
</IDEDistributionContext: 0x7fafaadba400>
2017-05-29 20:30:43 +0000 [MT] [OPTIONAL] Didn't find archived user entitlements for <DVTFilePath:0x7fafaab22d80:'/Users/user1/Library/Developer/Xcode/Archives/2017-05-29/my_custom_app 5-29-17, 21.29.xcarchive/Products/Applications/my_custom_app.app/Frameworks/IBMMobileFirstPlatformFoundationPush.framework'>: Error Domain=NSCocoaErrorDomain Code=4 "Item at "/Users/user1/Library/Developer/Xcode/Archives/2017-05-29/my_custom_app 5-29-17, 21.29.xcarchive/Products/Applications/my_custom_app.app/Frameworks/IBMMobileFirstPlatformFoundationPush.framework" did not contain a "archived-expanded-entitlements.xcent" resource." UserInfo={NSLocalizedDescription=Item at "/Users/user1/Library/Developer/Xcode/Archives/2017-05-29/my_custom_app 5-29-17, 21.29.xcarchive/Products/Applications/my_custom_app.app/Frameworks/IBMMobileFirstPlatformFoundationPush.framework" did not contain a "archived-expanded-entitlements.xcent" resource.}
2017-05-29 20:36:45 +0000 [MT] Canceled distribution assistant
IDEDistribution.verbose.log
2017-05-29 20:30:39 +0000 [MT] Available distribution methods: (
"<IDEDistributionMethodiOSAppStoreExport: 0x7fafc5839310>",
"<IDEDistributionMethodAdHoc: 0x7fafc584f070>",
"<IDEDistributionMethodEnterprise: 0x7fafc582a930>",
"<IDEDistributionMethodDevelopmentSigned: 0x7fafc39cdee0>"
)
2017-05-29 20:30:43 +0000 [MT] IDEDistributionItem init <DVTFilePath:0x7fafaab22d80:'/Users/user1/Library/Developer/Xcode/Archives/2017-05-29/my_custom_app 5-29-17, 21.29.xcarchive/Products/Applications/my_custom_app.app/Frameworks/IBMMobileFirstPlatformFoundationPush.framework'>
我尝试了在Found an unexpected Mach-O header code: 0x72613c21 in Xcode 7 找到的建议,并尝试添加https://mobilefirstplatform.ibmcloud.com/blog/2016/10/17/prepare-ios-apps-for-app-store-submission/ 中描述的脚本,但它无助于解决问题。
我注意到,当我删除插件 cordova-plugin-mfp-push 时,ipa 导出工作,当我再次添加它时,它再次失败并出现同样的错误。
这是我使用的插件列表
$ cordova plugin ls
cordova-plugin-android-permissions 0.10.0 "Permissions"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-custom-calendar 0.0.1 "Calendar"
cordova-plugin-custom-uuid-creator 0.0.1 "UUID Creator"
cordova-plugin-device 1.1.5 "Device"
cordova-plugin-dialogs 1.3.2 "Notification"
cordova-plugin-file 4.3.2 "File"
cordova-plugin-file-transfer 1.6.2 "File Transfer"
cordova-plugin-geolocation 2.4.2 "Geolocation"
cordova-plugin-globalization 1.0.6 "Globalization"
cordova-plugin-mfp 8.0.2017033009 "IBM MobileFirst Platform Foundation"
cordova-plugin-mfp-push 8.0.2017012410 "IBM MobileFirst Platform Foundation - Push Notifications"
cordova-plugin-okhttp 2.0.0 "OkHttp"
cordova-plugin-splashscreen 4.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3-dev "Whitelist"
有什么帮助吗?
【问题讨论】:
-
您正在尝试使用哪个版本的 xcode 构建应用程序?
-
我使用的是 Xcode 8.2.1
-
您是否尝试过以下解决方案?
-
@PrerakTiwari 谢谢,效果很好
标签: ios cordova ibm-mobilefirst