Selecting Deployment target in iOS - ios

I have an iOS application that I would like to put in the AppStore. I am however lost in the aspect of development target. I do not know if I have to set the deployment target as 11.0 or 10.0. Most of the code works good with 10.x. I would like to know if it's a good practise to set the deployment target to lower version.

Its good to use one version less than the one currently in Market. Of course if you have larger audience using you app and having lower version of iOS on their iPhones, you can choose much lower version as deployment target.

You can set it based on your choice, if you would like to cover all the users using iOS devices then you can set deployment target to 10.x OR as per the latest analytical data from the Apple, there are only 7% devices using iOS 10.x or lower, so you can ignore them too and can set deployment target to 11.x and above.
Refer here: Analytics of iOS Users

Related

Is there a restriction on how low one can set the deployment target when submitting to the app store?

I have about a 200+ iPads (1st generation), that my company uses. They work fine (like new).
The latest version of Xcode only lets you set a deployment target of 8.0.
I can download an older version of Xcode that lets me set a deployment target of 5.0 (for 1st generation iPad).
If I set the deployment target to 5.0, and submit via an older version of Xcode, will I have a problem submitting to the app store ? Is there any restriction on how low one can set the deployment target when submitting ?
The current App Distribution Guide says "For example, the lowest available setting for iPad apps is iOS 4.3." ( Setting the Deployment Target ) but my Xcode 7.1.1 doesn't seem to allow any deployment target for an iPhone project to be lower than iOS 6.0. So YMMV I guess. Basically the minimum is whatever the minimum supported Xcode version (Is Xcode 5 still allowed or does the store now require Xcode 6? I don't know) allows in the popup for the project deployment target.
One other factor - if you use Swift that limits you to iOS 7.0 and later.
Please check guideline below:
https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/ConfiguringYourApp/ConfiguringYourApp.html#//apple_ref/doc/uid/TP40012582-CH28-SW21

What does deployment target mean?

this is a very simple question I'm assuming. Can someone tell me what deployment target means. If I choose IOS 10, does that mean only users with iOS 10 can download the app. Is it bad to choose a lower deployment target? ALSO, continuing on deployment target, is it not recommended to run on a lower deployment target.
Lets say you have set minimum deployment target to iOS 9.
This means your application is compatible for iOS 9 and above devices.
The application won't run on below 9.0 devices but can run on any iOS version greater than iOS 9.0.
The deployment target determines your app's ability to run on older iOS versions.
App with deployment target set to 10 will work on iOS version 10+ (10, 11, 12, 13 ...) but won't work on 9.x.
When a new version of iOS is released, some people do not bother to update their devices to the latest iOS version and thus they can't download your app from the App Store.
Example
If you choose higher deployment target (e.g 12.1), your app won't be able to download for the people who even have latest devices but have older iOS version (iPhone X with 11.0). In Contrast If you choose lowest possible deployment target (e.g 6.0), you try to make your app maximum backward compatible (so even if someone hasn't updated their iOS in ages will be able to download your app).
CAUTION
Many (almost all) newer frameworks and features won't be able to run properly (Behave as expected) on lower iOS versions which increases the chances of app crashes.
What Affects Deployment Target
Following are few factors that demands higher deployment target.
1) Using latest iOS SDK (alone)
2) Using latest iOS SDK specific features (Constraints, newer XIB files etc).
3) Using fast adapting external libraries / Frameworks (e.g Facebook SDK, Firebase etc).
4) Higher Swift Version (5.0) requires higher deployment target vs writing your app in legacy Objective C) !Needs citation.
SOLUTION
We have been using Deploymate for maximum backward support. It mainly assists us about warning the following:
1) Newer APIs that won't work on lower iOS versions
2) Using deprecated methods that won't work on newer iOS versions.
This is when you start fixing your code to make it available for lower iOS versions for maximum compatibility.
Note: Xcode also informs about several pitfalls. Deploymate is neither associates with us or pay us in any form. You can look for other alternates.
iOS Deployment Target(IPHONEOS_DEPLOYMENT_TARGET)
Deployment Target is a minimum version of iOS which is supported by your target.
It means that:
as a developer you support this version and you are able to support all next compatibility
as a user you should have at least this version of iOS
To change it in Xcode 11.5
Build Settings -> iOS Deployment Target
//.pbxproj
IPHONEOS_DEPLOYMENT_TARGET
If you are new to Xcode, I suggest accepting the default, and thinking of it as a constraint on your project.
As newer of Xcode versions come along, support for older target values will be removed. Companies that have extensive customer bases have to deal with this problem in their own way.
In most projects I have worked on, the iOS version matters because it dictates which devices can run your application.
For example, iOS 10 essentially left behind all iPod-style connectors.

Publish apps for different versions?

Do I have to make different apps for different iOS versions?
Isn't there any backward compatibility?
You don't have to make different apps for different iOS versions. You need to set a Deployment Target that will be your lower desired supported iOS version. For example, if you set iOS 7.0, it will support iOS 7, 8 and 9 once it comes (that does not mean it won't crash for any of them if you use incompatible APIs!).
You can set it selecting your Target (blue icon with your app name in your project navigator in Xcode), in General tab, the Deployment Target:
No, you don't. iOS has backward compatibility. Just need 1 app for different iOS versions. You can set minimum deployment target for the app.

Lowering Deployment Target for my app

I created my Universal device game app in iOS 7.1 and there for have my deployment target set to 7.1.
I currently use both iPhone/iPad simulators with 7.1 and 8.1 iOS versions.
Would there be an impact, in game performance, if I set my deployment target to iOS 6.1 or 7.0?
Would it be a negative impact if I set it lower than 7.1?
Chances are you could be using code not compatible with older versions. The only way to know is to have the app compile to that iOS version. But, in my honest opinion, you should stick with 7.0 onwards since they are the officially supported versions. You could change your deployment target to 7.0 and try to compile to see the effects.
If you set the deployment target to 7.0, Xcode will tell you which parts of your code are non compatible.
Regarding performance, that depends on what type of code you did and which device you are going to deploy. For that response you need to provide a little bit of more info about your app and code. But like I said before, change the deployment target in 7.0 to at least be sure your code will run on that version.
There would be some performance hits in your code if you are using any functionality that is new to iOS 7.1 because you would need to check at runtime whether or not that functionality is present, and symbols for such functionality would be weakly bound. However, that is extremely negligible and almost not worth mentioning beyond being overly specific.
On the whole, you should not see any performance impact simply by changing the deployment target version.

I set the deployment target to iOS8 and App store says "Compatibility: Requires iOS 7.0 or later". Can I force app to install only in iOS8 only?

I released an iOS 8 version of my app today and wanted to limit it only to users running iOS 8 (because it uses some new Core Motion APIs that only work with iOS 8). It seems like iOS7 users are still able to download my app, even though the deployment target is iOS8 and the App Store says "Compatibility: Requires iOS 7.0 or later". Can I force app to run in iOS8 only? Does the Deployment Target option in Xcode still control which version of the OS is required on the App Store?
The answer is, you have to set the Deployment Target in three different places, in the project, in the app target, and (in my case) in the extension. If you don't set it in all three locations the app won't show as iOS 8 only.
Deployment target on all your TARGETS is the correct option. It's important to understand the different between "Deployment target" and "Base SDK". Both regard a iOS SDK version, but they have different meanings. To learn what read here.

Resources