Xcode 5故事板编译失败

时间:2013-12-13 15:40:22

标签: ios iphone objective-c xcode jenkins

我正在运行Xcode 5并为iOS 7构建。当我尝试构建此项目以进行存档时,我收到此错误。我在我的本地机器和我的jenkins构建服务器上得到它。我已经浏览了故事板,我没有找到任何理由来解决这个错误。它在模拟器和设备上构建得很好。我甚至不确定runtime.nib是什么,尽管addEditHCPViewController.nib是对故事板内部的一个视图控制器的引用。有什么想法吗?

CompileStoryboard myApp/Profiles.storyboard
    cd "/builds/Company/workspace/myApp"
    setenv IBSC_MINIMUM_COMPATIBILITY_VERSION 6.1
    setenv 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"
    setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode.app/Contents/Developer/usr/bin/..
    /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --minimum-deployment-target 6.1 --output-format human-readable-text --compile /builds/Company/workspace/myApp/build/Distribution-iphoneos/myApp.app/Profiles.storyboardc /builds/Company/workspace/myApp/myApp/Profiles.storyboard
/* com.apple.ibtool.document.warnings */
/builds/Company/workspace/myApp/myApp/Profiles.storyboard:jlW-RT-oUY: warning: 2 views are vertically ambiguous.
/builds/Company/workspace/myApp/myApp/Profiles.storyboard:1Qm-h4-IZr: warning: Position is ambiguous for "Picker".
/builds/Company/workspace/myApp/myApp/Profiles.storyboard:d8p-iA-2QW: warning: Frame for "Button" will be different at run time.
/* com.apple.ibtool.errors */
/builds/Company/workspace/myApp/myApp/Profiles.storyboard: error: Compilation failed. Unable to write to path: /builds/Company/workspace/myApp/build/Distribution-iphoneos/myApp.app/Profiles.storyboardc
    Underlying Errors:
        Description: The file “runtime.nib” doesn’t exist.
        Failure Reason: The file doesn’t exist.
        Underlying Errors:
            Description: The operation couldn’t be completed. No such file or directory
            Failure Reason: No such file or directory
        Description: “Profiles.storyboardc” couldn’t be removed.
        Failure Reason: The file doesn’t exist.
        Underlying Errors:
            Description: The operation couldn’t be completed. No such file or directory
            Failure Reason: No such file or directory

CompileStoryboard myApp/Profiles.storyboard
    cd "/builds/Company/workspace/myApp"
    setenv IBSC_MINIMUM_COMPATIBILITY_VERSION 6.1
    setenv 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"
    setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode.app/Contents/Developer/usr/bin/..
    /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --minimum-deployment-target 6.1 --output-format human-readable-text --compile /builds/Company/workspace/myApp/build/Distribution-iphoneos/myApp.app/Profiles.storyboardc /builds/Company/workspace/myApp/myApp/Profiles.storyboard
/* com.apple.ibtool.document.warnings */
/builds/Company/workspace/myApp/myApp/Profiles.storyboard:d8p-iA-2QW: warning: Frame for "Button" will be different at run time.
/builds/Company/workspace/myApp/myApp/Profiles.storyboard:jlW-RT-oUY: warning: 2 views are vertically ambiguous.
/builds/Company/workspace/myApp/myApp/Profiles.storyboard:1Qm-h4-IZr: warning: Position is ambiguous for "Picker".
/* com.apple.ibtool.errors */
/builds/Company/workspace/myApp/myApp/Profiles.storyboard: error: Compilation failed. Unable to write to path: /builds/Company/workspace/myApp/build/Distribution-iphoneos/myApp.app/Profiles.storyboardc
    Underlying Errors:
        Description: The file “addEditHCPViewController.nib” doesn’t exist.
        Failure Reason: The file doesn’t exist.
        Underlying Errors:
            Description: The operation couldn’t be completed. No such file or directory
            Failure Reason: No such file or directory

5 个答案:

答案 0 :(得分:21)

我找到了答案。在git中合并期间,项目文件未正确合并,并且Profiles.storyboard被作为资源包含两次。当它第二次尝试编译相同的资源时,它会失败。

答案 1 :(得分:5)

我刚刚清理了项目,然后再次构建它,之后错误就消失了。

答案 2 :(得分:2)

只是觉得我应该补充说我有一段时间遇到这个问题并且不知道如何解决它。

原来我的一个Storyboard ID在(/)中有一个斜杠,导致错误。删除此斜杠解决了错误!

希望这可以帮助一些人!

答案 3 :(得分:1)

删除故事板中的“/”ID解决了我的问题。

答案 4 :(得分:0)

@ imran-ahmed解决了这个问题。我在这个问题上工作了几个小时,最后在StoryBoard ID中找到了关于'/'的评论。一年后,StoryBoard ID中的'/'仍然杀死了Xcode编译。这是我的问题,只需删除'/'即可解决问题。