2011-04-14 167 views
3

我目前正在嘗試使用自動化構建優化構建和發佈流程,該構建可在OSX服務器計算機上運行,​​運行OSX 10.6.7的MacMini安裝了xCode 4.0.1和iOS SDK 4.3(Apple的最新版本)。 我跟着Mike Nachbaur's出色的指導,感覺就像我幾乎在那裏,但我仍然有一個最後的障礙要克服。構建適用於iPhone的iOS應用程序適用於xCode,但不適用於命令行(xcodebuild)

所以。我們有我們的應用程序,它在打造精細:

一)我的筆記本電腦在Xcode

b)由與xcodebuild聯編

三)構建機器命令行我的筆記本電腦在Xcode

BUT它不起作用

d)使用xcodebuild從命令行生成機器。

這裏是控制檯輸出的末尾:

CreateUniversalBinary build/Distribution-iphoneos/CallControl.app/CallControl normal "armv6 armv7" 
    cd /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol 
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/Users/ainutveckling/Jenkins/tools/jdk6/bin:/usr/bin:/bin:/usr/sbin:/sbin" 
    /usr/bin/lipo -create /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol/build/Callcontrol.build/Distribution-iphoneos/CallControl.build/Objects-normal/armv6/CallControl /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol/build/Callcontrol.build/Distribution-iphoneos/CallControl.build/Objects-normal/armv7/CallControl -output /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol/build/Distribution-iphoneos/CallControl.app/CallControl 

GenerateDSYMFile build/Distribution-iphoneos/CallControl.app.dSYM build/Distribution-iphoneos/CallControl.app/CallControl 
    cd /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol 
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/Users/ainutveckling/Jenkins/tools/jdk6/bin:/usr/bin:/bin:/usr/sbin:/sbin" 
    /Developer/usr/bin/dsymutil /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol/build/Distribution-iphoneos/CallControl.app/CallControl -o /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol/build/Distribution-iphoneos/CallControl.app.dSYM 
ProcessProductPackaging "/Users/ainutveckling/Library/MobileDevice/Provisioning Profiles/F792F2E5-45DB-43C7-969C-6012C59BF778.mobileprovision" build/Distribution-iphoneos/CallControl.app/embedded.mobileprovision 
    cd /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol 
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/Users/ainutveckling/Jenkins/tools/jdk6/bin:/usr/bin:/bin:/usr/sbin:/sbin" 
    <com.apple.tools.product-pkg-utility> "/Users/ainutveckling/Library/MobileDevice/Provisioning Profiles/F792F2E5-45DB-43C7-969C-6012C59BF778.mobileprovision" -o /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol/build/Distribution-iphoneos/CallControl.app/embedded.mobileprovision 

** BUILD FAILED ** 

+ failed build 
+ echo 'Failed: build' 
Failed: build 
+ exit 1 
Notifying upstream projects of job completion 
Finished: FAILURE 

在我的機器,它看起來幾乎一樣:

GenerateDSYMFile build/Distribution-iphoneos/CallControl.app.dSYM build/Distribution-iphoneos/CallControl.app/CallControl 
    cd /Users/anders/Utveckling/CallControl/iphone/totala_samtalslistan/Callcontrol 
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/anders/Utveckling/android-sdk-mac_x86/tools:/Users/anders/Utveckling/android-sdk-mac_x86/platform-tools:" 
    /Developer/usr/bin/dsymutil /Users/anders/Utveckling/CallControl/iphone/totala_samtalslistan/Callcontrol/build/Distribution-iphoneos/CallControl.app/CallControl -o /Users/anders/Utveckling/CallControl/iphone/totala_samtalslistan/Callcontrol/build/Distribution-iphoneos/CallControl.app.dSYM 

ProcessProductPackaging "/Users/anders/Library/MobileDevice/Provisioning Profiles/F792F2E5-45DB-43C7-969C-6012C59BF778.mobileprovision" build/Distribution-iphoneos/CallControl.app/embedded.mobileprovision 
    cd /Users/anders/Utveckling/CallControl/iphone/totala_samtalslistan/Callcontrol 
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/anders/Utveckling/android-sdk-mac_x86/tools:/Users/anders/Utveckling/android-sdk-mac_x86/platform-tools:" 
    <com.apple.tools.product-pkg-utility> "/Users/anders/Library/MobileDevice/Provisioning Profiles/F792F2E5-45DB-43C7-969C-6012C59BF778.mobileprovision" -o /Users/anders/Utveckling/CallControl/iphone/totala_samtalslistan/Callcontrol/build/Distribution-iphoneos/CallControl.app/embedded.mobileprovision 

** BUILD SUCCEEDED ** 

但成功...... 如果我開始沒關係直接從構建機器上的命令行構建,或者如果它是由Hudson啓動的,則結果相同。 上面指出的證書似乎已經到位。

我幾乎已經準備好放棄這件事了,所以我非常感謝任何幫助,以澄清事情!

最好的問候, 安德斯

+0

你有沒有解決這個問題?我似乎遇到了同樣的錯誤。 – nazbot 2011-05-17 16:25:16

+0

不,我用舊的瑞典裝置「放棄永遠不會太晚」,而且,恩,放棄了。 我可能稍後再給它一些時間,但暫時不會。有趣的是,雖然看到其他人有同樣的問題。如果您發現任何問題,我會非常感激這裏的評論。 – AndersG 2011-05-18 12:23:25

+0

嘗試解鎖您的鑰匙串。我認爲這就是我所做的解決這個問題的方法(如果確實是相同的錯誤)。 – nazbot 2011-05-18 14:52:32

回答

2

我遇到了你更新到新的分發證書和供給配置文件後,上面顯示我的構建機器上的具體錯誤。在ProcessProductPackaging步驟之後,它將顯示** BUILD FAILED **消息。

但是,當在構建機器上手動運行構建時,我遇到了KeyChain權限對話框。點擊「始終允許」解決問題。

這除了在構建腳本解鎖:

security unlock -p $PASSWORD 
+0

謝謝,我會盡快嘗試... – AndersG 2011-06-28 09:24:59

0

這行代碼添加到您的腳本:

security list-keychains -s $KEYCHAINFILE

這已固定我的問題。

相關問題