简体   繁体   English

ibtool无法在Xcode 7.1 Beta中编译故事板

[英]ibtool fails to compile storyboard in Xcode 7.1 Beta

Having updated from Xcode 7.0 Beta 3 to 7.1 Beta (all intermediate releases including the 7.0 GM had a crash-on-launch bug for my project, which has only been fixed in 7.1 Beta) I can't build my project due to the following error: 从Xcode 7.0 Beta 3更新到7.1 Beta(包括7.0 GM在内的所有中间版本都有我的项目的崩溃启动错误,该错误仅在7.1 Beta中修复)我无法构建我的项目,因为以下错误:

CompileStoryboard MyApp/Resources/Storyboards/Main.storyboard  
    cd /Users/me/Developer/my-app  
    export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"  
    export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode-beta.app/Contents/Developer/usr/bin/..  
    /Applications/Xcode-beta.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --module MyApp --output-partial-info-plist /Users/me/Library/Developer/Xcode/DerivedData/MyApp-bwakexzthboxucdaodqtbbbwgsaz/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Main-SBPartialInfo.plist --auto-activate-custom-fonts --target-device iphone --minimum-deployment-target 8.0 --output-format human-readable-text --compilation-directory /Users/me/Developer/my-app/MyApp/Resources/Storyboards/Main.storyboard  


/ com.apple.ibtool.errors */  
: error: Not enough arguments provided; where is the input document to operate on?  

Xcode is configured to use the Xcode 7.1 (7B60) command line tools: Xcode配置为使用Xcode 7.1(7B60)命令行工具:

$ xcode-select -p  
/Applications/Xcode-beta.app/Contents/Developer  

And ibtool appears to be the correct version: ibtool似乎是正确的版本:

$ ibtool --version  
<?xml version="1.0" encoding="UTF-8"?>  
<!DOCTYPE plist PUBLIC "-/  
<plist version="1.0">  
<dict>  
  <key>com.apple.ibtool.version</key>  
  <dict>  
  <key>bundle-version</key>  
  <string>9046</string>  
  <key>short-bundle-version</key>  
  <string>7.1</string>  
  </dict>  
</dict>  
</plist>  

EDIT: Comparing the output from a successful build in Xcode 7.0 Beta 3 (formatted for clarity): 编辑:比较Xcode 7.0 Beta 3中成功构建的输出(为清晰起见,格式化):

CompileStoryboard MyApp/Resources/Storyboards/Main.storyboard
    cd /Users/me/Developer/my-app
    export PATH="/Applications/Xcode 7.0 Beta/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode 7.0 Beta/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    export XCODE_DEVELOPER_USR_PATH="/Applications/Xcode 7.0 Beta/Xcode-beta.app/Contents/Developer/usr/bin/.."
    /Applications/Xcode\ 7.0\ Beta/Xcode-beta.app/Contents/Developer/usr/bin/ibtool
    --errors
    --warnings
    --notices
    --module MyApp
    --output-partial-info-plist /Users/me/Library/Developer/Xcode/DerivedData/MyApp-bwakexzthboxucdaodqtbbbwgsaz/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Main-SBPartialInfo.plist
    --auto-activate-custom-fonts
    --target-device iphone
    --minimum-deployment-target 8.0
    --output-format human-readable-text
    --compilation-directory /Users/me/Library/Developer/Xcode/DerivedData/MyApp-bwakexzthboxucdaodqtbbbwgsaz/Build/Products/Debug-iphonesimulator/MyApp.app
    /Users/me/Developer/my-app/MyApp/Resources/Storyboards/Main.storyboard

2015-09-17 15:44:06.451 Interface Builder Cocoa Touch Tool[1216:88742] Error creating notification handler for simulator graphics quality override: 1000000

with the unsuccessful one from Xcode 7.1 Beta: 来自Xcode 7.1 Beta的不成功:

CompileStoryboard MyApp/Resources/Storyboards/Main.storyboard
    cd /Users/me/Developer/my-app
    export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode-beta.app/Contents/Developer/usr/bin/..
    /Applications/Xcode-beta.app/Contents/Developer/usr/bin/ibtool
    --errors
    --warnings
    --notices
    --module MyApp
    --output-partial-info-plist /Users/me/Library/Developer/Xcode/DerivedData/MyApp-bwakexzthboxucdaodqtbbbwgsaz/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Main-SBPartialInfo.plist
    --auto-activate-custom-fonts
    --target-device iphone
    --minimum-deployment-target 8.0
    --output-format human-readable-text
    --compilation-directory
    /Users/me/Developer/my-app/MyApp/Resources/Storyboards/Main.storyboard

/* com.apple.ibtool.errors */
: error: Not enough arguments provided; where is the input document to operate on?

reveals that I seem to be missing a value for the --compilation-directory argument and so the path to the storyboard is being used instead of as the target file for compilation. 揭示我似乎缺少--compilation-directory参数的值,因此正在使用故事板的路径而不是编译的目标文件。

Is it possible to inspect/modify this compilation step or is this likely a bug in Xcode? 是否可以检查/修改此编译步骤,或者这可能是Xcode中的错误?

因此,感谢Apple支持人员,解决方案是将Main.storyboard文件从Compile Sources构建阶段移至Copy Bundle Resources阶段。

Adding another potential answer for "Error creating notification handler for simulator graphics quality override". 为“为模拟器图形质量覆盖创建通知处理程序时出错”添加另一个可能的答案。 I got this error when I added a run script in xcode build phases, and then dragged the script to the sop to make it run pre-build. 当我在xcode构建阶段添加运行脚本时,我收到此错误,然后将脚本拖到sop以使其在预构建时运行。 No idea why this happened, but when I dragged the run script window back down to the bottom it fixed it. 不知道为什么会发生这种情况,但是当我将运行脚本窗口拖回到底部时,它就修复了它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM