FRScreenSaver 101

From AwkwardTV
Revision as of 19:16, 11 September 2007 by ThnEa7 (talk | contribs)
Jump to: navigation, search

mp3 fotocamera professoressa di lingue cucine ala elett basilea ristorante curriulum tais auto porsche cayenne adobe audition 1 5 win gioca cucinando genius mouse ps2 netscroll norton cambio astrea creative itrigue 3400 taj coral reef pc athlon 3800 villaggi turistici in calabria sexo anal saintex rsmmc dv 256 mb nokia plettenberg sample videoclip childrens hoffmeister adolf calendario per totti sony ericsson k750i calendari sporchi 2004 ron jeremy luny tunes la corriera del west microfono senza fili foto capelli nuda citta capo ristorante accessori golf tettone nude lynyrd skynyrd lyve combustibili vaio centrino negozi antiquariato howar shore video di paolo meneguzzi tastiere con pad video berg modem 56k pci foto hardcore rossella brescia calendario 2004 tavoletta wacom bluetoot el cun cun desirous hotel 5 stella lione dines william henry siroma com panasonic 10 videocamere george m cri everibody hp color laserjet q6000a marika la casa delle play girls batteria cellulare sharp gx10 vietnamese girls personaggi you re the first the last my everything fx5500 geforce decorazioni interni www wind e infostrada haiducii dragoste din tei l multifunzione hp 1215 campions jennifer aniston sexi marco polo loreena mckennit brugi sci lettore yamaha adp vet 100 cpr camhoe strange dawn disco 02 esly guevara trek star 7 generazioni resident evil 3 gamecube noleggio scale rimini festivalbar 96 notebook hp nx the bounty hunter bmw sw d pentium 4 serie 6xx accessori tomtom go teto a chi mi dice dei blue www costantino vitagliano nagano winter olympics 98 downlod free il coraggio damare hunzicher adidas x country w frigorifero rex da tavolo mezz ora zro assoluto allinfo www basket ferentino it lcd tv samsung 40 epl 6200l epson centrino radeon canon eos 350d reflex fotocamere faro e deo palmari hp consolidate debt free tmobile ringtones free sexy ringtones cheap pharmacy cheap diazepam cheap adipex cheap sibutramine cheap fioricet cheap dianabol but provigil free music ringtones techno ringtones free metal ringtones free pop ringtones student loan home mortgage loans free sagem ringtones actos online cheap lisinopril free ericsson ringtones diazepam online cialis online ionamin lotrel cheap zoloft verizon wireless ringtones fioricet online rolex replica watches free sony ringtones cheap buspar verizon ringtones voice ringtones tramadol online buy adderall viagra online free christian ringtones cricket ringtones cheap imitrex vocal ringtones hgh cheap hydrocodone cheap viagra cheap diflucan free tracfone ringtones cheap diflucan tamiflu online free mono ringtones cheap lortab free phone ringtones order zoloft buy dianabol clonazepam online cheap metformin buy carisoprodol flexeril online sprint ringtones cheap ephedrine talking ringtones cheap clomid free cool ringtones free lg ringtones sibutramine online buy norco cheap lipitor free motorola ringtones synthroid online cheap ortho cheap flonase cheap klonopin ambien online cheap flagyl punk ringtones cheap diethylpropion audiovox ringtones celebrex online cheap valtrex cheap celebrex wwe ringtones ephedra online southwestairlines cheap norvasc zyban online phentermine cheap ringtones used bmw auto wellbutrin online cheap sibutramine cheap bontril online pharmacy online cheap clonazepam cyclobenzaprine cheap phendimetrazine clomid online cheap amitriptyline cheap levitra humour ringtones cheap zocor cool ringtones cheap alprazolam nokia ringtones Finally the screen saver problem has been solved too!

All the BackRow screen savers are basically generators for Quartz Composer compositions. These compositions can be very powerful, even driving things like RSS feeds. In fact, that's the example we'll use.

Most of the instructions to create a FRAppliance still apply—the bundles are very similar. I will go by the same steps as the FRAppliance tutorial, but only highlight the DIFFERENCES from those changes. Please review FRAppliance_101 to reference those steps.

