简体   繁体   中英

Why I am getting swift compiler error in Xcode 10.1

I can't build my application it is continuously failing to build. This is screenshot

If you see the https://developer.apple.com/documentation/uikit/uiscene documentation you can see that UIScene is supported from iOS 13.0+ and you have to use latest Xcode to use this functionality.

If you want to use Xcode 10.1 then you should not compile SceneDelegate.swift.

Since the UIWindowSceneDelegate is only available in iOS 13 and up, we'll need to exclude the entire SceneDelegate object if the app is compiled for iOS 12 or below.

@available(iOS 13, *)

Or we will remove this for all iOS versions.

For better understanding how to use it for only iOS version 13 and above without getting compiling issues or how to remove this follow below link:-

https://www.donnywals.com/add-ios-12-support-to-a-new-xcode-11-project/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM