Difference between revisions of "XIB"

From GNUstepWiki
Jump to navigation Jump to search
m
(Updated MonoObjc link, added some information for cross platform development as of 2019-04)
Line 1: Line 1:
As of MacOS 10.3 Apple moved away from the binary encoded nib files, and towards the xml encoded XIB files, for their interface definitions.
+
As of MacOS 10.3 Apple moved away from the binary encoded nib files, and towards the xml encoded XIB files, for their interface definitions. As of 10.9 (Xcode 5) Apple changed to xib file format totally, that format is not supported by Gorm currently.
 +
 
 +
== Xib file format ==
  
 
The xib file format is actually quite easy to understand, it is the responsability of the object encodeing and decoding, it to insure that it's attributes are read correctly.
 
The xib file format is actually quite easy to understand, it is the responsability of the object encodeing and decoding, it to insure that it's attributes are read correctly.
Line 7: Line 9:
 
To provide cross platform compatability, review the "XIB fields" section of the gnustep wiki article on the interface you intend to provide a codec for.  Also be sure to read the apple article on [[#See Also|KVC]].
 
To provide cross platform compatability, review the "XIB fields" section of the gnustep wiki article on the interface you intend to provide a codec for.  Also be sure to read the apple article on [[#See Also|KVC]].
  
==See Also==
+
=== See Also ===
 
*[http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueCoding/Articles/Overview.html Apple on KVC] - Encoded objects must be KVC complient
 
*[http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueCoding/Articles/Overview.html Apple on KVC] - Encoded objects must be KVC complient
 
*[http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueObserving/KeyValueObserving.html#//apple_ref/doc/uid/10000177i Apple on KVO] -KVO explains how to decode KVC objects.
 
*[http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueObserving/KeyValueObserving.html#//apple_ref/doc/uid/10000177i Apple on KVO] -KVO explains how to decode KVC objects.
*[http://www.monobjc.net/index.php?page=xib-file-format XIB File Format Definition as understod by MonoObjc]
+
*[http://www.monobjc.net/xib-file-format.html XIB File Format Definition as understod by MonoObjc]
 +
 
 +
== Compatibility to Cocoa/macOS ==
 +
 
 +
As of version 1.2.24 Gorm is able to read xib and nib files from Xcode up to version 4 (to some extend). Gorm can save nib files, but this nib files currently cannot be read by Xcode 3 and above. This means for development of cross platform xibs/nibs you need to use Xcode *below* version 5, meaning a Mac OS X version of 10.8 and below.
 +
 
 +
== Using .nib and .gorm files in parallel ==
 +
 
 +
You can use .nib and .gorm files in parallel to develop cross platform applications. GNUstep will load a .gorm file over a .nib file given the same name.

Revision as of 14:58, 25 April 2019

As of MacOS 10.3 Apple moved away from the binary encoded nib files, and towards the xml encoded XIB files, for their interface definitions. As of 10.9 (Xcode 5) Apple changed to xib file format totally, that format is not supported by Gorm currently.

Xib file format

The xib file format is actually quite easy to understand, it is the responsability of the object encodeing and decoding, it to insure that it's attributes are read correctly.

Here is a commented example of a XIB file. For easy reading open it in a syntax highliting editor using XML highlighting.

To provide cross platform compatability, review the "XIB fields" section of the gnustep wiki article on the interface you intend to provide a codec for. Also be sure to read the apple article on KVC.

See Also

Compatibility to Cocoa/macOS

As of version 1.2.24 Gorm is able to read xib and nib files from Xcode up to version 4 (to some extend). Gorm can save nib files, but this nib files currently cannot be read by Xcode 3 and above. This means for development of cross platform xibs/nibs you need to use Xcode *below* version 5, meaning a Mac OS X version of 10.8 and below.

Using .nib and .gorm files in parallel

You can use .nib and .gorm files in parallel to develop cross platform applications. GNUstep will load a .gorm file over a .nib file given the same name.