[Application] The app delegate must implement the window property if ..... 错误

在xcode中新建ios项目后再真机上运行,会发现手机上一篇漆黑,仔细观察控制台会发现这样的提示:

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

大概意思是:

app delegate 必须实现 window属性。

这里有一篇博文详细解释了出现这种问题的原因及解决方式:https://blog.csdn.net/u011915116/article/details/105096194/

不想看原因的,直接按照下面的解决方式解决:

要解决这一问题也很简单,既然是找不到window属性,那我们把这个属性加上就可以了。在AppDelegate.m文件的如下位置加上:@synthesize window = _window; 这句代码即可。

相关推荐
壹方秘境2 天前
我用Go语言开发了一个跨平台的HTTPS抓包和调试工具
前端·后端·ios
初级代码游戏7 天前
easy Photo Clean公测版:快速清理iPhone照片 邀请公测
ios·iphone
库奇噜啦呼7 天前
【iOS】RunLoop学习
学习·ios
黑科技iOS上架7 天前
iOS应用周末提交什么情况算卡审
经验分享·ios
zzb15807 天前
ios基础-MVC-UIView
ios·mvc·cocoa
kingbal7 天前
Flutter:Flutter SDK版本管理工具FVM
android·flutter·ios·android-studio·window
他们都不看好你,偏偏你最不争气8 天前
【iOS】Runtime - Part 2 && 消息发送:缓存、查找与转发
macos·ios·objective-c·cocoa
2501_915918418 天前
iOS App性能测试工具的实现方法与优化循环指南
android·ios·小程序·https·uni-app·iphone·webview
他们都不看好你,偏偏你最不争气8 天前
【iOS】Runtime - Part 1 && 对象与类的本质
macos·ios·objective-c·cocoa