Making the Project

First, you'll want a more useful name. Instead of "HelloWorld", let's call it "RSSVisualizerSaver". Create a new Cocoa Bundle project with this name.

Creating the Plugin

Open InfoPlist.strings (for English) and make sure CFBundleName accurately reflects your new screen saver name:

CFBundleName = "RSS Visualizer";

The Main Appliance Class

Our primary class will not be HelloWorldAppliance, rather use "RSSVisualizerSaver". That means you'll add an Objective-C class to your project caled RSSVisualizerSaver. Don't forget to check "Also create RSSVisualizerSaver.h" in Xcode.

Open RSSVisualizerSaver.h and change it so that your RSSVisualizerSaver class inherits from BRQCScreenSaver. Change "NSObject" in the line beginning with "@interface" to read "BRQCScreenSaver".

Make sure you import the BackRow framework.

You'll want to add the className class method to RSSVisualizerSaver.m—screen savers need to bypass their own whitelists too. However, we need to use an unused screen saver item, and the only one appears to be RUIRetailScreenSaver. Folks are working on subverting the whitelists, so stay tuned for that. You will also want to search for a different method in the exception backtrace: _validateBundleAtPath:. Here's the full code to place into RSSVisualizerSaver.m, instead of the one defined by the Appliance instructions.

// Override to allow FrontRow to load custom screen saver bundles
  (NSString *) className {
    // this function creates an NSString from the contents of the
    // struct objc_class, which means using this will not call this
    // function recursively, and it'll also return the *real* class
    // name.
    NSString * className = NSStringFromClass( self );
	// new method based on the BackRow NSException subclass, which conveniently provides us a backtrace
	// method!
	NSRange result = [[BRBacktracingException backtrace] rangeOfString:@"_validateBundleAtPath:"];
	if(result.location != NSNotFound) {
		NSLog(@" [%@ className] called for screen saver whitelist check, so I'm lying, m'kay?", className);
		className = @"RUIRetailScreenSaver";
	return className;

We need to copy our Quartz composition into our project, otherwise we'll be making an extremely boring screen saver. First, you'll want to copy a composition into your project. Copy this file from your Mac OS X system:

/System/Library/Screen\ Savers/RSS Visualizer.qtz

into your project folder. Then in Xcode, right-click on the "Resources" directory, select Add > Existing Files..., and select RSS Visualizer.qtz from your project folder. Make sure it is added to your target.

Back to the code. There is no equivalent to the applianceControllerWithScene method in a BRQCScreenSaver. The only thing need to do to run a QuartzComposer composition is override its initWithScene method and set the appropriate composition. We'll call the superclass' initWithScene: method to do all the dirty work, the only change we will make is to set a different composition.

- (id)initWithScene:(id)scene {
	NSBundle *thisBundle = [NSBundle bundleForClass:[self class]];
	NSString *compositionPath = [thisBundle pathForResource:@"RSS Visualizer" ofType:@"qtz"];

	self = [super initWithScene:scene];
	[self setCompositionPath:compositionPath];
	return self;

Building the Plugin

Build Settings

Everything is the same, except:

  • make sure your Principal Class is set to RSSVisualizerSaver, not HelloWorldAppliance.
  • set the Wrapper Extension to frss, not frappliance.


Click Build. The compiled screen saver will appear in build/Debug/RSSVisualizerSaver.frss.

Running the Plugin

You'll want to copy your built copy to the correct folder. I recommend, as the Appliance tutorial author did, to mount the project from your development system so you can make a symlink to the correct location. Copy or symlink your built project to:

/System/Library/CoreServices/ Savers

Kill Finder, then navigate to Settings > Screen Savers. Select "RSS Visualizer", then click Preview to witness your great creation!


Start experimenting with some cool compositions for AppleTV—I think this will be a hugely popular hack, given I know the Apple TV community can come up with some really creative screen savers to show on their sexy widescreens. :)

I (just call me John Doe, I want no recognition for this) owe this entire hack to EricIII, the creator of the FRAppliance 101 tutorial. Quite simply, it would have been impossible without his work, especially since the Screen Saver project is largely a clone of the Appliance project.

Some pretty compositions can be found here: