Latest Articles

Use the navigation at the bottom to see older articles

How to read you App Version and Build from the Main Bundle

The required Version and Build numbers you add to Xcode make it into your app’s Main Bundle. You can retrieve those values from the Main Bundle and use them in your app. Here’s how: – (void)viewDidLoad { [super viewDidLoad]; // set version and build fields from bundle NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@”CFBundleShortVersionString”]; NSString […]

What are the button indexes in a three-button UIAlertView

The cancel button is always index 0, and all other buttons in the array start at index 1 counting up. For completion, here’s how to create it: – (IBAction)showAlert:(id)sender { // create an alert view with three buttons UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@”Three Button Alert” message:@”This is an alert view with more than two buttons. […]

How to restore your single In-App Purchase in iOS

This is an addition to my previous article. To allow uses to restore their In-App Purchases you can expand on the previous article and include the following method in your Shop class. This needs to be public so it can be called from your main class: – (BOOL)restoreThePurchase { // verify/refresh receipt here (even though […]

How to restore your single In-App Purchase in iOS

This is an addition to my previous article. To allow uses to restore their In-App Purchases you can expand on the previous article and include the following method in your Shop class. This needs to be public so it can be called from your main class: – (BOOL)restoreThePurchase { // verify/refresh receipt here (even though […]

How to create a single In-App Purchase in iOS 7

This “simple everyday” feature has caused me many headaches on many occasions. Implementing a simple unlockable feature isn’t as straightforward as it perhaps could be – and I’ll make it as simple as possible (so I won’t forget next time I need to add it to an app). In this example we’re going to have […]

How to open the LinkedIn App from your own iOS App

Here’s a sample action that tries to open a LinkedIn Profile with the LinkedIn App. If it’s not installed, it opens a link to the profile in Safari. If that doesn’t work it gives a log message (please handle appropriately in your own code): – (IBAction)openLinkedIn:(id)sender { // open the LinkedIn App if (![[UIApplication sharedApplication] […]