Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Would Swift 2.3 be compatible with iOS 10?

Tags:

xcode

ios

swift

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.

like image 484
msqar Avatar asked Sep 14 '16 14:09

msqar


1 Answers

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.

like image 178
Eric Aya Avatar answered Nov 10 '22 12:11

Eric Aya