2

After a recent question of mine (https://apple.stackexchange.com/q/116029/7742), here is some info:

My app was developed using Xcode 5, iOS SDK 7. Deployment target is 4.3.

I was told that the 4th generation iPod touch can't run iOS 7.

Since my app has a deployment target of 4.3, then it should run on that iPod, right? Or does the fact that I used the SDK 7 mean that it won't work?

Community
  • 1
  • 1
Saturn
  • 17,888
  • 49
  • 145
  • 271

2 Answers2

1

iPod Touch, 4th Gen DOES NOT support iOS 7. See this Wikipedia article.

You CAN use Xcode 5 to build an App with a deployment target of 4.3, but that means you CANNOT use any iOS feature supported only by versions of iOS > 4.3. And you will have to be VERY CAREFUL to check that you don't, or the App WILL crash.

And... unfortunately there is no Profiler or Pre-Processor that warns... although you can double check if Xcode "Analyze" warns you. Else you just have to very carefully check all your code for conformity with the limitations of the 4.3 SDK or test a lot... well actually do both.

Cliff Ribaudo
  • 8,932
  • 2
  • 55
  • 78
  • If I were using a feature unsupported by iOS 4.3, then Xcode would tell me right? – Saturn Jan 04 '14 at 20:02
  • 1
    @Omega: Unfortunately not. Xcode does not check if your code use only methods available in the selected *deployment target*. (Don't ask my why, I tried to discuss that with Apple developers at the WWDC, but to no avail.) - I have seen a solution that achieves this check by re-defining the Availability macros, but I am not sure if I will find it again. – Martin R Jan 04 '14 at 20:08
  • Nope... see my amended answer above – Cliff Ribaudo Jan 04 '14 at 20:08
  • @Omega: This is what I meant: http://stackoverflow.com/a/8993138/1187415. But I don't know if that still works with Xcode 5 and the current iOS versions. – Martin R Jan 04 '14 at 20:14
  • Don't know. I'm always cautious when it comes to touching ANY of Apple's source.... but I suppose you could do it temporarily just to check. – Cliff Ribaudo Jan 04 '14 at 20:19
  • Hands off my post Scott! Your edits are NOT material, and I used Caps for a reason. – Cliff Ribaudo Jan 05 '14 at 20:20
0

A deployment target means that the should work on devices running that deployment target iOS version (or later). (So, if your deployment target was 4.3 and the device is running an iOS version of 4.3 or greater, you should be fine.) The fact that you used Xcode 5 and the iOS 7 SDK will not affect this. The only limitation is that we cannot use the latest compiler to build for iOS versions prior to 4.3 and/or the first or second generation hardware.

Clearly this assumes that you didn't accidentally reference any classes or methods that require later iOS version (or if you decided to avail yourself of new features, that you put in runtime checks to only use those new methods/features if they were available). Try running your app on an iOS 6.0 simulator to confirm compatibility with iOS 6. (Note, Xcode 5 no longer includes the simulators prior to iOS 6.0, so if you really want to test against earlier versions, such as iOS 5.0 or 4.3, you might just want to get your hands on some old device with that older iOS version.)

I mention getting an older device, because compatibility with the old iOS version is not enough. You want to ensure your app can run on that hardware (e.g. doesn't require more than the 4th gen 256mb of memory, cellular, etc.). You really should find yourself physical hardware with older iOS versions upon which you can test your app.

Rob
  • 415,655
  • 72
  • 787
  • 1,044
  • But testing on older iOS releases becomes more and more difficult. Xcode on Mavericks does not even support the iOS 5 Simulator. – Martin R Jan 04 '14 at 20:10
  • @MartinR Agreed, but he was talking about 4th gen (which supports iOS 6), which is why suggested testing on the simulator at the very least. But to your point about the loss of the 4.x and 5.x simulators, that's why I keep old hardware sitting around, for when I really want to test something on those older iOS versions. – Rob Jan 04 '14 at 20:26