【问题标题】:iOS command line build fails (Jenkins, Xcode 6.1, Storyboards)iOS 命令行构建失败(Jenkins、Xcode 6.1、Storyboards)
【发布时间】:2015-02-16 12:15:20
【问题描述】:

我正在尝试在 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 完全相同的错误。

您知道导致此错误的原因以及如何消除它吗?

【问题讨论】:

  • 我已经有这个问题好几个月了...

标签: ios xcode jenkins build


【解决方案1】:

这可能是项目文件中的重复资源。在 Sublime 或 Text Wrangler 等文本编辑器中打开 .xcodeproj 并小心删除所有重复的 xibstoryboard 引用。

【讨论】:

    【解决方案2】:

    另外,请确保您的 Mac Slave 上安装了正确的 Xcode 版本,就我而言,我有一个带有 SafeArea 的 Storyboard,但 Xcode 版本太旧,无法编译。

    【讨论】:

      猜你喜欢
      • 2011-10-02
      • 1970-01-01
      • 2019-11-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-08
      • 2020-10-06
      • 2013-01-27
      相关资源
      最近更新 更多