簡體   English   中英

iOS命令行構建失敗(Jenkins,Xcode 6.1,Storyboards)

[英]iOS command line build fails (Jenkins, Xcode 6.1, Storyboards)

我正在嘗試在Jenkins中構建我的iOS項目。 這就是Jenkins工作的設置方式:

  1. 源是從git repo(Git插件)獲取的
  2. 外部庫通過CocoaPods更新(CocoaPods插件)
  3. 啟動XCode構建(Xcode插件,指定目標,架構,工作區文件和構建輸出目錄。“打包應用程序並構建.ipa?”此測試不活動。

一個和兩個工作正常,第三步失敗:

Validate build/MyApp.app
    cd "/Users/myuser/.jenkins/workspace/MyApp Beta"
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    export PRODUCT_TYPE=com.apple.product-type.application
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation /Users/myuser/.jenkins/workspace/MyApp\ Beta/build/MyApp.app

** BUILD FAILED **

Build step 'Xcode' marked build as failure
Finished: FAILURE

在此之前我能看到的唯一錯誤如下:

CompileStoryboard MyApp/Base.lproj/Main_iPhone.storyboard
    cd "/Users/myuser/.jenkins/workspace/MyApp Beta"
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/..
    /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --target-device iphone --errors --warnings --notices --module MyApp --minimum-deployment-target 7.0 --output-partial-info-plist /Users/myuser/Library/Developer/Xcode/DerivedData/MyApp-ddibhvvpirpyiwdhzlmbkpcqbjvq/Build/Intermediates/MyApp.build/AdHoc_Distribution-iphoneos/MyApp.build/Main_iPhone-SBPartialInfo.plist --auto-activate-custom-fonts --output-format human-readable-text --compile /Users/myuser/.jenkins/workspace/MyApp\ Beta/build/MyApp.app/Base.lproj/Main_iPhone.storyboardc /Users/myuser/.jenkins/workspace/MyApp\ Beta/MyApp/Base.lproj/Main_iPhone.storyboard
nwi_state: registration failed (1000000)
2014-12-16 22:03:44.263 Interface Builder Cocoa Touch Tool[8241:7877572] ***createStorageTaskManagerForPath:withIdentifier failed: Error Domain=NSCocoaErrorDomain Code=4099 "The operation couldn’t be completed. (Cocoa error 4099.)" (The connection to service named com.apple.nsurlstorage-cache was invalidated.) UserInfo=0x7fca32cd3c70 {NSDebugDescription=The connection to service named com.apple.nsurlstorage-cache was invalidated.}; {
    NSDebugDescription = "The connection to service named com.apple.nsurlstorage-cache was invalidated.";
}
nwi_state: registration failed (1000000)
2014-12-16 22:03:46.899 Interface Builder Cocoa Touch Tool[8270:7877686] ***createStorageTaskManagerForPath:withIdentifier failed: Error Domain=NSCocoaErrorDomain Code=4099 "The operation couldn’t be completed. (Cocoa error 4099.)" (The connection to service named com.apple.nsurlstorage-cache was invalidated.) UserInfo=0x7fd1d9f06040 {NSDebugDescription=The connection to service named com.apple.nsurlstorage-cache was invalidated.}; {
    NSDebugDescription = "The connection to service named com.apple.nsurlstorage-cache was invalidated.";
}

我沒有找到任何有用的錯誤,但我想這是構建過程失敗的原因。 該應用程序在Xcode中構建良好。 當我粘貼ibtool命令並直接執行它時,我得到與Jenkins完全相同的錯誤。

你知道什么可能導致這個錯誤,我怎么能擺脫它?

這可能是項目文件中的重復資源。 在文本編輯器中打開.xcodeproj ,例如Sublime或Text Wrangler,並小心刪除所有重復的xibstoryboard引用。

另外,請確保Mac Slave上安裝了正確的Xcode版本,在我的情況下,我有一個帶有SafeArea的故事板,但Xcode版本是舊版本來編譯它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM