What should be minimum deployment target set for iphone application while releasing it to App strore? - iphone

Hi I am new to the iPhone App development. Currently I released a small application to App store having deployment version 4.3. But some users are not able to download and install the app due to version compatibility. I searched on internet but I didn't get much solution. Now what version should I set while deployment so that every user can use the application?

You should set your minimum deployment version according to API methods you use in your app, i.e. if you use methods from iOS 5 SDK and don't make your app backwards compatible (with support for older versions of iOS), you should set min deployment version to iOS 5. How would you care about users who don't have newer iOS installed is another question.

Deployment target is the minimum version of iOS that is going to be supported by the application. It means iTunes store will allow the users downloading this application having same or higher iOS version on their devices.
To achieve it developer should take care while using the APIs. The API version should not be higher than deployment target iOS version. If you need to use higher API, you should use
[UIDevice currentDevice].systemVersion to check the target device version.

You should set the Deployment target to that of the lowest OS device upon which you have actually tested that version of your app. Many developers keep or borrow an old non-upgraded iOS device just for that purpose. Otherwise your customers become your alpha testers.

go for 3.0 if your code supports that,
maybe that code changes are needed.

Related

iOS app maximum iOS version support

I have developed my app in Xcode 4.1 and iOS SDK version(Base SDK Version) is iOS 4.3 So, will this app run on iPhone with iOS 5 and/or iOS 6 or not?
I think the app can be run on a higher version of the OS than the Deployment Target. Is this right? I appreciate any help.
Yes, your app will run on anything that is iOS 4.3 or newer. That is, assuming you aren't using any depreciated methods that are removed from a future iOS release. You can check if things have been depreciated/removed through the documentation.
It doesn't matter with which Xcode you build your app, the base SDK signifies the lowest system your app is supporting.
You app can and will run on newer systems.
If you want to make an update to your app, you'll need to pay attention to depreciated methods for the newer systems or you will get rejected and won't be able to update in the App Store.
Yes, it will for sure run in higher versions than Deployment Target.
However, is always recommended to run also in newer versions as they are released, to check that every API used is still running fine (specially if they were deprecated).

Upgrade iOS application to newer OS?

I am a little curious what happens in the following situation. You have an existing app on the iTunes store (with customers) that uses iOS4, you then release an update to the app that uses a newer iOS.
folks that have upgraded to the "newer iOS" will get the update.
What will happen to those that have not updated, will they still be able to use their old iOS4 version?
Your "deployment target" is what matters. Setting the deployment target allows your app to set it's minimum required OS version. Many developers like to set that as far back as possible, unless your app depends on a features only available in a new iOS version.
Lets say you have an app compiled with the iOS 4 SDK and set 3.0 as the deployment target.
Users with iOS 3 or iOS 4 (and iOS 5) can download your app and use it.
Now you release an update compiled with the iOS 5 SDK and set 4.0 as your deployment target.
Users with iOS 4 or iOS 5 can download or upgrade your app and use it.
Users with iOS 3 that have purchased your app already cannot upgrade, but they can continue to use their existing installed version.
Users with iOS 3 that have not purchased your app yet will now have no way to do so.
Apple will only keep exactly one version of your app on the app store.
Unless they download the newer version, they will of course still be able to use the old one. It's possible however that they download the update unintentionally via iTunes on the desktop. The App Store on the device itself would check if the device's OS version is compatible with the app being downloaded, but iTunes does not, so it would replace the old version in the iTunes library, leading to the app being removed from the device when the user syncs it (because the downloaded version cannot be installed).
So, for existing apps, you should keep your deployment target as low as possible and decide at runtime which additional features of a new OS version you can use. This way, you can keep compatibility with older OS versions, but still provide additional features to those who have upgraded.
Usually (although not always), new OSes are the same as the previous ones but with new features. Older versions of apps often work with the latest OS but don't take advantage of the new features. The only problem users usually have is crash problems but it all depends on which APIs you use in your app.
Additionally, updates are never 'forced' upon a user - they are always optional. When it is a case that the app only works on a version of iOS which is higher than what the user has, then the update will not be offered to the user at all. They will still be able to use the older version that they have installed on their device. Apps have no expiry date.
If you want to retain compatibility for as many iOS versions as possible, you can set your iOS deployment target to the minimum OS you want your app to be compatible on. The SDK version number should not matter, but to support the latest iOS features, you would need the latest iOS SDK.
You will still have to check your APIs compatibility with the version you are targeting as a minimum OS. Look here and search for "API Diffs". Each document lists changes to the API for that iOS version. This will lists new and removed APIs as of that version. For example, UIPrintPaper, which is listed in the iOS 4.1 to 4.2 API diffs document, is a new API to iOS 4.2. So, when running on iOS 4.1 or earlier, the app will crash when calling that API. Using #if __IPHONE_OS_VERSION_MAX_ALLOWED <= __IPHONE_4_1 around your UIPrintPaper snipper will fix that problem.

Minimum iOS target version that Apple accepts in AppStore?

