OGeek|极客世界-中国程序员成长平台

标题: ios - xcodebuild 存档未通过 ITMS 验证 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 15:58
标题: ios - xcodebuild 存档未通过 ITMS 验证

我们的应用有一个 watchkit 应用 + 扩展。来自 XCode IDE 的文件总是通过 iTunes 商店验证。但是,通过 xcodebuild 命令工具(Xcode 6.4;构建版本 6E35b)生成的存档无法通过此验证,并出现以下错误:

ERROR ITMS-90163: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: 'aps-environment' in 'ayload/TheDodo.app/PlugIns/DodoExtension.appex/DodoExtension'."

ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: '##########.###.##########.######' for the key 'application-identifier' in 'ayload/TheDodo.app/PlugIns/TheDodoWatchKitExtension.appex/TheDodoWatchKitExtension'"

ERROR ITMS-90163: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: 'aps-environment' in 'ayload/TheDodo.app/PlugIns/TheDodoWatchKitExtension.appex/TheDodoWatchKitExtension'."

ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value '##########.###.##########.######' for key 'application-identifier' in 'ayload/TheDodo.app/PlugIns/TheDodoWatchKitExtension.appex/TheDodoWatchKitExtension' is not supported. This value should be a string starting with your TEAMID, followed by a dot '.', followed by the bundle identifier."

ERROR ITMS-90163: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: 'aps-environment' in 'ayload/TheDodo.app/PlugIns/TheDodoWatchKitExtension.appex/TheDodoWatchKitApp.app/TheDodoWatchKitApp'."

ERROR ITMS-90163: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: 'com.apple.security.application-groups' in 'ayload/TheDodo.app/PlugIns/TheDodoWatchKitExtension.appex/TheDodoWatchKitApp.app/TheDodoWatchKitApp'."

要归档和导出的 Makefile 如下所示:

/usr/bin/xcodebuild -verbose -verbose -workspace 'rebelmouse.xcworkspace'  -scheme TheDodo -configuration "App Store" -sdk 'iphoneos' -archivePath /tmp/TheDodo.xcarchive -derivedDataPath /tmp/ROJECT.Ji9vwyH0 APPLICATION_BUILD_VERSION=2456 archive

/usr/bin/xcodebuild -exportArchive -exportFormat ipa -archivePath /tmp/TheDodo.xcarchive -exportPath /tmp/TheDodo.ipa -exportWithOriginalSigningIdentity

非常感谢任何建议/帮助。提前致谢。



Best Answer-推荐答案


回答这个问题以防其他人被困在同一条船上。

在 Xcode 7.0 中,xcodebuild 获得了一个新的命令行选项来导出存档,即 exportOptionsPlist ,这需要配置存档的 plist 的完整路径。

您不再需要设置 -exportFormat

xcodebuild --help 列出 plist 的详细信息。

对于企业构建,我使用这个 plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>method</key>
    <string>enterprise</string>
</dict>
</plist>

对于 App Store 版本,将 enterprise 替换为 app-store

关于ios - xcodebuild 存档未通过 ITMS 验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31996464/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4