Developing iPhone apps with JUCE

I’m planning to write an iPhone app and I would like to know how well JUCE works on the iPhone. I don’t have an iPhone right now (and even never used one), and I would only buy one if it was for developing.

  • Are there some specifical challenges or does it all work “out of the box”?
  • Is drawing fast or does it consume a lot of CPU as with JUCE on my iBook G4? In my case I would draw waveforms that would take as much as 50% of the screen and should have a pretty high update rate (>20Hz). So, probably a lot of calls to Graphics::drawVerticalLine().
  • How much RAM has the iPhone?
  • If I want to decode MP3’s or other audio formats, is this easily possible on the iPhone (like with the QTReader class?) ?
  • I suppose one uses XCode with some special SDK, I’ve read somewhere there’s an iPhone emulator, so I guess it’s all coded on the Mac and then in the end transferred to the iPhone itself?
  • Speaking of audio, is the iPhone also using CoreAudio and what is the typical latency?

Sorry for all these beginner-level questions, but it’s good to have a solid overview before I start developing on this new territory :slight_smile:

It certainly works, and I think a lot of these questions would be better answered by you actually having a go with XCode and seeing it for yourself! (You might need a new mac though - not sure if the latest XCode versions will run on a G4… even if it does, I’d imagine that it’d be agonisingly slow)

There’s a bit of learning curve, and a lot of hoops to jump through with Apple. That’s assuming you know xcode, or else there’s a lot to learn.

Kinda slow, in my experience. The GPU is there for more graphically intensive tasks, and Apple has got good at leveraging that, so isn’t too worried about the CPU not being quite up to it. You’ll probably have to re-implement that code in OpenGL-ES.

Dunno. Enough? Google it.

In iOS 4 there’s some extraction classes. Juce doesn’t have them yet, but there could probably be a juce reader. That also gets data from the user’s library, so it’s ideal (currently you can really only access files you have). Non Apple MP3 would be tough - probably would not fit with various licenses.

It’s a slightly modified xcode, with some extra features. A pretty good emulator, too. You can debug on that or on a device. It’s about as slick as I’ve seen embedded development, if not perfect.

Dunno. It’s a version of CoreAudio, not sure about latency. The current iPod Touch uses iOS, so I would expect that audio is decent. There’s also a bunch of audio apps coming out, so it’s good enough for most people.


Bruce, thanks for this extensive description. I really appreciate when someone takes the time to answer questions extensively. You’ve helped me alot.

I can implement the graphics rendering in OpenGL, no problem. I’m sure implementing the MP3 decoder will not be too hard either (I did that on the Mac by myself back in the time).
So, last question: If I understood right, there’s no interface in JUCE for outputting audio on the iPhone as there is for ASIO, CoreAudio etc… on Mac/PC?

Oh yes, the audio i/o is all there, works just the same as all the other platforms.