Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running ibtool has part of iOS build breaks build unless ran clean first

Added a build script step that ran

ibtool ./Mobile/Base.lproj/MainStoryboard_iPad.storyboard --generate-strings-file ./Mobile/Base.lproj/MainStoryboard_iPad.strings

This fails the build

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.ibtool.errors</key>
<array>
    <dict>
        <key>description</key>
        <string>Interface Builder could not open the document "MainStoryboard_iPad.storyboard" because it does not exist.</string>
    </dict>
</array>
</dict>
</plist>
Command /bin/sh failed with exit code 1

When the project is first cleaned and then built, it will succeed the first time.

I tried to duplicate this in a sample project, but could not duplicate it. Our real project is much more complicated... has 6 languages, project has two targets (one for enterprise build and one for the store build). Many classes and two large storyboards.

Does anyone have suggestions what to try to do differently to figure out what is causing the problem to determine if it is a tool bug?

like image 456
Jason Hocker Avatar asked Sep 25 '13 18:09

Jason Hocker


1 Answers

I am having the same issue using Xcode 5 with regular xib files. ibtools is randomly working. Using sudo finally did the trick for me.

Here's an example:

$ibtool --generate-strings-file en.lproj/MyVC.strings en.lproj/MyVC.xib
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"     
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.ibtool.errors</key>
<array>
    <dict>
        <key>description</key>
        <string>Interface Builder could not open the document "MyVC.xib" because it does not exist.</string>
    </dict>
</array>
</dict>
</plist>

Using sudo works every time although it sometimes complains about 'user domains will be volatile'

$sudo ibtool --generate-strings-file en.lproj/MyVC.strings en.lproj/MyVC.xib
2013-10-01 10:04:35.943 Interface Builder Cocoa Touch Tool[1717:303] CFPreferences: user       
home directory at file:///var/root/Library/Application%20Support/iPhone%20Simulator/User/ is unavailable. User domains will be volatile.
$
like image 60
n8tr Avatar answered Oct 29 '22 17:10

n8tr