Developing iOS 13 app on Xcode 12 beta?

I'm a new developer who has never gone through the transition from one major release of iOS to another. I've been finishing up work on an app whose deployment target is iOS 13.2. Any tips on how to balance things between now and the fall? In particular, I need to do three things:
  1. I want to finish my app and release it, which I can do entirely on Xcode 11, and not have to worry about iOS 14 at all. So that's easy :)

  2. I want to test my app against iOS 14 to see how it will run. I assume I need to do this in the beta version of Xcode 12? Can I do my iOS 13 development in Xcode 12 as well, or will I need to go back and forth between two versions of Xcode? And will Xcode 12 try to automatically change my app to iOS 14 when I open it?

  3. I'll want to start preparing an iOS 14 version of the app for the fall. I'm the way to do that is to branch my code in git and open that branch in Xcode 12? Any tips or best practices on how to do that?

Thanks for the help

Replies

You will have to go back and forth between Xcode GM and Xcode beta, apps can't be submitted to the App Store from Xcode beta. Having a separate branch for iOS14/Xcode 12 is pretty standard! Just make sure the changes you make in your main branch are continually getting merged back into that branch too. Also new additions to SwiftUI are backwards capable with iOS 13 so you won't have to necessarily bump up your deployment target to iOS 14 when fall comes and you can always wrap iOS 14 features in an available conditional.
The new additions to SwiftUI are marked iOS 14+ only - you mentioned they're backward compatible, any particular source for this?
Hi,

you can't submit any apps with beta versions of our developer tools but you can test that your app is ready for iOS 14 when it ships. So I think the answers to your specific questions are:
  1. For the release process stay with Xcode 11 and do all your development and release from there.

  2. For testing with Xcode 12, you need to download it from developer.apple.com/download. Be sure to not override your existing Xcode 11 installation, I recommend renaming it to Xcode_beta.app. When building with Xcode 12, you also use the iOS 13 SDK for your iOS app but you still deploy to iOS 13 if that's your deployment target. You want to make sure that everything still works when building with Xcode 12, on your iOS 13 devices/simulators and the iOS 14 devices/simulators. Xcode does not change the deployment target automatically.

  3. For the upgrade strategy you can prepare all changes in a branch but you need to keep it updated until the GM ships. You can also use 'if #available' in your code to make sure new code only runs on iOS 14.

Thanks @Developer Tools Engineer!

You can also use 'if #available' in your code to make sure new code only runs on iOS 14.

Are there any good resources you recommend for using if #available? I've never used that before and don't know where to start.

And for testing my app with iOS 14, I'm not sure I follow this:

When building with Xcode 12, you also use the iOS 13 SDK for your iOS app but you still deploy to iOS 13 if that's your deployment target.

Is selecting the iOS 13 SDK a setting that I need to select within Xcode 12 when I build?

I'm in the same situation. I'm working on finishing up my first app for iOS 13 and have wondered about what is supposed to be done with a new iOS comes out. This is answering some questions, but I'm not familiar with git (I assume GitHub) or branches of code. Can anyone point me in the direction of how to use GitHub with Xcode? And how to branch code... :D
@D-hops:

I'm in the same situation. I'm working on finishing up my first app for iOS 13 and have wondered about what is supposed to be done with a new iOS comes out. This is answering some questions, but I'm not familiar with git (I assume GitHub) or branches of code. Can anyone point me in the direction of how to use GitHub with Xcode? And how to branch code... :D

I can't include links, but Ray Wenderlich has a tutorial on using Xcode 9 with git, which is slightly out of date, but I could figure it out from there. Atlassian also has some general git tutorials.


@kmt901

Also new additions to SwiftUI are backwards capable with iOS 13 so you won't have to necessarily bump up your deployment target to iOS 14

To respond to @Smithers question, this does not mean that you can use iOS 14 SwiftUI features in an iOS 13 app (hence why they are marked 14+ only). I think @kmt901 is correct that SwiftUI methods that work in iOS 13 still work in iOS 14. By contrast, from what I heard when Swift moved from Swift 1 to 2 to 3, each time they changed lots of key things, so that apps built using one version broke in the next one. And luckily that isn't happening with SwiftUI this year.