I have an application that I would ideally like to run on all iOS versions, however I think Apple accepts apps only from a version and above (3.0 I think, but not sure). So my question would be, what's the minimum iOS target version you can send in review (and get accepted). If anyone with greater iOS publishing experience would answer my question it would be great and maybe point out some places where I can read about it.
Many thanks!
Sometime last year, an Apple DTS employee posted (and later clarified) on the iOS Developer Forums that the App store would no longer be accepting apps with a Deployment Target lower than 3.0. That might indicate that a lower Deployment Target has or will become grounds for an app to be rejected.
I would never set the Deployment Target lower than that of the lowest OS version among the devices I plan to use to test the app before submitting it to the App Store.
Also, the installed based of devices which haven't been upgraded to 3.0 or above might be too microscopic to be worth a developer's time or effort (unless you happen to still have and use one for some reason).
ADDED in 2013: App store submission now requires that the app support the 4" display, which requires iOS 6.0 or later, which allows a minimum deployment target no lower than iOS 4.3
To back up what hotpaw2 indicated, this is from the News and Announcements for iOS Developers on June 29, 2010:
Make sure that your applications are
compatible with iOS 4. All new
applications and updates to existing
applications must be built with iPhone
SDK 4. In addition, the App Store will
no longer support applications that
target iOS 2.x.
ok... strangely Im having a hard time verifying this... but it's my belief that you must build your app with the latest base SDK (4.0), but you can target an IOS version all the way back to 2.0. Ill continue to try to verify that.
You can only build your apps with the SDKs you have installed.
Since XCode will nuke your old SDKs whenever you upgrade (unless you install XCode elsewhere), it is assumed that you will always be building using the latest stable SDK version. This is in contrast to, say, Android, which will always retain SDKs whenever you upgrade.
Your deployment target can go back as far as you want, right back to 2.0 - but you may find it difficult to actually test it on that platform! Most people would just target 3.x upwards, which gives you as close to 100% coverage as makes no difference.

Run application on the older iphone os

my new app update runs only on 3.1.3 OS and some people who have older os [3.1.2] can't run the application on the iphone .. does it way to solve this ? and my app runs on 3.1.2 iphone os?
You need to rebuild your app update targeting the 3.1.2 OS and resubmit to the AppStore. You also need to isolate any 3.1.3-specific features you are using.
To be more specific on Franci's answer:
You need to set the Deployment Target build setting in your target's settings. Set it to the lowest version of iPhone OS you wish to support.
After doing this, you should always compile your app against the latest SDK, to benefit from bug fixes and performance improvments.
If you use any features from the latest SDK that aren't available on prior OS versions, you should weakly link to the framework in which that feature is defined, and use conditional checks to see if the API exists before using it. If the API doesn't exist at runtime, your app should gracefully fall back onto a default behaviour.
If your app doesn't use any APIs which are not in prior OS versions then you don't need to worry about that.

Base versus Active versus Deployment target

I know that parts of this question was asked in several variation but I want to make sure I got it right.
Here are my assumptions and understandings which I want to know if they are correct before submitting.
My application assumes features supported by all OS, and so I should:
Set the Active SDK to be the latest (currently SDK 3.0).
Set the Deployment Target to be the lower I want to be supported - iPhone 2.0 and higher?
What exactly is the Base SDK for? should I ignore it if I chose Active SDK to be different and where do I see the Active SDK in the Projects settings?
One final question - is apple allowing to choose iPhone OS 2.0 as the Deployment Target?
Thanks in advance,
BTW - one of my main reason for this question is because when compiling with earlier SDKs apple seems to have a problem releasing the memory for UIImageView animation array when this animation was saved for multiple time usage. This is a known problem that was fixed with SDK 3.0 (by simply setting the UIImageView animation array to nil)
The difference between the Base and Active SDK is that the former is the default SDK set for the project and the latter is the SDK you are currently building against. So it is possible for your Active SDK to be the Base SDK, at which point XCode will use the SDK you specified for the project.
In order to build your app for the widest set of devices possible, you are correct:
Set the Base SDK to the lastest SDK possible (3.0, 3.0.1)
Set the Deployment Target to the earliest SDK possible (2.0)
Apple does allow you to specify iPhone 2.0 as the Deployment Target, but keep in mind any API or framework released after iPhone 2.0 you will not have available to you for use by default. There are techniques to use features from later SDKs, however they are nontrivial.
You should set the Base SDK build setting to the latest SDK that contains all of the features that you intend to use (usually, the latest available SDK), and set the "iPhone Deployment Target" build setting to the earliest version of the OS on which you want to run.
You then need to make sure that you check, at runtime, for any features that may not exist on the earlier OSes.
"Base SDK" is the Maximum SDK you application can support. There's a hard limit here - you can't select a future, unreleased SDK.
"Deployment Target" is the Minimum SDK you are willing to support. It how far back in time you are willing to go.
Xcode appear to create a spurious dependency on "Deployment Target." For example, I can't develop on my iOS 5.1.1 iPod with Xcode 4.5.2 (Xcode 4.5.2 is paired with iOS 6.0), even though the 4.3, 5.0, and 5.1 APIs and Simulators are installed on this installation. I need to use the simulator or jack in my iOS 6.0 iPhone.
The games Apple is playing appears to be causing problems with apps, too. My purchased copy of Elements will not sync via iTunes to the iPod because Elements needs a newer version of iOS to run (it syncs and runs fine on my iOS 6.0 iPhone).
I've got two iPads and one is 4.3. I shudder to think what a mess it will cause.
In general;
Set the BASE SDK to the very latest SDK you are willing to support and test.
Set the Deployment Target to the lowest version of iOS you are willing to support and test.
If you happen to use Base SDK features not available on the deployment target SDK, the app will crash at runtime on older devices, so testing is vital.
An alternative / complementary process would be to use Deploymate http://www.deploymateapp.com/ which does static code analysis to identify problems.
If you are from the android world the analogies are such;
TargetSDK -> Base SDK
MinSDK -> Deployment Target
Lint -> Deploymate