Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift 3 iOS compatibility

People also ask

Which Xcode supports swift3?

Swift 3.3 was only supported in Xcode 9.3; Swift 3.4 was supported in Xcode 9.3. 1 and 9.4. Swift 3.3 was supported in Xcode 9.3 and 9.3.

Can you code Swift on iPad?

Swift Playgrounds is a revolutionary app for iPad and Mac that makes it fun to learn and experiment with Swift — a powerful programming language created by Apple and used by the pros to build today's most popular apps. Swift Playgrounds requires no coding knowledge, so it's perfect for students just starting out.


You can make your app run on iOS 8 & 9 by setting the Deployment Target to one of these versions. Swift 3.x is compatible with iOS 8 and newer (I'm not sure, but it might be also compatible with iOS 7). The only difference to Swift 2.2 (regarding the system requirements) is that you have to use Xcode 8.

When you set your Deployment Target to an earlier version than iOS 10, you should be aware that you cannot use APIs that are new in iOS 10. (except you use the #available operator) But using Swift 3 should be no problem.

Edit: You can now upload apps written in Swift 3 using Xcode 8.0 GM


You should use Swift 3.x (it's the latest version of Swift since this answer has been posted).

iOS version is NOT related to the Swift version you should use, instead, some of the new provided apis do support a minimum version of the OS. But -again- it's not related to the programming language it self. For example: an application has been built via Swift 2.x (Deployment Target 9.x) should work on iOS 10; When updating the IDE (xcode), it will support -by default- the latest version of the programming language -Swift-.

Also, You could do:

if #available(iOS 10, *) {
    // use an api that requires the minimum version to be 10
} else {
    // use another api
}