今天试试新建一个swift项目,默认支持16.0,这肯定不行啊。deployment target 最低选择11,哪也不能够啊,手动输入了9.0。然后就开始报错了。

'Scene' is only available in iOS 14.0 or newer

'WindowGroup' is only available in iOS 14.0 or newer

'ContentView' is only available in iOS 13.0 or newer

然后进入了秀错步骤,最终采用如下方案解决:

 当然这是分版本适配吗,麻烦吗,最简单方式就是直接采用老的appDelegate模式设置app窗口,记得删除general 里的 INFOPLIST_KEY_UIApplicationSceneManifest_Generation。不然就是黑屏。

 

 

精彩链接

评论可见,请评论后查看内容,谢谢!!!评论后请刷新页面。