Saturday, May 31, 2014

iOS 5.1 in Xcode 5.1 in Mavericks

I appropriated our neglected company iPad, because I had to test my app and this was the only iPad I was able to get my hands on. Unfortunately, it was the 1st generation. I updated it to latest iOS available, but it wasn't recent enough - 5.1.1.

In Xcode it's possible to set Deployment target for the app as low as iOS 6.0, but that's it. Therefore the iPad wasn't even in the selection of devices for testing. I read in Mavericks it's not possible to build for iOS 5.x, which I found out it's not exactly true.

The trick is quite simple. Do not rely just on the list of target iOS version, simply TYPE IN the required version, you can go as low as 5.1.1. Since then you can build apps in your latest OS X and latest Xcode for the very first iPad as well.

I had troubles to run my apps on the iPad though, it kept saying it can't find the storyboard. In Targets > Build Phases > Copy Bundles Resources I indeed had both storyboards red.

The solution is to click on the storyboard in Navigator (left column in Xcode), then in the File inspector (right column in Xcode), find Localization section and check both Base and English. Also make sure Target Membership (just below) is checked. Repeat for the second storyboard and "Supporting files/InfoPlist.strings" file. Storyboards in Copy Bundles Resources turned black.

Somebody suggested to get rid of the Base lang (Project > Info > Localizations), which in my case went to losing the storyboards completely, so be careful!

No comments:

Post a Comment