Iphone app delegate

So I’ve got a nice iPhone app that uses JUCE for audio (initializing the app with initialiseJuce_GUI) but uses Cocoa touch classes, so I can use interface builder, and all the nifty Cocoa touch ui stuff.

All good so far, but I just noticed that this command …

AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];

which is a useful command for getting ahold of the top level app delegate from within views/etc to allow you to make top level changes, like switching between views and things.

… returns a JUCE app delegate … which must have been set somehow with the initialiseJuce_GUI. I understand there may be a need for juce to be able to find it’s own delegate … but is there some way to still have access the methods defined in the Cocoa applications delegate that called initialiseJuce_GUI?

I’m a little new to interface builder and Cocoa touch …

Interesting question.

In fact, looking at the iphone delegate code, it’s probably not actually needed at all… When I ported to the phone from the mac code, I took across the delegate code, which is certainly necessary on the mac, but all the callbacks are actually kind of useless on the phone (things like application focus callbacks, which never happen). So I think I should probably remove it altogether!