I recently upgraded my iPad to iOS 6.0, but kept my Xcode install at version 4.4.1 and iOS SDK 5.1, since we are about to package up a client app and don’t want to take the risk of switching SDK’s/iOS versions this late in development.
Now this iPad no longer shows up in the build target list with it’s full name, it just says “iOS Device”. And when I attempt to deploy on the iPad it informs me: “Xcode cannot run using the selected device. No provisioned iOS devices are available with a compatible iOS version. Connect an iOS device with a recent enough version of iOS to run your application or choose an iOS simulator as the destination.” The Organizer also tells me the version of iOS on the iPad doesn’t match any version of the SDK in Xcode.
This is all correct, but shouldn’t I be able to deploy a 5.1 app to a device running 6.0? Apps which I’ve previously built using 5.1 continue to run fine on this device, why shouldn’t new apps do the same? Am I having a weird issue, or is this normal behavior in Xcode?
Thanks!
Edit: Follow-up question: if I upgrade my version of Xcode to solve this problem, can I still build for the 5.1 SDK and be absolutely certain the app will work on my client’s 5.1 devices? That’s my main concern.
You can still deploy the older apps but not using Xcode. Instead, you’ll need to create an ipa archive and install it either via iTunes, or using a tool such as Testflight or some other over the air (OTA) distribution.
Alternatively, yes you can upgrade your version of Xcode. However, you may then have further issues as third party libraries you use may not have been compiled for armv7s. So you would then need to upgrade them. If that’s the case you’ll see this error from the linker:
For more info on that specific problem see elsewhere on stackoverflow, e.g.
File is universal (three slices), but it does not contain a(n) ARMv7-s slice error for static libraries on iOS, anyway to bypass?
None of this of course stops you from working in the simulator.
However, running on the device, all in all, a good solution that works for me has been to download the Xcode 4.5 dmg. Since Xcode has become available from the App Store, it’s now a self contained package. You can now have multiple versions happily coexisting on the same machine.
I do that and use Xcode 4.5 for new iOS 6 stuff whilst I continue working on older apps with 4.4.