2015-08-13 31 views
2

我们的应用有一个watchkit app +扩展。来自XCode IDE的档案总是通过iTunes商店验证。然而档案馆通过xcodebuild联编命令工具生成(的Xcode 6.4;构建版本6E35b)失败,这个验证与以下错误:xcodebuild归档失败ITMS验证

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 

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

+0

您是否找到了解决方案?我坐在同一个问题... –

+0

到目前为止没有解决方案,希望XCode 7将解决这个问题。问苹果论坛同样的问题,并有这种反应 - https://forums.developer.apple.com/thread/14378 –

+0

有趣的答案。不幸的是,它没有提供解决方案。谢谢。 –

回答

2

的情况下,任何人被卡在同一条船上回答这个。

和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中建立替换app-store取代enterprise

0

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

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

不幸的是,如果应用程序具有Watchkit扩展名,则这不起作用 - 因为它们都使用不同的配置文件。 –

+0

好的。谢谢 –