var root = keyWindow.rootViewController 返回为空,什么原因?
直接上代码:
NM5S:~ root# cycript -p kBatteryDoctor
cy# var app = UIApplication sharedApplication]
#"<UIApplication: 0x1554d460>"
cy# var keyWindow = app.keyWindow
#"<UIWindow: 0x15574730; frame = (0 0; 320 568); gestureRecognizers = <NSArray: 0x156aa7a0>; layer = <UIWindowLayer: 0x156aa5f0>>"
cy# var root = keyWindow.rootViewController
null
因为keyWindow.rootViewController确实为nil?
但在我的4s上可以获取到var root = keyWindow.rootViewController,5跟5s就不行了。
系统相同,只是设备型号不同?