Running iOS 3.x app on iOS 4 - iphone

I had developed an app with base SDK version to iOS 3.2.3 and deployment target as iOS 3.0 .
However, when I have updated my app now, and tried the ad-hoc build to install it on iOS 4 device, it is failing.
Please suggest if I have to make another build with latest base SDK version or I can stick to my current build?

Always build against the latest SDK version and set the Deployment Target according to your needs.

Related

How can I build an application for iPhone OS 3.1.2 using the current Xcode?

I have an iPhone running the 3.1.2 firmware and would like to build applications for it. However, I can't find Xcode 3.2.1 with the iPhone OS 3.1.2 SDK at Apple's developer site.
How can I build an application using the current SDK and Xcode versions that will run on this older OS version?
Use the current tools and SDK. Set the "Base SDK" build setting to "Latest iOS" and set the "iOS Deployment Target" to whatever version you want to target, such as iOS 3.1.2.
The only gotcha here is that the compiler won't warn you if you use something from the SDK that was introduced after iOS 3.1.2, and if you do your app will likely crash. So, you'll want to check the docs for each method you use that you don't already know for certain is available in 3.1.2, and you should test your app thoroughly.
Unless there is some unmentioned reason you need the older version, you can use the latest Xcode and just target the build for the old iOS.
If you are a member of the Apple Developer Program (which you need to be in order to download any version of the Xcode and iOS SDK), you can download Xcode 3.2.6 w/ iOS SDK from the main 4.3 from the iOS Dev Center home page. Under the section for Xcode 4, there's a small line saying "Looking for Xcode 3? Download", which takes you to this download page.
Of course, that still requires you to develop using the 4.3 SDK, so you have to be carefull when targeting 3.1.2 devices.
You can purchase Xcode using the Mac-App-Store or by subscribing to the iPhone Developer Program ($99 per year).
Get the latest one (XCode with iOS SDK 4.3) and select 3.1.2 for the deployment iOS Version (under build-settings).

Xcode SDK IOS 4.2 installation and missing iOS 4.1 in build settings

i have download Xcode SDK 4.2(xcode_3.2.5_and_ios_sdk_4.2_final.dmg) from Apple developer site and installed successfully . when open my old xcode project it shows baseSDk missing ,when i try to change project setting ,i have found and set base SDk as 4.2 it works fine
my problem is ,in Base SDk list it shows
(iOS 2.1, iOS 2.2, iOS 2.2.1, iOS 3.0, iOS 3.1, iOS 3.1.2, iOS 3.1.3, iOS 4.2)
There is no iOS 4.0 and iOS 4.1 (which i have used before 4.2). anything wrong in my installation???? Plz help me to correct my mistake
Thanks in advance
This does happen. I generally just use the latest SDK as base SDK. You support the latest version and forget abt the older versions[apple style]. This way your app can take advantage of all the latest functionality.
One thing you must remember is that the Base SDK is different from the deployment target.
base SDK is the latest SDK your project will use and support.
deployment target is found in target->getInfo; this is the minimum version that your app will support.
4.2 is a free upgrade and most of them would upgrade, so i'd set the deployment target as 4.0 or at the least 3.0. who uses 2.x anymore?
if you really want 4.0 and 4.1 as well, you have to install the old 4.1 GM as a parallel Xcode IDE or follow this link and get support for all the versions in a single XCode IDE.
http://chris-fletcher.com/2010/08/28/howto-install-iphone-sdk-2-0-3-1-for-xcode-3-2/
I'd suggest building using 4.2 but follow the link and install all the simulator SDKs for old versions so that you can test the app on those versions of the simulator.
Nothing went wrong here. That's how Apple forces the developers to always use the latest SDK to develop.

Change build with iOS 4.0.1

Hey,
Am writing an iOS application and want to build it so it will run in iOS version 4.0.1 or later however the only SDK I have installed is iOS 4.2 and am unable to select an earlier version. Does anyone know how I change it so that I can build against earlier versions?
Thanks,
William
You always want to build with the latest SDK, to change which devices you can deploy to simply alter the "ios deployment target" on the project properties to iOS 4.0 or similar

iOS 4.0 and 3.0 on one mac

I have just submit my app to the App store, and received many comments that the application crashes on startup on older iphones. The deployment target was set to 3.1.3 and base sdk to 4.0. I thought I didn't use any api from 4.0 so the only problem could be three20 library.
Now I have two xcodes installed on my computer. After some changes my project can be build both in the newest one (3.2.3), and in the 3.2.1 with the base sdk set to 3.1.3 and deployment target to 3.0. My app works in iphone simulator in both xcodes and all versions (ranging from 3.0 to 4.0).
Now my question - if my project can be built with base sdk set to 3.1.3, will it run on the real device if I build it with 4.0 and choose deployment target to 3.0? I have only access to real device with iOS 4.0 and no other way to check whether everything is ok.
with the 4.0 sdk you can set the deployment target to 3.0 and the base sdk to 4.0 and it should be fine. If you have the old simulator installed still you could then run this build (don't rebuild from the 3.1.3 base sdk!) on the simulator to test it there, although having an old device would be ideal.

iOS 4 Build SDK

I installed the iOS 4 SDK yesterday. I previously had the 3.1.2, 3.1.3 and 3.2 SDKs installed. Since installing the iOS 4 SDK, I only have 3.2 and 4.0 available in Xcode. When I load an Xcode project that was targeting an older version (say 3.1.2), it says "Base SDK Missing" in the toolbar.
I've been able to reset the project to target iOS 4 instead - and have successfully built. However, I need to do some ad hoc builds for users who may not have iOS 4 installed on their devices yet. If I give them a build that was done for iOS 4 (not using any iOS 4 features - it's the same code I used to build with 3.1.2), will this execute on their device ok?
Unfortunately I don't have any non-upgraded devices to test this on myself!
Thanks,
John
To target older iPhone OS's with the new iOS 4 SDK, Select your XCode project -> Get Info, and then select "iPhone Device 4.0" as the Base SDK, and then select the lowest iPhone OS version from iPhone OS Deployment Target that you need to support with your ad hoc app.
You needed to install XCode beta to an alternative folder /DeveloperBeta (for example) and use the stable xcode for older SDK builds.
You can still do that actually.