Apple has created some great tools to help you debug and optimize your iPhone and iPad apps.
However, knowing exactly what they do can be a challenge. I’m still figuring everything out and finding new uses for the tools. I suspect that unless you have been working on Mac software development for a long time then you probably feel the same. With the addition of multitasking this has gained even greater importance as apps now require further optimization.
I found this nice little rundown of all the latest tools available with Xcode.
The rundown can be found here:
Apple’s Instruments for Developers
If you’re new to Xcode, or you just don’t feel your getting the most out of Instruments in Xcode then I suggest checking it out.
If you like this, please share it!
Tweaking an app can be a time consuming process. Especially with the time it takes for an app to load up in the simulator. All that building, and loading is time that could be spent updating your app.
One way to speed up the process is with remote debugging, and I found this great tutorial on how to easily implement a socket server for access, and tweak your app using Lua.
The tutorial is from Miguel Friginal (aka Mystery Coconut) and can be found here:
Example code is included so you can see how everything is done, and I found it to be surprisingly less complex than it sounds.
If you liked this, then please share it. Thanks!
Something that comes up frequently, and something I’ve had difficulty in the past with myself is debugging iPhone apps. There is a fairly easy way to alleviate that problem, and that is to place NSLog statements that print out the name of the method, class, whatever information you like to the console so that you can find out the problem area of a program, however there is a big problem with NSLog statements, and that is that they seem to use a an overly large amount of system resources.
I’m not exactly sure why it is, but I’ve found NSLog statements can really slow down a program, and having any running in the release version of your app (even though there’s no console displayed) seem to have a dramatic impact upon performance. So you will want an easy way to turn them on, or off.
Unfortunately, this is generally done by placing #ifdefs all over your code so that the NSLog statements are not compiled out of debug mode, but I have found a better solution.
Karl Kraft has created a debuglog statement that does everything that NSLog does, but turns off outside of debug mode.
You can download the full project here: Debuglog
The details on how to use Debuglog are included in the link on Karl’s blog. Check it out, and it will speed up your debugging, you can even better the details of NSLog statements easily.