iphone deployment version requirements - iphone

Is there a specific version that the deployment requirements need to be set to in xcode to submit an app to the app store? I keep getting a "not accepting this SDK" error when I try to upload the binary but my target deployment OSs are all recent (3.0, 4.0).

Make sure your Base SDK is 4.0. Deployment Target can be whatever minimum OS your app requires.

Make sure you have installed an official release of the SDK. Apple does not accept submissions from pre-release SDK's unless expressly stated (e.g. 4.0 GM)

Related

iOS deployment target

IF I set the deployment target for my app to iOS 4.2 when submitting to app store, will users with iOS 3.2 (or anything below 4.2) be able to download and install the app and the app won't run or will they not be able to download and install the app itself?
Thanks.
They won't be able to install and run the app (until they upgrade the OS on their device to that of the Deployment Target or above). But they might be able to buy and download the app using iTunes on their Mac or PC.
No, that's exactly what deployment version is about.
Best practice is to build against latest SDK version, with deployment version as low as possible. But that requires the discipline to do runtime checks and fallback implementations whenever using a API that wasn't there yet in the deployment version.

when deploying an iOS app for an older SDK, how to test it?

I have written an app and its base SDK is set to 4.2, and at the moment it is in the app store with a deployment target set to 4.2, I'm sure you'll agree this is a bad idea because I am alienating all potential users who do not have the latest version of iOS installed.
So my question is, when deploying for an older version of iOS, how do I make sure it will run, i.e. how do I check whether I've used any modern API's that are not present in the deployment target iOS version?
The only sure-fire way to make sure your app will run is to test on a device running the older OS version you specify.
Even old versions of the iPhone Simulator (if you can find such) will not do a good job of checking for compatibility.
Most developers who want to support customers on iPhoneOS 3.x have access to an old test device, such as an used iPod Touch (hand-me-down, or purchased on eBay, etc.) running the OS version set in the app's Deployment Target. Otherwise, the developer is just guessing/gambling.
Check the documentation of the libraries or methods you are using. Test on the actually device installed with the version of the OS you wish to support.
Change the Base sdk version to 4.2, target sdk to 3.0 or any.
test the app in simulator as the target as simulator 3.0 r any.
But, when compared to 3.2 , 4.2 version has many new functionalities that do not work on 3.2 version devices.
So take respective steps to do for 3.2 r for 4.2.
The better idea is to find the version of the device , then give the accessibility based on the version.
Thanks,
Bharath

Which iPhone SDK should I use?

I have little knowledge about how to make application to compatible to a device.
I have iPhone SDK 4.0 and want my app to run on iOS 2.0 or later.
I have read that set only the iPhone OS Deployment Target to 2.0 and use only those API methods which are common after 2.0.
Is it enough?
or do I have to use another (lower) SDK?
or do I have to do something more...?
You should always be developing with the latest SDK. You can set this in your project's properties under "Base SDK" in the "Architectures" section of your project's settings (right click on the project in the organizer, and go to "Get Info").
However, to make sure that your app runs on older devices, you would do this by setting the "iOS Deployment Target" to iOS 3.0 under the "Deployment" section of the project's settings.
For the record, I said version 3.0 above because that's the lowest possible supported version that I see in my Xcode. I don't think it's possible to target 2.0 devices anymore.
The newest Sdk. Apple may not accept the Sdk create by old Sdk.
You can target your min required version os for your App even you are using latest version Sdk.

iOS4 Compatibility for iPhone App

I want to upgrade my iPhone app from iOS3 to iOS4.
Once I upgrade to iOS4, which versions of previous iOS does the app support?
For eg. will it support iOS3, iOS2, etc.
Thanks!
It will depend on what features you implement. If you implement a feature that is specific to iOS 4 (like in-app sms), then that feature will not run on previous versions. In some cases this may cause you app to not function on old versions. Make sure the feature is available at runtime before you try to use it.
In your target's build settings there is 'Base SDK' and 'Deployment Target'. 'Base SDK' is the newest iOS that you want to compile for, while 'Deployment Target' is the oldest iOS that you want your app to function on.
You can set the Deployment Target of your application to the base version of the SDK that you want your app to be compatible with. Once set, your app will be compatible with all versions of the SDK from the deployment target through the current version.
The iOS 4 SDK can build an app that'll run on iOS 3.0—by setting the project's Deployment Target to same—but no earlier. On the other hand, just about nobody is still running 2.x, so that limitation isn't likely to be a problem.

iTunes Connect rejects my binary because I used a pre-release version of the SDK, what should I do?

I downloaded a pre-release version of the iPhone SDK and tried to update one of my existing apps using a binary I built with it. Obviously you are not supposed to do this but I had forgotten about the warning when I installed the pre-release SDK. Anyway - I have two questions:
Can I simply set the base SDK to an earlier version in the build settings and get around this problem?
If not, then what should I do?
You need to download the release version of Xcode with the release iPhone SDK. You can't use the SDK downloaded from the iPad beta version for any release products.
Just go to http://developer.apple.com/iphone/index.action and click on iPhone SDK 3.1 and download it. Then build your app bundle with that and submit it to Apple.
Before you download a pre-release version of the SDK from developer.apple.com, there are several prominent warnings, one of which clearly states that pre-release versions of Xcode / iPhone SDK can NOT be used to build production binaries. So the answer to 1. is an emphatic no.
As far as I can tell, the only option to be able to build production binaries that iTunes Connect will accept is to delete the pre-release version of Xcode / iPhone SDK and re-install the older stable version.
If you upgraded using the beta download (as opposed to installing on a fresh box that has never seen SDK or Xcode), set the base SDK to a released version of the OS. Compile a Distribution build, submit to the app store. The old SDK is still there, so that will get used. All of the prominent warnings I have seen state the the SDK cannot be used, without mention of Xcode.
Before anyone scoffs, note that I submitted an app on March 13 using the version of Xcode (3.2.2) included in Beta 4, setting Base SDK to 3.1. It was approved on the 15th. I've also done this during the 3.0 beta for 2.x apps.
EDIT: on the other hand, acceptance apparently isn't always guaranteed (note that this person had also submitted an app that did get accepted): The binary you uploaded was invalid. A pre-release beta version of the SDK was used to build the application