[Application] The app delegate must implement the window property if it wants to use a main story...

Xcode 11 后多了一个类型  SceneDelegate(情景代理)。

如果报  :

[Application] The app delegate must implement the window property if it wants to use a main storyboard file.

需要在 AppDelegate的.h文件中添加window  属性

运行,就和以前一样了。




iOS 13.0 之前和之后的适配

在AppDelegate的.m文件中:


在SceneDelegate的.m文件中:


有警告的api,只要在根据提示,选择fix,就OK。

你可能感兴趣的:([Application] The app delegate must implement the window property if it wants to use a main story...)