OHO's Blog

My 2 cents about everything!

How to Debug Xcode 4 iOS6 App on iOS7 Device

Nowadays, it could happen that you are about to release an already iOS6 designed application. And changing right now for a full iOS7 compatible app build on Xcode5 might be a bit tricky and time risky!

This said, if you are about to release an iOS6 designed app now with Xcode4 (Xcode 4.6.3 for instance) that does not mean you don’t have to make sure it work nice on iOS7. I would even say at this point that you have to make sure your app behave correctly on iOS7…

Here’s a quick trick to run your Xcode4 project on iOS7 Simulator or debug your Xcode4 project on a iOS7 device.

WARNING: SO FAR THIS DOES NOT work anymore on latest Apple Xcode 5 Developper Preview!!!

Trying it might brake your iPhoneSimulator config

See comments section …

First, Xcode4 and Xcode5 can safely be installed together

Since few Xcode releases, it’s now possible to safely install different versions on your Applications folder (Xcode is sandboxed). So that you can switch from the 2 versions of Xcode depending of your needs. This said, I would recommended to run only one at a time to make sure you does not get confused. And you also should make sure you don’t open an Xcode4 project with Xcode5 if you plan to build an app for release using Xcode4 (you never know what changes Xcode is making on your behalf to your project).

Move your Xcode5 iOS7 SDK to your Xcode4 folder

This is very easy.

Just locate iPhoneOS7.0.sdk and iPhoneSimulator7.0.sdk from your Xcode5 folder:

And copy it to the appropriate place on your Xcode4 folder:

Once done, you are ready to launch your project under Xcode4 and run it either on iOS7 iPhone Simulator or on your iOS7 device using debug mode.

Make sure you uncheck latest iOS SDK

Off course, moving your iOS7 SDK to your Xcode4 folder will set by defaut latest iOS SDK to iOS7. This is something you probably don’t want to do, and need to change.

Comments