繁体   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