iAd Producer Updated to 2.1.1 & WWDC Session Video Available

Apple have updated iAd Producer to 2.1.1. Looks like mainly bug fixes and some UI tweaks.

This update contains various improvements, including fixes that:
• Correct handling of assets with normal and high-resolution versions.
• Address issues with animation preview on canvas.

If you’re a registered Apple iOS developer you can get it from the Developer Portal. 

You can also view the iAd Producer WWDC video, session 605 available on iTunes. 

iOS SHA512 Hex String

Here’s an Objective C method that’ll return a SHA512 hex of a given string:

-(NSString*) sha512:(NSString*)input {
    const char *cstr = [input cStringUsingEncoding:NSUTF8StringEncoding];
    NSData *data = [NSData dataWithBytes:cstr length:input.length];
    uint8_t digest[CC_SHA512_DIGEST_LENGTH];
    CC_SHA512(data.bytes, data.length, digest);
    NSMutableString* output = [NSMutableString stringWithCapacity:CC_SHA512_DIGEST_LENGTH * 2];
    for(int i = 0; i < CC_SHA512_DIGEST_LENGTH; i++)
        [output appendFormat:@"%02x", digest[i]];
    return output;

You'll need to include:


Xcode 4.2 Doesn’t Show Exception Stack Trace in Console

When using Xcode 4.2 for iOS development there’s an annoying bug where any exceptions crash to the main.m file instead of highlighting the line. Luckily you can set a custom breakpoint to restore the old and correct behaviour:

  1. Open the Breakpoint navigator (CMD + 6)
  2. Click the + button in the bottom left
  3. Select Add Exception Breakpoint 
  4. Click Done

Xcode 4.2 Window


Status Barred: iOS Screenshot Status Bar Remover App

So many iOS apps developers forget to remove the screenshots from their apps on the App Store; often revealing the horrendous times the screenshots were taken and detracting from the actual app.

iTunes Connect recommends the removal of the status bar, and Status Barred removes the status bar perfectly regardless of the screenshot being retina, iPhone, iPad, landscape or portrait. For $0.99 it saves a bunch of time whenever submitting or updating an app.

Available on the Mac App Store

iOS: Show Users the Reason You Require Their Location

Update: iOS 6 deprecated the purpose property and it now has to be set in your Info.plist with the key NSLocationUsageDescription which is displayed in Xcode as Privacy – Location Usage Description. If you’re still supporting iOS 5 and earlier make sure you include both.

A great, but underused location feature on iOS is the purpose property of the CLLocationManager.

So many apps ask for your location – give your users confidence in sharing their location by telling them why you need it!


locationManager.purpose = @"We'll only use your location to show you local events nearby.";

You need to do this before you start the location monitoring, so:

CLLocationManager *locationManager = [[CLLocationManager alloc] init];
locationManager.purpose = @"We'll only use your location to show you local events nearby.";
locationManager.delegate = self;
[locationManager startUpdatingLocation];

Your users will now get a pleasant reason when you request their permission:
iOS iPhone Screen Location Prompt

I’ve no idea why this is so rarely used, it’s been available since iOS 3.2.

Tip from the Apple docs:

You must set the value of this property prior to starting any location services. Because the string is ultimately displayed to the user, you should always load it from a localized strings file.