[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/](https://blog.csdn.net/u011915116/article/details/105096194/ "https://blog.csdn.net/u011915116/article/details/105096194/") 不想看原因的,直接按照下面的解决方式解决: 要解决这一问题也很简单,既然是找不到window属性,那我们把这个属性加上就可以了。在AppDelegate.m文件的如下位置加上:@synthesize window = _window; 这句代码即可。 ![](https://file.jishuzhan.net/article/1737940773569040385/6b2bbc47290ba1ea346bab6999c961ef.webp)

相关推荐
imLix10 小时前
RunLoop 实现原理
前端·ios
归辞...15 小时前
「iOS」————设计架构
ios·架构
i紸定i19 小时前
解决html-to-image在 ios 上dom里面的图片不显示出来
前端·ios·vue·html·html-to-image
YungFan1 天前
iOS26适配指南之UIButton
ios·swift
红橙Darren2 天前
手写操作系统 - 编译链接与运行
android·ios·客户端
鹏多多.2 天前
flutter-使用device_info_plus获取手机设备信息完整指南
android·前端·flutter·ios·数据分析·前端框架
麦兜*2 天前
【swift】SwiftUI动画卡顿全解:GeometryReader滥用检测与Canvas绘制替代方案
服务器·ios·swiftui·android studio·objective-c·ai编程·swift
GeniuswongAir3 天前
iOS 26 一键登录失效:三大运营商 SDK 无法正常获取手机号
ios
吴Wu涛涛涛涛涛Tao3 天前
Flutter 实现类似抖音/TikTok 的竖向滑动短视频播放器
android·flutter·ios