2015-08-13 33 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

好的。謝謝 –