1.删除新创建项目中的Scenedelegate.h和Scenedelegate.m文件。
2.删除Info.plist文件中的Application Scene Manifest选项。
3.删除或注释掉AppDelegate.m文件中的两个方法。
4.在AppDelegate.h文件中添加window属性。
这样就可以了。