BackRow Changes
Since the release of AppleTV Software version 1.1, which includes a new version of the BackRow framework (version 2.1) and a wholly new framework (AppleTV.framework), it has become necessary to make some changes to make plugins work. Here I’ll list all the required changes and any other differences between the two software versions, as I find them.
Required Changes
Two things must be changed to make appliance plugins compatible with BackRow v2.1:
- Change the CFBundleIdentifier in your appliance’s Info.plist so it begins with “com.apple.frontrow.appliance”.
- Change the fake class name returned from the +className override to something like “RUIMoviesAppliance”.
In the new version of the BackRow framework, there is a new class called BRFeatureManager. This uses strings to record whether certain features are enabled or disabled (the strings/keys are entirely arbitrary btw, so we can use this ourselves). I believe this is mostly designed to enable parental controls, but the part of the implementation as it concerns the main menu now filtering appliances goes like this:
- BRFeatureManager looks up the given ‘key’, which in this case is an appliance plugin’s CFBundleIdentifier.
- If the key is present in the feature dictionary, it returns the YES or NO depending on the object for that key (an NSNumber).
- If the key is not present, it checks whether the key begins with “com.apple.frontrow.appliance”.
- If it does, the manager returns YES, enabled. Otherwise it returns NO, not enabled.
So, it looks like the simplest way to get past the new BRFeatureManager in a backward-compatible way is simply to change your bundle identifiers.
The other alternative is to add this initialize function to your principal class:
+ (void) initialize
{
Class cls = NSClassFromString( @"BRFeatureManager" );
if ( cls == Nil )
return;
[[cls sharedInstance] enableFeatureNamed: [[NSBundle bundleForClass: self] bundleIdentifier];
}
Other Changes
BRListControl’s -selection and -setSelection: methods have been renamed to -renderSelection and -setRenderSelection:.
All screensaver code is now located within the AppleTV framework. If you use BRScreensaver or its subclasses, or if you use BRScreenSaverManager, look at the AppleTV framework headers to determine which item to use in the new version of the software.
All classes from BackRow v2.0 whose names began with BRX have been moved into the AppleTV framework. Also moved are some of the functions within BRSettingsFacade. Although that class remains within BackRow, a number of the hardware-related (or specifically AppleTV-dependant) functions have been moved into the ATVSettingsFacade class within AppleTV.framework.