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

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.

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).

How to fix "Apple is not currently accepting applications built with this version of the SDK." error for distributing an iOS SDK 4.2 app

This is very similar to a couple of other questions on stackoverflow, but they all seem to be from last year and referring to lower version numbers.
I have:
xcode version 3.2.5
A distribution build with Base SDK = Latest iOS (currently set to iOS 4.2), iOS Deployment Target = iOS 3.2
I've tried the following without much luck:
Deployed to a device (not the simulator)
Setting the iOS Deployment target to 3.0, 3.2, 4.0, 4.1 and 4.2
Cleaned my xcode cache
Deployed through Application Loader and Organizer
Did a clean build
Reinstalled xcode <-- turns out this was the problem - need to check that it's the final version (ie, xcode_3.2.5_and_ios_sdk_4.2_final.dmg) and not the beta version
Tried finding a version of the SDK < 4.2 to install, but apple seems to remove all old versions from their developer site
I'm sure iOS 4.2 should be out of beta now, so I don't think this is the issue either.
Any other ideas? Is there any way of getting more information about the versions of the SDK that apple want?
Very frustrating indeed!
I had this problem yesterday and solved it by redownloading XCode from the developer center and reinstalling it. For some reason, the dmg file on my disk was from 19th of November (no, it was not a beta), and the release date of the SDK is 22nd on the iOS Dev center. Check if your local copy was downloaded before that. It just automagically worked after a reinstall. I built the binaries against SDK 4.2 and set the deployment target to 3.1 if that helps.
I am not sure at the moment, did apple rerelease SDK 4.2 with XCode 3.2.5 at some point without changing the version? Anyway, hope that helps, it worked for me.

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

Upgrading iOS SDK

I've XCode 3.2.3 with iOS SDK 4 installed in my iMac. I bought an iPhone 4 with OS version 4.0.2 and I would like to use that device for development. However the Organizer shows the message below when the device is connected.
The version of iPhone OS on “iPhone 4G” does not match any of the versions of iPhone OS supported for development with this installation of the iPhone SDK. Please restore the device to a version of the OS listed below, or update to the latest version of the iPhone SDK.
Currently my XCode supports Base SDK from 3.0 to 4.0.1.
So if I download the latest XCode 3.2.4 with iOS SDk 4.1, will I still have Base SDK support from 3.0 ?
Cheers
Jugs
No, XCode 3.2.4 does not come with SDK 3.0, it comes with SDK 3.2 and 4.1. But you don't need the 3.0 SDK to write apps that will run on 3.0.
There are two versions that are important to you as an iOS developer, and you need to understand them: first, there's SDK version that you link to, this is the Base SDK. It should normally be set to the newest SDK available.
And then, there's the Deployment Target. That is the earliest version your app needs to run on. This is the one you are actually caring about, this one ensures that your app will still run on earlier iOS devices.
To set that, go to "Project -> Edit Active Target". In the dialog, select the "Build" tab, make sure "Show" is set to "All Settings" and the type "deploy" in the search field. Scroll down to the "Deployment" section, the last entry should be "iOS Deployment Target". You need to set this to "iOS 3.0" or whatever suits you. You should now get warnings if you use methods or classes that are not available on 3.0.

Simulate iPhone 3.0 with SDK 4.0

i have xcode 3.1.3 and xcode 3.2.1 installed
For sure now I use 3.2.1 with Sdk 4 to develop new apps.
But what if I like to test a App compiled with sdk 4 on a
simulated iphone that would just have 3.0??
As BaseSDk i use 4.0 and as target 3.0
In xcode 3.1.3 i could select a simulator down to 2.x but with sdk 4.0
i only have the option 4.0 iphone or 3.2 ipad
Example> i know iAd is not supported before 4.0 so I set the
framework to weak. But just to be sure all works fine I really
would like to test my app in a simulator that simulates an iphone with 3.0
thx
chris
The new simulator does not seem to be able to run the old simulator OSs (3.2 being the oldest it'll run). I tried moving them over from old SDK installs and several variations and "no go".
You can check that you aren't using methods defined in the new SDK, when you set the base SDK to 4.0 but set the Deployment to to 3.1.3, for example. For a blog post on how to do this see this blog post, and note my comment on an easier way to do the last two steps (no need to edit the project file as a text file).
inside the iphone sdk dmg file, there should be a folder called packages. in it, you'll find packages like iPhoneSDK3_0 and iPhoneSimulator3_0. Install them to be able to use them in xcode.
Correct me if I'm wrong, but I think a device with 3.0 installed can't even run apps compiled with 3.2 or 4.0. Furthermore, Apple now only accepts iPhone apps (including updates of existing apps) linked against the 4.0 libraries, which won't run on OS version 3.0 devices.
So why do you want to test your app on a 3.0 device?
Try setting the architecture you want to build for in the Xcode project preferences and rebuilding.
If this doesn't work, completely uninstall Xcode and downgrade. You have to completely uninstall because your system must have updated the frameworks for 4.0.
Hope this helps