background preloader

Documentation

Facebook Twitter

Inner Exception: iPhone app version and build numbers. I think every iPhone developer should know how to assign version and build numbers to their app.

Inner Exception: iPhone app version and build numbers

If you have come from another platform, like I have, the Apple way is the same but different. I am standing on the shoulders of Chris Hansen for a lot of this post. His post on Xcode: Build numbers and versioning with agvtool was the starting place for me on a lot of this information. Chris' post is nearly 3 years old now, Apple has moved some stuff around and it isn't iPhone specific. Plus, there are no screenshots :-) Marketing or Build Version? Highlighted is the Bundle version with a default value of 1.0. When you only have Bundle version, in a Cocoa OS X app you see a built-in About box that looks like this: When you add a new key to Info.plist called Bundle version string, short, and flip your 1.0 into that key, and then put something more traditionally resembling a build number (14) back into Bundle version, the Cocoa OS X built-in About box looks like this:

Debugging tips for Objective-C programming. Talking to gdb directly The Debugger Console window is the way to talk to gdb.

Debugging tips for Objective-C programming

Show the console window in Xcode from the Run menu (or type command-shift-R). You can only send commands to gdb when the program is paused (stopped at a breakpoint). When you have the (gdb) prompt, then you can talk to gdb. Most commands that gdb accepts, Xcode handles automatically for you by showing the values in the Debugger window. "po" : print object The print object command displays a textual representation of an Objective-C object.

Imagine you wanted to know why your call to: is returning nil. Hit return and gdb will give the result. The key name I should have used was @"firstKey" with a lowercase 'f'. In this case, gdb is invoking the description method on the NSDictionary to generate a string. Xcode data formatters If the debugger is still stopped at the same line and you open the Debugger window in Xcode, the "Arguments" list of variables will contain an entry for stringDictionary. Other "print" commands. Multithreading and Grand Central Dispatch on iOS for Beginners Tutorial. Convert a slow, unresponsive app to a speedy cheetah with Grand Central Dispatch!

Multithreading and Grand Central Dispatch on iOS for Beginners Tutorial

Have you ever written an app where you tried to do something, and there was a long pause while the UI was unresponsive? This is usually a sign that your app needs multithreading! In this tutorial, you’ll get hands on experience with the core multithreading API available on iOS: Grand Central Dispatch. You’ll take an app that doesn’t use multithreading at all (and hence is very unresponsive), and convert it to use multithreading. You’ll be shocked by the difference!

This tutorial assumes you are familiar with the basics of iOS development. Without further ado, take a swig of soda or chew some bubble gum and begin this tutorial at the same time – and you’re already on your way to multithreading! Why Should I Care? “Ahem, so why are you telling me this? If you’re like a certain puppet, you might still be skeptical why you should care about all this multithreading business.

Go ahead and tap the “Grab!” …waiting…