当我尝试导出应用程序时,我使用IBM MobileFirst 8支持的Hybrid Cordova 6.5应用程序出现以下错误:
2017-02-24 21:54:40 +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-02-24 21:54:40 +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=}
2017-02-24 22:05:30 +0000 [MT] Beginning distribution assistant for archive: App Name, task: Validate
2017-02-24 22:05:30 +0000 [MT] Automatically selecting the only availaable distribution method <IDEDistributionMethodiOSAppStoreValidation: 0x7f8ca08aefb0>
2017-02-24 22:05:31 +0000 [MT] [OPTIONAL] Didn't find archived user entitlements for <DVTFilePath:0x7f8c9f9ad2b0:'/Users/ptiwari/Library/Developer/Xcode/Archives/2017-02-24/App Name 2-24-17, 4.05 PM.xcarchive/Products/Applications/App Name.app/Frameworks/IBMMobileFirstPlatformFoundation.framework'>: Error Domain=NSCocoaErrorDomain Code=4 "Item at "/Users/ptiwari/Library/Developer/Xcode/Archives/2017-02-24/App Name 2-24-17, 4.05 PM.xcarchive/Products/Applications/App Name.app/Frameworks/IBMMobileFirstPlatformFoundation.framework" did not contain a "archived-expanded-entitlements.xcent" resource." UserInfo={NSLocalizedDescription=Item at "/Users/ptiwari/Library/Developer/Xcode/Archives/2017-02-24/App Name 2-24-17, 4.05 PM.xcarchive/Products/Applications/App Name.app/Frameworks/IBMMobileFirstPlatformFoundation.framework" did not contain a "archived-expanded-entitlements.xcent" resource.}
2017-02-24 22:05:31 +0000 [MT] [OPTIONAL] Didn't find archived user entitlements for <DVTFilePath:0x7f8ca0a58e60:'/Users/ptiwari/Library/Developer/Xcode/Archives/2017-02-24/App Name 2-24-17, 4.05 PM.xcarchive/Products/Applications/App Name.app/Frameworks/IBMMobileFirstPlatformFoundationPush.framework'>: Error Domain=NSCocoaErrorDomain Code=4 "Item at "/Users/ptiwari/Library/Developer/Xcode/Archives/2017-02-24/App Name 2-24-17, 4.05 PM.xcarchive/Products/Applications/App Name.app/Frameworks/IBMMobileFirstPlatformFoundationPush.framework" did not contain a "archived-expanded-entitlements.xcent" resource." UserInfo={NSLocalizedDescription=Item at "/Users/ptiwari/Library/Developer/Xcode/Archives/2017-02-24/App Name 2-24-17, 4.05 PM.xcarchive/Products/Applications/App Name.app/Frameworks/IBMMobileFirstPlatformFoundationPush.framework" did not contain a "archived-expanded-entitlements.xcent" resource.}
2017-02-24 22:05:35 +0000 [MT] Canceled distribution assistant
答案 0 :(得分:4)
我很确定这与以下内容有关:https://mobilefirstplatform.ibmcloud.com/blog/2016/10/17/prepare-ios-apps-for-app-store-submission/
将以下脚本粘贴到“运行脚本”选项卡
中APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
EXTRACTED_ARCHS=()
for ARCH in $ARCHS
do
echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done
echo "Merging extracted architectures: ${ARCHS}"
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
rm "${EXTRACTED_ARCHS[@]}"
echo "Replacing original executable with thinned version"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"
done
答案 1 :(得分:0)
我删除了所有的cordova插件并再次添加回来。然后我删除了ios平台并再次添加。然后我打开了xcode并尝试再次导出我的应用程序,它已成功导出。
答案 2 :(得分:-1)
您使用的是任何第三方SDK吗?设置此。