cordova-plugin-mfp-push导致“意外的Mach-O报头”错误 [英] cordova-plugin-mfp-push causing "unexpected Mach-O header" error

查看:1126
本文介绍了cordova-plugin-mfp-push导致“意外的Mach-O报头”错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个IBM MobileFirst 8 cordova项目,我最近添加了插件cordova-plugin-mfp-push。

I have an IBM MobileFirst 8 cordova project, and I recently added the plugin "cordova-plugin-mfp-push".

当我存档项目并尝试导出构建(ipa文件),我收到以下错误

When I archive the project and try to export the build (ipa file), I am getting the following error

Found an unexpected Mach-O header code: 0x72613c21

当我点击Show logs按钮时,我可以看到以下三个日志文件

When I click on Show logs button, I can see the following three log files

IDEDistribution.critical.log

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

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

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'>

我尝试了在在Xcode 7中发现了一个意外的Mach-O标头代码:0x72613c21 ,我试过添加中描述的脚本https://mobilefirstplatform.ibmcloud.com/blog/2016/10/17/prepare-ios-apps-for-app-store-submission/ 但它没有帮助解决问题。

I tried the suggestions that I found at Found an unexpected Mach-O header code: 0x72613c21 in Xcode 7, and I tried adding the script described at https://mobilefirstplatform.ibmcloud.com/blog/2016/10/17/prepare-ios-apps-for-app-store-submission/ but it haven't helped fixing the issue.

我注意到当我删除插件cordova-plugin-mfp-push时,ipa导出工作,当我再次添加它时,它会再次失败并出现相同的错误。

I noticed that when I remove the plugin cordova-plugin-mfp-push, the ipa export works, and when I add it again it fails again with the same error.

这是我使用的插件列表

$ 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中试试这个:

Try this out in your XCode:


  1. 选择你的项目并转到目标 - >构建阶段

  2. 展开嵌入框架

  3. 删除IBMMobileFirstPlatformFoundationPush.framew ork

  4. 然后转到常规

  5. 展开嵌入式二进制文件

  6. 删除IBMMobileFirstPlatformFoundationPush.framework

  7. 展开链接的框架和库

  8. 添加IBMMobileFirstPlatformFoundationPush.framework

  1. Select your project and go to Targets --> Build Phases
  2. Expand Embed Frameworks
  3. Remove IBMMobileFirstPlatformFoundationPush.framework
  4. Then go to General
  5. Expand Embedded Binaries
  6. Remove IBMMobileFirstPlatformFoundationPush.framework
  7. Expand Linked Frameworks and Libraries
  8. Add IBMMobileFirstPlatformFoundationPush.framework

I认为这样做可以解决您的问题。是的,不要忘记做这里提到的东西链接

I think doing this should resolve your issue. And yes don't forget to do the stuff mentioned in this link.

这篇关于cordova-plugin-mfp-push导致“意外的Mach-O报头”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