Make Xcode skip nib compilation
-
19-09-2019 - |
Question
I'm creating an application which must be 'hacker compatible', so that people can edit nibs and stuff. However, when I show package contents, the nibs are compiled so I can't open them in IB. Is there a way I can make Xcode don't compile the nibs?
Thanks
Solution
Open up your target's Properties window and choose the Rules tab. That is where all the rules live that do things like compile xib files into nib files. You can change the actions for the rules that affect "Interface Builder files" (xib) and "Nib files", or you can create a new custom rule, which will be used handled first.
Another option is to create a Run Script Build Phase with a script that copies the xib files into your bundle, bypassing any processing normally done by Xcode.
OTHER TIPS
Can you embed the NIB as a resource in the resources section, instead of or in addition to compiling them in? Then you can load the NIB as a resource for your users to view in an XML editor, or to save on their machines and edit in IB.