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.)
Related
When do we need to upgrade XCode to newer version? Is it ok if we use older version (.i.e build IPA for iOS 13.1 with XCode 10 or even XCode 9)
(to debug with newer iPhone, iPad is one reason :D)
While you can develop/build/release your app to be compatible with iOS 13 on older Xcode, you cannot add new features that are present in XCode 11 such as dark mode, Sign in with Apple, new simulators (yes, there is a way to add iOS 13 simulators into older XCode but I wouldn't recommend doing it), new code signing, Swift UI and many more.
Also - Sign in with Apple is going to be required for a lot of apps soon so that's a huge push into the new XCode.
You will be able to work with older iOS versions, but at some point you won't be able to run an application for the latest iOS releases (for example iOS13) and also you won't be able to use SwiftUI framework for developing.
Of course you won't have access to new features of Xcode.
If you developing on older version of Xcode then you can not use dark/light mode feature on your app, also in future it's compulsory to build/upload app using latest Xcode version for latest iOS support.
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.
Why is it important to download the new version of Xcode when there is a new iOS version released?
Suppose I installed iOS 11 on my mobile and I try to start developing an app with Xcode 8.3 (which does not support this new version of iOS), it will not work.
Sometimes, I also have to download new version of macOS.
For running development code on a device, Xcode has knowledge about the different versions of iOS that it can work with.
If you were trying to build and run on an iOS device with a new version of iOS, Xcode is set up to say it does not know about that version and will not work.
This allows Apple to update the way Xcode talks with iOS devices during development without newer iOS versions needing to remain backwards compatible.
After a recent question of mine (https://apple.stackexchange.com/q/116029/7742), here is some info:
My app was developed using Xcode 5, iOS SDK 7. Deployment target is 4.3.
I was told that the 4th generation iPod touch can't run iOS 7.
Since my app has a deployment target of 4.3, then it should run on that iPod, right? Or does the fact that I used the SDK 7 mean that it won't work?
iPod Touch, 4th Gen DOES NOT support iOS 7. See this Wikipedia article.
You CAN use Xcode 5 to build an App with a deployment target of 4.3, but that means you CANNOT use any iOS feature supported only by versions of iOS > 4.3. And you will have to be VERY CAREFUL to check that you don't, or the App WILL crash.
And... unfortunately there is no Profiler or Pre-Processor that warns... although you can double check if Xcode "Analyze" warns you. Else you just have to very carefully check all your code for conformity with the limitations of the 4.3 SDK or test a lot... well actually do both.
A deployment target means that the should work on devices running that deployment target iOS version (or later). (So, if your deployment target was 4.3 and the device is running an iOS version of 4.3 or greater, you should be fine.) The fact that you used Xcode 5 and the iOS 7 SDK will not affect this. The only limitation is that we cannot use the latest compiler to build for iOS versions prior to 4.3 and/or the first or second generation hardware.
Clearly this assumes that you didn't accidentally reference any classes or methods that require later iOS version (or if you decided to avail yourself of new features, that you put in runtime checks to only use those new methods/features if they were available). Try running your app on an iOS 6.0 simulator to confirm compatibility with iOS 6. (Note, Xcode 5 no longer includes the simulators prior to iOS 6.0, so if you really want to test against earlier versions, such as iOS 5.0 or 4.3, you might just want to get your hands on some old device with that older iOS version.)
I mention getting an older device, because compatibility with the old iOS version is not enough. You want to ensure your app can run on that hardware (e.g. doesn't require more than the 4th gen 256mb of memory, cellular, etc.). You really should find yourself physical hardware with older iOS versions upon which you can test your app.
I've installed Xcode 4.6 beta (which includes iOS 6.1 beta SDK) but do not wish to install iOS 6.1 on my (development) iPhone quite yet. What I'd rather do is continue developing with iOS 6.0.2 (or use the iPhone simulator instead).
Hence I've tried to download and install iOS 6.0.2 into XCode 4.6: indeed in its Organizer window both iOS 6.1 (by default) and iOS 6.0.2 (by this action) now do show up. However when I try to change the base SDK for my project (under its Build Settings) Xcode still seems unaware of the second choice: The only iOS-related choices available are iOS 6.1 and Latest iOS (i.e. again iOS 6.1).
How do I add (the installed) iOS 6.0.2 SDK to that list so I can select it as base SDK for my project?
P.S. My current understanding that this is different from that other (frequent) question.
P.S.S. Presumably nothing of this is specific to Xcode 4.6 as opposed earlier versions. Therefore I feel authorized to mention it even outside the confidentiality agreement, for its existence as such is clearly publicly known.
Try to set target to lower version !