Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile a .nib file

If I'm editing a nib file that I decompiled ( https://github.com/akahan/Nib-Decompiler ) from an application, how do I re-compile it into the original uneditable nib format so that I can put it back into the application?

like image 298
penguinrob Avatar asked Dec 25 '11 05:12

penguinrob


People also ask

What is a .NIB file?

A NIB file is a touch-enabled user interface object for an iOS app created by the Interface Builder component of Xcode integrated development environment. Such NIB files are usually generated by Interface Builder's Cocoa or Carbon interface. They contain elements such as buttons and text fields.

How do you create a nib file?

To create a NB file: Open the Nota Bene application, select File → Save As... or click the "Save As" arrow icon on the left pane of the Nota Bene window. Choose the save location of your file and name it. The "Save as type" default creates the NB file, click Save.

How does a nib file work?

A nib file is an Interface Builder document. You use Interface Builder to design the visual parts of your app—such as windows and views—and sometimes to configure nonvisual objects, such as the controller objects that your app uses to manage its windows and views.

How do I create a nib file in Xcode?

If you're creating a new ViewController specifically, you can also choose the "Cocoa Touch" section and select the "UIViewController subclass" item. There is a checkbox in the next page called "With XIB for User Interface." which will create the NIB as well as the associated class files. Save this answer.


1 Answers

Use ibtool. The command line should be something along the lines of:

ibtool --compile output.nib input.nib

(Yes, output before input; the output name is the argument to the --compile flag, while the input name is ibtool's direct object argument.)

You may need other options, depending on your needs; see the manpage for details on all of them.

like image 181
Peter Hosey Avatar answered Oct 10 '22 15:10

Peter Hosey