Right, here are the steps I followed to get the Juce example project built for iOS - the Juce example project for iOS is broken for me (http://www.rawmaterialsoftware.com/viewtopic.php?f=4&t=6370)
- Created new iOS Windows-based project; marked as Universal so it works nicely on both iPad and iPhone
- Removed the two Nib references from the generated .plist file, and removed the two generated .xib files from the project (if you don’t do this, the internal call to UIApplicationMain will try to drive everything through Xib files, and will fail to call the Juce UI application delegate code; your main app class won’t be constructed, and you’ll be staring at a blank Window!).
- Added compiler flags: Release: -DNDEBUG=1, and Debug: -D_DEBUG=1 to avoid warnings from Juce
- Set the iOS target to 3.1.3 (rather than the default of 4.2) - lets your app run on more devices!
- Removed the generated app delegate files from the project
- Dragged all juce files from the juce demo project, into to my generated project: however, do NOT copy-across the .icns file and the .plist file!
- Drag-in all Frameworks from the Juce project, to your generated project; this tops-up the list of frameworks that your generated app can use…
- Build project
- Debug project
Should all work if I haven’t missed anything!
Amazing to see the Juce demo running in the iOS Simulator.
Jules, are you aware of any UI things in Juce that might get Juce-based apps blocked from the app store, without tweaking?
Couple of comments to note:
- by default, the generated app has a close button in the top right; IIRC the Apple guidelines say that this is a no-no - apps mustn’t be dismissed by anything other than the main physical device button…
- I’ve yet to investigate what happens wrt rotation events, multi-touch, or where I hook-in code to save app state when the app is terminated/backgrounded/returned from the background (nb if you want an app to be backgroundable, that requires flags in your .plist file and also some additional code). Jules, are you planning to add handlers to the Juce framework to cater for this sort of thing, or will we have to hack-around the Juce sources for iOS?