Building an App on iOS 8 still compatible with iOS7

My new app 20 Saxophone Tricks of the Trade by Mario Cerra has been available on the App Store for over a week now.

We’ve had many downloads apparently with no issues. Yesterday a user wrote us an email saying the app was crashing right after launching. I knew right away it had something to do with the user’s device or IOS.

I downloaded the app from the App Store on an iPad running IOS 7.1.1 and the app crashed right away. I tried it in XCode with the iPad 2 simulator and the app run perfectly but, as soon I connected my iPad with IOS 7 and run it from XCode the app crashed again with an uncaught exemption error.

Long story short, after a few break points I found the issue was in a line where I’ve used containsString to find if a substring is contained in a string, which is an iOS 8 only method. Although the app was set to build for ios 7.1 and up the xcode compiler gave me no warning notice.

The solution is to use the rangeOfString method that is compatible with iOS 7:

[yourString rangeOfString:@”whatever-you-are-looking-for string”].location == NSNotFound

That solved the problem.
To submit a new version of the app to the App Store you must change the version number and build number of the app, archive it and submit it.

Now the app is back on waiting for review on the App Store.

I also added a note in the description for the current version of the app so users still running IOS 7 will wait for the update before buying it.


– (NSString*) archivoFullPath: (NSString *)archivo {
NSMutableString* result = [NSMutableString stringWithString: mDecksURLFolder];
if (!([archivo rangeOfString:@”http”].location == NSNotFound)) {
return archivo;
} else {
[result appendString: archivo];
return result;


60 Top Hat Piano Grooves Free with in-app purchases ready for sale.

After 12 days waiting for review, 60 Top Hat Piano Grooves Free version 1.2 is now ready for sale.

The user has now the option of purchasing a preferred groove module. For example: If you’d like to access all the Rock & Pop grooves only, you may do so by purchasing only that module.

I think this will be a nice feature on the free version since the user already has access to two grooves for every single style. They can try them and choose the style they want to work with first and then when they are ready they can download the next module.

Apple does send you a nice email with all the details:

iTunes Connect
Dear Ariel Ramos,
The following app has been approved and the app status has changed to Ready for Sale:

App Name: 60 Top Hat Piano Grooves Vol. 1 FREE
App Version Number: 1.2
App Type: iOS App
App Apple ID:906262866
The following In-App Purchases are also approved:

In-App Purchase Reference Name: latinreggae
In-App Purchase Product ID: latinreggaepianogrooves
In-App Purchase Reference Name: rockpop
In-App Purchase Product ID: pianogroovesrockpop
In-App Purchase Reference Name: allgrooves
In-App Purchase Product ID: allgroovespiano
In-App Purchase Reference Name: contemporary
In-App Purchase Product ID: contemporarypianogrooves
In-App Purchase Reference Name: jazzbluesgospel
In-App Purchase Product ID: jazzbluesgospelpianogrooves

The importance of the In-App Purchase Screenshot

Yesterday, after 14 days, a new version of our music app Rhythmic Vocabulary for All Instruments Vol. 1 was Rejected by the review team on Apple. This version of the app has an in-app purchase where the user can buy Vol. II within the app.rejected

I made two mistakes when submitting the app for review:

  1. I forgot to upload a in-app screenshot, which is not optional and it is said to be used in the review process only.
  2. I did not add the In-App Purchase on the main screen for the app submissioninapp2

In the email from Apple, they described generic problems with in-app purchases but they do not tell you specifically what the problem is. Apparently the most common problem is not having a restore button (or feature) for the user to retrieve the in-app purchases previously made when they re-install the app or they download a new version and, I knew that was not the problem with mine.

I wrote to apple and they promptly reply telling me to submit a new build of the app and to make sure the in-app purchases were included with the build. That meant: Add a screenshot, and add the in-app purchases that you want to include in the app (on the main page)

Now we have to wait for review for another 14 days or so.

20 Saxophone Tricks of the Trade by Mario Cerra is ready for sale

saxiconToday, after 13 days waiting for review on the App Store, our new saxophone app 20 Saxophone Tricks of the Trade by Mario Cerra changed it status to in Review. Just a few hours later it was processing for the App Store and is now Ready for Sale.

As I’ve explained on the recent post: How to find out the App Store Average Review Time, developers can submit their App Store review waiting time by tweeting using the hashtag: #iosreviewtime

…which I will tweet in a few minutes 🙂

60 Top Hat Piano Grooves Free is waiting for review

Today we submitted the new version of 60 Top Hat Piano Grooves Free.

I added 4 modules that are available as in-app purchases,using the method I described on my previous post In App Purchase

60 Top Hat Piano Grooves is a great piano app for piano students and players who want to improve their comping technique in many different styles.

We will see how long it takes…

60 top hat piano grooves   60 top hat piano grooves purchase

In App Purchase

Now that 20 Saxophone Tricks of the Trade is waiting for review, I will add a In App Purchase feature on some of my big apps and make a small version (or free in some cases) of them with limited access and let the user decide if they want to add more features to them by purchasing “modules” within the app.

My current full version is ready for sale on the App Store, and it contains two volumes in one app :

rhythm app “Rhythmic Vocabulary for All Instruments – Fundamental Studies”

I want to make a Volume 1 (only) version and let the use decide if they want to purchase Vol. 2 within the app

At the moment this is what apple have for a tutorial :

Here’s my own version on how I did it:

Setting it up

  1. I copied the xcode project folder of the full version of the app to another folder.
    Then opened the project with xcode and rename the box Identity and Type and accepted the changes offered by xcode
  2. Next I went to the Apple Developer IOS Provisioning website and created a new Identifier for this new version of the app.
    For the Bundle ID I used and Explicit App Id com.mdecks.xxxxx (xxxx being the name I used for the Identity and Type, it doesn’t have to be the same but it is easier this way)
    Make sure the In App purchase option is checked
  3. Then created two provisioning profiles for that ID. One Development and one Distribution. Download them and double click the files to add them to xcode
  4. Now go to the iTunes Connect website and create the record for the app linking it with the ID I created on the developer site.
    There you can fill as much info as possible. Description, Icon, Screen shots (if you have them already, etc)
  5. Then go to the In-App Purchases tab for that app and create a new one. In my case is a non-consumable one since once the user’s paid for it it will be available without expiring.
    There you will have to choose a reference name, and ID, choose the price and add a Language for every language supported by the app (which in my case is two English and Spanish)
    Also you have to select Clear for Sale: YES.  You can upload a screen shot later on, before submitting the app
  6. In order to test the In-app purchases in XCode you need to create a sandbox tester user which is done also in iTunes Connect. You can access this on the main page where it says Users and Roles.  I created a couple of them, you can use any emails and names, they do not have to be real ones, just remember the email and password
  7. Ok. Back in XCode go to the Build Settings and change the provisioning profile to the one you’ve created for development. If you did it right then in the General tab the Identity shouldn’t show any problems.
  8. Enable In-App Purchase in the Capabilities tab

Implementing it

  1. There’s an amazing tutorial by Ray Wenderlich with a sample code download. I suggest you read it since is very well put together.
  2. In Ray’s solution there’s a class that takes care of all the In-App purchase methods and events. Then you create a subclass of that one and tweak it for your products and needs, and a TableViewController subclass that will show all the In-App purchases IDs you’ve created for your app, letting the user buy any of them from that table. There’s also a restore button to retrieve the in-app purchase IDs that have been purchased by the current user (very useful when the user has deleted the app and reinstalled it)
  3. Note 1: One of the things I was confused about was the productIdentifiers. When I tried the first time I got an  in-app purchase invalid product. I finally got it working by just using the ID for each in-App purchase as shown in iTunes, without any prefixes (just the productID that’s it !)
  4. Note 2: The simulator in XCode did retrieve the list of products without a problem, but to try the entire purchase process you must run your app in a real device, (previously signing out of the App Store) and then at the moment of purchasing use one of your SandBox Tester Users (and it will show as such in the alert dialogue on your device)

That’s all. Now the app is waiting for review on the app store

rhythm app “Rhythmic Vocabulary for All Instruments – Fundamental Studies”

I also added some in-app purchases to the guitar app which is also waiting for review on the app store:

guitar app “60 Top Hat Guitar Licks Vol. 1”

And I am working on adding 4 modules of in-app purchases to the free version of my piano app:

piano app “60 Top Hat Guitar Licks Vol. 1”

Waiting for review on the App Store…

I just finished submitting a new app to the App Store:

20 Saxophone Tricks of the Trade by Mario Cerra.

Mario Cerra is an unbelievable jazz saxophone player  ( I met Mario a few years back when we were studying at Berklee College of Music in Boston) and I asked him to share 20 of his tricks and concepts when improvising at the saxophone, with the hope of creating a great Mobile app with video tutorials, demos, scores and backing tracks for practicing.

I should add, I’ve just finished my piano app a couple of weeks ago, and is already available on the App Store, got a few nice reviews and we are waiting to see how it does on the App Store.

60 Top Hat Piano Grooves Vol. 1

We’ll see what happens with mDecks Music