Time Profiler and iOS 3.2

Time Profiler is one of the tools available under Instruments. It’s only available for iOS 4 apps. I’m currently working on an iPad only app which is being built with iOS 3.2.

What I wanted to do was use Time Profiler to analyse a performance issue with the app. It’s a powerful tool that’s extremely simple to use and has yielded great benefits for me previously. An Apple employee described the tool as “an absolutely wonderful, statistical sampling profiling tool,” and I tend to agree. However, Time Profiler only works on devices running iOS 4 and above. I also didn’t have the option of using iOS 4.2, so it didn’t look like I could use Time Profiler on my iOS 3.2 app.

What I was able to do was use Time Profiler against my app in the simulator. I just needed to link against iOS 4.1 (by changing my target’s Base SDK) and I was able to run my app in the iPad simulator and use Time Profiler to profile it.

So what are the caveats?

• This will only work on the simulator, not for a device running iOS 3.2
• The simulator and the device will have different performance profiles

In the end this work around is not ideal, but it did help highlight exactly where the performance issues were with the app.