Friday, April 10, 2015

XCode 6.2 with IOS8.3 devices (Swift 1.1 / 1.2 problem)

If you need to debug Apps on an IOS 8.3 device, you must use XCode 6.3.

If you are in the situation that you have this very important Swift 1.1 based application to show your customer now, and not the time yet to migrate it to Swift 1.2, you must stick to XCode 6.2. But that does not work. You receive a "Device not eligible" error or "platform directory not found" error.

To debug / deploy your Swift 1.1 application to an IOS 8.3 device with XCode 6.2, there is a workaround.

1. Archive old XCode 6.2

In Finder, go to /Applications and archive This is an important step, as we need to unpack it after the upgrade to XCode 6.3

2. Update XCode to 6.3

Upgrade XCode to 6.3 using the App Store application.

3. Rename XCode 6.3

After the upgrade, rename to

4. Unpack XCode 6.2

Now unpack the zip file created in Step 1. Afterwards, you have 2 Xcode applications in /Applications, the old (6.2) and

5. symlink IOS 6.3 Device Support into Xcode 6.2

Open and enter:

  cd /Applications/ 

 ln -s /Applications/\ \(12F69\)/ 

 sudo chown -R root:wheel /Applications/

This sym-links the IOS 6.3 platform directory from Xcode 6.3 into Xcode 6.2.

6. Start Xcode 6.2 and run your app on an IOS 8.3 device 

Start /Applications/ and try to run your application on an IOS 8.3 device. If you still receive the "Device not eligible" error, click on  Product > Destination > "Your Iphone" and try again.
It might be possible that you need to issue new provisioning profiles the first time you run the app on IOS 6.3.

7. select the command line tools

If you use Carthage, you may perform xcode-select to select the Xcode 6.2 build tools, otherwise your Carthage dependencies fail to compile. Do not forget to switch it back to 6.3 if needed.

#> sudo xcode-select -p   # print currently selected xcode commandline tools
#> sudo xcode-select -s /Applications/

For sure the best fix is to migrate your Swift 1.1 application to Swift 1.2 asap and work with XCode 6.3.