Difference Between .xib and .nib in iPhone


Interface Builder is a software development application for Apple's Mac OS X operating system that is part of Xcode. 
Interface Builder is an application that allows you, the developer, to create the Graphical User Interface (GUI) using Cocoa and Carbon.

The resulting interface is stored as a .nib file, short for NeXT Interface Builder, or more recently, as a .xib file.

When building an application, these files are copied into the app's bundle and are loaded at run-time to provide the user interface for the application. xib files are compiled into nibs when the application is built. 

XML Interface Builder (XIB)

  • It was a new file with the .xib format, introduced in accordance with Leopard (Xcode 3.0) in 2007.
  • XIB is not a package, it is a text-based XML file with ".xib" extension, used by XCode and Interface Builder(IB) by default.
  • These are more version control friendly.
  • Interface Builder is a tool for editing XIB files. 

NeXT Interface Builder (NIB)

  • These files are archives with a ".nib" extension, loaded by a XCode application.
  • It is of 2 types: (a) Keyed, (b) Non-keyed.
  • It can be edited in IB, which is in non-human-readable binary format.