Ios xcodebuild归档无法通过ITMS验证

Ios xcodebuild归档无法通过ITMS验证,ios,xcode,xcode6,xcodebuild,code-signing-entitlements,Ios,Xcode,Xcode6,Xcodebuild,Code Signing Entitlements,我们的应用程序有一个watchkit应用程序+扩展。来自XCode IDE的存档始终通过iTunes存储验证。但是,通过Xcode构建命令工具(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 conta

我们的应用程序有一个watchkit应用程序+扩展。来自XCode IDE的存档始终通过iTunes存储验证。但是,通过Xcode构建命令工具(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 'Payload/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 'Payload/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 'Payload/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 'Payload/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 'Payload/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 'Payload/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

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

告诉xcodebuild要使用的配置文件的名称,而不是让它“自动搜索”:

 xcodebuild -exportArchive -exportFormat ipa -archivePath "FOLD/FILE.xcarchive" -exportPath "FOLD/FILE.ipa" -exportProvisioningProfile "NAME" > /dev/null || exit 1

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

在Xcode 7.0中,xcodebuild获得了一个新的命令行选项来导出归档文件,即导出选项plist,这将获取配置归档文件的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>

方法
企业

对于应用商店版本,请将
企业版
替换为
应用商店

,遗憾的是,如果应用程序具有Watchkit扩展,这将不起作用,因为两者使用不同的配置文件。啊,好的。谢谢,你找到解决办法了吗?我也遇到了同样的问题……到目前为止还没有解决方案,希望XCode 7能够解决这个问题。在苹果论坛上问了同样的问题,得到了这个有趣的回答。不幸的是,它没有带来一个解决方案。谢谢