Creating Universal (Multi-Device) Themes

This behavior is deprecated and should be avoided. Use BTThemeDevice and target only one device per theme.

Bowtie for Mac runs on Mac OS X 10.5 (Leopard) and later, and Bowtie Touch runs on both iPhone/iPod touch and iPad. For this reason, it's sometimes beneficial to create a theme that adapts to its environment. Using Bowtie's two universal theme mechanisms, you can easily create a single theme that runs flawlessly on any number of platforms.

Platform-Specific Info.plist Keys

In Bowtie 1.2 and later, and Bowtie Touch 2.0 and later, you can make any Info.plist key platform-specific by appending a platform identifier in square brackets ([ and ]). For example:

Platform-specific Info.plist Keys

With the above keys, the theme would appear as "Zinger" on the Mac, and "Zinger Touch" on Bowtie Touch. It would use index.html as its main file on OS X 10.6 and later, index-compat.html as a fallback for 10.5, index-iphone.html for iPhone and iPod touch, and index-ipad.html for iPad.

Platform-Specific Property Lists

If you have a lot of keys that you need to vary by platform, on Bowtie 1.1 and later, and Bowtie Touch 2.0 and later, you can instead provide them in separate Property List files. The filenames follow the same platform identifiers as above: ie, Info.plist would be loaded first, then any keys provided in iPhone.plist would only be applied on iPhone/iPod touch, 10.5.plist would be used on OS X 10.5, etc. Note that you do not need to use the square bracket syntax in separate Property Lists, just the original key names.

Platform Identifiers

Regardless of which mechanism you use (you can even use both), conditionally-applied settings are applied and merged in a specific order, with later values replacing previous values. The order of applied platform identifiers is detailed (by device) below.

OS X 10.xiPhone/iPod touchiPad
  • (base value)
  • Mac
  • 10.x
  • (base value)
  • Touch
  • iPhone
  • (base value)
  • Touch
  • iPad
Note: Touch refers to Bowtie Touch, not iPod touch. iPod touch shares a platform identifier with iPhone.

Platform-specific keys always supersede platform-specific Property List files: ie, a definition for BTMainFile[iPhone] in Info.plist would take precedence over a definition for BTMainFile in iPhone.plist, in spite of the fact that iPhone.plist keys would ordinarily supersede Info.plist keys.