2

I've seen similar questions to this but not too many definitive answers...

I used to have a version of Xcode (not sure where I got it) that would only target iPhone OS 3.1.3 devices and since I like to work with the least common denominator, this was cool with me. Recently I upgraded to the latest SDK so I can test my code on OS 4 as well. Now the lowest iPhone OS target I have is 3.2 but I have the original iPhone and according to iTunes 3.1.3 is the latest version for that device.

So right now I can't upgrade my phone to 3.2 and I can't set my target in Xcode to 3.1.3. What do I do? Should I reinstall the old SDK but at a different path?

It seems like Apple is trying to phase out the original iPhone altogether but that seems absurd to prevent developers from targeting a device that clearly still has it's place in the market.

Thanks

AuxOne
  • 45
  • 3
  • The answers to this question may apply here: [Support legacy iPhone users](http://stackoverflow.com/questions/3088624/support-legacy-iphone-users) – Brad Larson Sep 01 '10 at 02:35
  • Also, see this question: [How To Make iPhone App compatible with multiple SDK (firmware) versions](http://stackoverflow.com/questions/3027120/how-to-make-iphone-app-compatible-with-multiple-sdk-firmware-versions) – Brad Larson Sep 01 '10 at 02:37

1 Answers1

2

In your target and project settings, in your Build configuration, set the Base SDK to 4.0, then scroll down and set the iPhone OS Deployment Target to 3.1.3. Installs apps just fine on my old 3.1.3 devices.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153
  • There may be a little more involved in order to get applications to run correctly on the old OS. For instance, UIKit (and certain other frameworks) may need to be weak-linked to prevent runtime errors from unresolved symbols. – Brad Larson Sep 01 '10 at 02:38
  • @brad-larson: If he recently upgraded his SDK, his legacy projects shouldn't have any links to the new frameworks (unless he was doing something very strange or advanced with the old SDK). – hotpaw2 Sep 01 '10 at 05:18
  • In the Build Configuration of both my Project and Target I only see the option for "Base SDK". In the "Deployment" section of this screen the closest thing I see is "Mac OS X Deployment Target". There is no "iPhone OS Deployment Target". – AuxOne Sep 01 '10 at 13:42
  • Edit; I found "iPhone OS Deployment Target" option eventually. Thanks! – AuxOne Sep 01 '10 at 13:57
  • Even if the application does not use any new APIs from 4.0 or 3.2, it may still link in symbols that are not present in 3.1, requiring weak linking of certain frameworks. See this question as an example of what can happen: http://stackoverflow.com/questions/3313786/ios-4-app-crashes-at-startup-on-ios-3-1-3-symbol-not-found-nsconcretestackblo – Brad Larson Sep 06 '10 at 15:48