Voices That Matter

Core Services

iPhone Developer Tips Stats:
Past 30 days - Pageviews: 88,424 Visitors: 61,675
Thank you everyone! Let's shoot for 100,000 by May. Pass it on...



Sleep, Pause or Block a Thread

If you ever need to briefly pause a thread of execution, there are two class methods in NSThread you can use. Although you have to use these methods judiciously, they can be handy in instances where you need to force a delay in order to achieve some desired effect.
For example, if you want to [...]

Core Services

Getting the iPhone User Name

The original tip I wrote (shown below) does retrieve the user name, however, giving its undocumented status as well as the returning a string with punctuation removed, the approach suggested by Pascal in the comment section is much better:

[[UIDevice currentDevice] name];

When running this code from my device it returns "John’s iPhone" and when running from [...]

Core Services