5
votes

I'm new to iOS dev and Swift.

I started my game using Swift 2.3. Sent it for Preview to Apple, they rejected it yesterday because a few functionalities were not working on iOS 10. So I had to update my iPhone 6S to iOS 10 in order to test it accordingly.

When doing that, my XCode 7 obviously requested me to update otherwise I couldn't install my game back again on iOS 10. Which I did.

When installing XCode 8, suggested me to migrate to Swift 3 (recommended). That was the worst choice I could ever pick since now my code has more than 240 errors including syntax ones from 3rd party libraries such as GoogleAds, iCarousel, etc. I wouldn't have any problem on fixing those 240 errors if they were all mine.

So my question is, can I go back to Swift 2.3 on my XCode 8 and still run it on iOS 10?

Also, they told me my app didn't look "good" on iPad since even though I don't support it, it should be playable either way. That was an easy fix but, now iOS 10 doesn't support iPad 2 anymore nor iPhone 4 & 4s. Starts from iPhone 5 & 5s + iPad Air 2.

Should I forget about those old devices now (iPhone 4 and iPad 2) ?

Thanks in advance.

1
The version of the Swift language is not related to the targeted OS.Eric Aya
So i can still code in Swift 2.3 and be able to target iOS 10?msqar
If I'm not mistaken, those devices are not selectable when you target iOS 10 because they don't support this OS. So if you only target iOS 10 indeed you don't have to support them. But be careful, if you target iOS 10 and iOS 9 or lower, you will have to support them! :)Eric Aya
Targeting 10 means only 10. Targeting 9 means 9+10. Targeting 8 means 8+9+10. Etc.Eric Aya
I've made an answer from my comments. // No idea about the iPhone resolution thing, though. I think it just means your app should work as an Iphone app when running on iPads.Eric Aya

1 Answers

14
votes

The version of the Swift language is not related to the targeted OS.

With Xcode 8, you can use either Swift 2.3 or Swift 3 - both are able to target various iOS version, so yes, you can code for iOS 10 with Swift 2.3 in Xcode 8.

You say:

Now what about the devices i should be supporting? since iPhone 4 & 4s / iPad 2 are no longer "selectable" in the simulator list.

Those devices are not selectable when you target iOS 10 because they don't support this OS.

So if you only target iOS 10 indeed you don't have to support them. But be careful, if you target iOS 10 and iOS 9 or lower, you will have to support them!

When you target iOS 10, your app will work with iOS 10 - if you target iOS 9, your app will work with iOS 9 and 10, if you target iOS 8 it will work with iOS 8, 9 and 10. Etc.