I currently have XCode version 8.2.1.
On my iPhone, I currently have iOS 10.3.2.
My version of XCode will not deploy to anything over iOS 10.2.
On my iPhone, I am being offered an upgrade to iOS 11.0.3.
According to this wiki here, XCode version 9 will deploy to iOS 11.0: https://en.wikipedia.org/wiki/Xcode#9.x_series. But I can't tell whether this includes all the sub-versions, eg 11.0.3.
So my question is, if I get XCode version 9 and upgrade my phone to iOS 11.0.3, will I be able to deploy to my phone from XCode? How do I tell exactly which versions of iOS are supported by each version of XCode? And going forward, how can I ensure that my iPhone and iPad always have versions of iOS which I am able to deploy to from XCode?
Yes, you will be able to deploy to your phone.
While you need Xcode 9 and not 8 to program against iOS11, this question has more to do with the Base SDK and Deployment Target settings in your project.
The Base SDK is the SDK version you are compiling against. In Xcode 9, this could be iOS11, for example. The Deployment Target setting represents the lowest supported iOS version the app will run on. This might be iOS10, per your example, but it could be anything else.
To use the newest iOS11 features, you'd have to have a minimum Base SDK of iOS11. To support older platforms, you must make sure the Deployment Target is set to the oldest version you'd support. In code, you need to check the version of the platform when deciding to use a newer-than-Deployment-Target feature.
if I get XCode version 9 and upgrade my phone to iOS 11.0.3, will I be able to deploy to my phone from XCode?
Yes. Xcode 9 and iOS 11 are both the latest (as of Oct. 2017) versions available. If you want to support iOS 11, you need Xcode 9.
How do I tell exactly which versions of iOS are supported by each version of XCode?
Check the release notes. For example, the Xcode 9 Compatibility section says:
Xcode 9 includes SDKs for iOS 11, watchOS 4, macOS 10.13, and tvOS 11
And going forward, how can I ensure that my iPhone and iPad always have versions of iOS which I am able to deploy to from XCode?
Staying current with the latest iOS and Xcode versions is one way to do that. You don't even need the latest iOS version on your phone -- just any version that's later than the minimum version supported by whatever Xcode you're using. Looking at the list of available deployment targets, I can see that Xcode 9 deploys to iOS versions back to iOS 9.1.
Mostly, just be aware that updating iOS on your phone may require you to also update Xcode.
Related
In earlier versions of Xcode I could set the base SDK to the current iOS version and the deployment target to an earlier version as shown in the below slide from the iOS 7 TechTalk, session Architecting Modern Apps, Part 2:
This Stack Overflow question elaborates nicely on the Base SDK vs Deployment target.
What's the meaning of Base SDK, iOS deployment target, Target, and Project in xcode
However, now when I look at the base SDK config field in Xcode I just see "iOS" (which is an alias of "iphoneos").
According to https://developer.apple.com/ios/submit/
Starting March 2019, all iOS apps submitted to the App Store will need
to be built with the iOS 12.1 SDK or later, and support the all-screen
design of iPhone XS Max or the 12.9-inch iPad Pro (3rd generation).
This worries me because it seems that I can no longer target older versions of iOS.
I've done a lot of research by I cannot seem to work out definitively whether there still a way to use the 12.1 SDK but target older versions of iOS. Is there a way to do this?
The base SDK is just "iOS". The exact version will depend on your version of Xcode (12.1 if you are using Xcode 10.1). The base SDK does not determine which versions of iOS are supported by your app.
You set the minimum version your app is compatible with by specifying the "iOS deployment target", either for your project as a whole:
or in the settings for a specific target in your project
The oldest version of iOS that you can target with Xcode 10 is iOS 8 (which is pretty old).
BTW, you can see or select the Base SDK you are using, in the Xcode Preferences/Locations:
I have an iPhone 7 (on iOS 10.3.3) and I don't want to update it to iOS 11 but my Xcode version is 9.2 (9C40b). Can I run apps on my iPhone from xcode or do I have to install iOS 11.
No, you do not need to update iOS on your iPhone to use it with Xcode 9.2 (or anything newer).
You just need to ensure that your iOS app has a Deployment Target of iOS 10.3 or earlier so you can run the app on your iPhone.
The Deployment Target defines the earlier version of iOS you wish to support.
Keep this in mind: within certain limits, you can use newer Tools to work with older devices but you can't use older tools with newer devices.
I am developing an iOS app for iOS 6.0 and higher. Now, after updating Xcode from Mac App Store, I am told that "An iOS Deployment Target earlier than 8.0 is not supported by this version of Xcode.". So, it seems that I need to use another version of Xcode to develop this app.
I can download other versions of Xcode from https://developer.apple.com/download/more/. What is the highest version of Xcode that supports iOS 6.0 as the deployment target?(I just mean the deployment target, not the capability of installing iOS 6.0 simulator.) I don't want to download many Xcode versions to find that.
You can use latest Xcode for this do not select deployment target from dropdown, just manually input "6.0" in the "iOS Deployment Target" text box.
For more details you can go through here.
I have also upload one of my app that use iOS 7.0 from latest Xcode.
iOS 6 is supported in Xcode 7.x .
My suggestion is that,you may need to provide support for just 2 of previous versions of iOS 10, ie. iOS 8 and 9. If you take a look at the usage graph, it is evident that only 6% are using versions earlier than 9. That too, will have major contributions from iOS 8 and 7.
My app is available on the Appstore and is currently compatible with iOS 6 or later.
I want to release a new version only compatible with iOS 7 or later because there's a lot of crashes on iOS 6 with this new version and I have to release ASAP.
Here's my question : when the iOS 6 crashes will be fixed, would it be possible to bring back the iOS 6 compatiblity (i.e. downgrade the IPHONEOS_DEPLOYMENT_TARGET from 7.0 to 6.0) ? Does Apple allow that ?
Thanks in advance.
Your iOS Deployment Target can be whatever you wish it to be. The main requirement that Apple has is that your app submission is compiled against the latest SDK at the time (currently Apple is accepting base SDK of iOS 7, but it will change to iOS 8 in the new year).
When you downgrade the deployment target back down to 6, the only thing you have to ensure is that you're not calling any iOS 7+ APIs when running on iOS 6 devices, otherwise you'll be creating a lot of crash reports.
edited after better understanding the original question
Now, I use Xcode 4.2 supporting iOS 5.0. Apple has just released iOS 5.0.1 beta 2. I can install it on my iPhone.
I want to test with this beta version, i.e build code from Xcode.
How do I build code from Xcode 4.2 for device of iOS 5.0.1 beta?
Please help
In exactly the same way that you would do so for iOS 5.0. We can't talk about beta versions of the software, but we can talk about what happens when newer versions of iOS are released. When you connect a device with a newer version of iOS installed, the Xcode Organizer will give you a message like:
Xcode does not have debugging information for the version of iOS on the device named “Dev iPhone”. Xcode can collect debugging data from the device to enable development with this version of iOS. This process only needs to be done once per iOS version, and will take several minutes.
You simply click OK or similar, and Xcode downloads the necessary debugging data. You can then build to the device from Xcode and use all the debugging tools as usual. This process works for point releases. It is highly unlikely this would work for major updates (e.g. if iOS 6 was released) and it may or may not work for iOS 5.1, depending on the changes included. But when Apple have not released a new version of Xcode to developers, you can be sure it is because one is not required.
It is important to understand the distinction between an updated version of iOS (for the device) and the iOS SDK (for Xcode). A point release of iOS does not necessarily require any change to the iOS SDK, and therefore with Xcode's ability now to download the debugging information on demand (a feature that has been around for a while), you don't necessarily need an updated version of Xcode. Likewise, with Xcode 4.2 you still set the iOS 5.0 as your base SDK even if you are setting an earlier version (e.g. iOS 4.2) as your deployment target. You don't need the iOS SDK v4.2 to target iOS 4.2 for deployment. (Just make sure you add back "armv6" to targeted architectures in your build settings, if you still want to support the iPhone 3G and equivalent iPods, as in Xcode 4.2 this is not included by default.)