iOS Compatibility on different iOS Operation Syste

2020-04-11 08:07发布

I wanted to ask how compatibility on different iOS operation systems works in iOS. For example If I develop an app on Xcode 9.2 and Swift 4 for iOS 11, should it work on iOS 9?

I am coming from Android background which you specify the minimum Android OS that is needed for the app to run in the Gradle file. Does anything similar exist on iOS?

标签: ios xcode xcode9
4条回答
该账号已被封号
2楼-- · 2020-04-11 08:34

Yes, it will work on iOS9 With Xcode 9.2 and swift4 you can develop an application for ios8.0 and above.

In your project setting, you have to select your development target

Select Project -> Select your target -> In general Tab - Select your deployment target

查看更多
Root(大扎)
3楼-- · 2020-04-11 08:36

Please set your deployment target to 9.0

Deployement Target

查看更多
我想做一个坏孩纸
4楼-- · 2020-04-11 08:39

Yes, there is backward compatibility, but for older iOSes you have to check version when using newer API. Luckily we've got availability attributes (@available)

If you want to know HOW it works, basically for Swift your application has its own swift standard library embedded into binary of your application. In case of Objective C – newer iOSes keep sdk's of older versions to maintain backward compatibility.

查看更多
等我变得足够好
5楼-- · 2020-04-11 08:44

Very simple solution:

Set deployment target as 9.0 in your build target general settings. iOS will automatically handle support from 9.0 onwards for a build (your app).

Your app/build will be allowed to use/import frameworks and other libraries, compatible to minimum deployment target, only.

enter image description here

More detail about App Deployment Target from Apple.

enter image description here

查看更多
登录 后发表回答