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:
Related
I am trying to understand how the compatibility does work and could not get the perfect answer out there. Many answers are confusing.
I want to understand if I develop an app targeting iOS 9, does it work on iOS 11.2 devices for example (forward compatibility)
and if I target iOS 11.2, is it going to be compatible with iOS 9 and 10 as an example (backward compatibility)
I found this answer where he is suggesting to download the image file for an older versions. When shall I do that? What is the case that requires downloading the images to my project?
This issue is giving me the following error:
My iPhone is running iOS11.3 and my Xcode Project (Objective-c) is targeting iOS 10 and I am developing using Xcode 9.2
Apple only supports 'forward compatibility'. You can specify your App's min OS support in its target. All OS version higher than the min target version will support your app. You can't make your app to support OS versions less than the target version.
This "Could not locate device support files" error occurs when your Xcode is not compatible with the OS version of the device. In such scenarios, you can download those image and make your Xcode compatible with the OS version.
"When to download the images??" - When you can't update your Xcode to its newest version( for eg: if you are using Sierra and no plans to update to High Sierra).
I was going through app review guidelines and one thing which I am unable to find the answers is
"Do I need to build my project with the latest available version of Xcode available on the Mac App Store or can I use the older version "
For example the current version of Xcode available on Mac App Store as of writing of these lines is Xcode 9.0, so do I need to build my project using Swift 4 and Xcode 9.0 or can I use older versions (say Swift 3.x and Xcode 8 or Xcode 7).
A similar question was asked in Feb 2012
Do I need the latest version of Xcode to submit apps to the app store?.
But it doesn't provide clear cut answer and the answer is more than 5 years old. And during that time the language for choice was objective -C whose versions were and are more stable than current lingua franca, Swift.
You can use older version of Xcodes (Xcode 8.x) to develop and upload
your project build on app store. There is no any such kind of
restriction by Apple, that you must use latest Xcode Tool to upload a
build on the store
I recommend and a as good advise,
You should use latest version of Xcode Tool to make your app, compatible with latest version of technology. You should see and implement, changes in technology. And one most important and major update in Xcode 9 is - support for iPhone-X device. To see your app interface is compatible with iPhone-X or not, you must use Xcode 9. There are so many other considerable updates in Xcode 9 (with iOS 11)
Here is list of updates with Xcode 9: Highlights of Xcode 9
It's not required to convert/change version of Swift programming language to provide a support of latest Tool.
Xcode 8.3 & Xcode 9, both supports Swift 3.2 version. So, if your current project is supporting, Swift 3.2 version, then you can easily work with Xcode 9.0
How to see current Swift version of your Xcode Project
Also, review this answer to see, how you can make your project compatible to Xcode 9 - Xcode 9 Swift Language Version (SWIFT_VERSION)
Here is nice answer from Apple:
Why You Should Use the Latest SDK
Building with the latest SDK gives your app all possible bug fixes and new behavior. For compatibility reasons, frameworks can't always expose improved behavior, unless apps are built with the latest SDK.
For example, when Retina enabled iPads were first introduced, only iPad apps built with the very latest iOS SDK could create Retina images by simply loading an image with an #2x suffix.
By building with the latest SDK, apps signal that they are ready for all API improvements and bug fixes.
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.
At a loss here. I have to test an app on iphone 4 devices as well as newer ones. Can anyone advise me as to how to set Xcode 9 up to support ios 7 as a deployment target as well as up to the newer versions of ios? So that I can use iphone 4 simulator and later test on the iphone 4 device?
Can anyone advise me as to how to set Xcode 9 up to support ios 7 as a deployment target as well as up to the newer versions of ios?
The advice is simple: You can't. (Okay, maybe you can, with some sort of elaborate hacking; but don't.)
There's no problem running multiple versions of Xcode, so use an earlier version of Xcode to test on iOS 7. This will be tricky, because your project may not be easily backward compatible from Xcode 9 to an earlier version of Xcode, but it's your best hope. (Either that, or do what Apple really wants you to do: abandon backward compatibility beyond iOS 8.)
Since iOS 9, Apple has stopped support of iPhone 4S.
To work with iPhone 4S with Xcode 9, you need to set Deployment Target for your build (TARGET) below iOS 9.0
Follow these steps to work with iPhone 4S with Xcode 9:
Select your Project (Root) >> TARGET >> Tab 'General'
Set 'Deployment Target' to 8.4
.
Now open Simulator List, You can see, iPhone-4S is there to work with it.
I suggest to work with latest stable version of iOS (iOS 10).
Using latest xcode, you do not need to worry about supporting latest iOS version even if you choose lower deployment target which determines the app's backward compatibility.
It is a good idea to support the backward compatibility as far as your code is not depending on latest APIs and frameworks. The only reason for backward compatibility is to maximize the user base as not everyone (specially elders) update their iOS version regularly.
WARNING:
If you choose lowest possible deployment target (8.0), some newer features and frameworks won't be able to behave as expected which increases the chances of app crashes in older iOS versions.
Currently, we are using Xcode 10.1. AND Xcode 10.1 supports iPhone4s.
(Please don’t confuse Xcode version (10.1) with the (iOS 10.1).
Xcode is an IDE which can have backward iOS SDK support.
The latest iOS we updated on our iPhone4s is 9.3.5
To test your code on device, you can simply connect an iPhone4s or you can download a simulator with iPhone4s support (9.0 or so)
To download additional simulators you can go to xcode > preferences > components Once the simulator is installed, the option for iPhone 4s would be available for testing.
TIP: We have been using Deploymate for maximum backward compatibility and support. It warns us about deprecated methods and this is where you start modifying your code to support the lowest iOS version with confidence.
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.