tags:

views:

128

answers:

2

I upgraded to Xcode 3.2.3 with the latest iPhone SDK version 4 and I know that in order to publish in the App Store, your app has to be iOS (SDK 4) ready.

But many of my beta-testers (including myself) are still running OS 3.1.x (the last version) and may not upgrade to iOS4 because it slows down their phone to a crawl (mostly for those with 3G, not 3GS). I had initially upgraded to 4.0 too but it was so painful that I had to revert back to 3.1.x just so I could use my phone.

Is it possible to create builds of an app to run on the older OS with SDK 4? When I tried it myself, iTunes told me that my phone's OS is an older version and it won't run it.

In XCode, I only have two possible values for Base SDK - iPhone Device 3.2 and iPhone Device 4.0. When I tried changing the Base SDK to "iPhone Device 3.2", I got this build warning:

warning: building with 'Targeted Device Family' set to iPhone only ('1') not supported with SDK 'Device - iPhone OS 3.2'.

On my machine, under /Developer/Platforms/iPhoneOS.platform, I have two SDKs listed (which match the Base SDK options shown in XCode):

Developer/SDKS/iPhoneOS3.2.sdk
Developer/SDKS/iPhoneOS4.0.sdk

Under the DeviceSupport/ folder, I have the following versions:

3.0
3.1
3.1.2
3.1.3
3.2
4.0

Is it possible to create builds for my users running non-iOS4 versions or do I have to force them (as well as myself) to live with the slowness on the phones?

+1  A: 

I have the latest Xcode as well, and with my Base SDK set to iPhone Device 4.0, and I am able to deploy to my iPod touch with 3.1.3 just fine. My Targeted Device Family is set to iPhone.

In this configuration, I have also deployed to iPad and iPod touch with OS 4.0 on it, without changing any settings. Just make sure that you have created a provisioning profile with your devices.

BP
When I had iOS 4 on the target device, I was able to install and run with the provisioning profile that was created. But since the downgrade to 3.1.3 on the phone, iTunes won't let me copy the app so it can install.
Justin Galzic
@Justin: It does not matter if your phone is running 4.0. The SDK is not the same as the OS. You can compile with SDK 4 and target devices of any older OS, as long as the commands you use were available in that older OS (and most of them probably were). Just use "Base SDK" of 4.0 and "IPhone OS Deployment Target" of whatever oldest OS you want (3.0 for example is a good choice).
Rab
After I copied the .app file to iTunes and try to sync, I get the error message, "The application [aaa] was not installed on the iPhone because it requires a newer version of iPhone software"
Justin Galzic
Yup, what Rab said is right, I totally forgot about that setting. Mine is set to iPhone OS 3.1.3.
BP
A: 

In the Project Info, under build: Just use "Base SDK" of 4.0 and "IPhone OS Deployment Target" of whatever oldest OS you want (3.0 for example is a good choice). Scroll down until you see "iPhone OS Deployment Target."

Rab
This was exactly the configuration I needed to change. Thanks!
Justin Galzic