Closed kylef closed 10 years ago
You're mistaken. Window is a property of the AppDelegate protocol, and it is enforced (you'll get a compiler warning if you don't implement the window property on your delegate, and your app will crash on launch if it's nil).
Conversely, using application keyWindow is unsafe because the keyWindow won't == the main window if a UIAlertView is on screen at the point when you call it.
Hmm you are right, however the property was only added in iOS 5.0. This project supports iOS 4.3. Maybe the next release of iVersion should require iOS 5.0?
s.ios.deployment_target = '4.3'
It would only be a problem if the user was making an app that only runs on iOS 4, since any app that supports the iOS5+ SDK is required to have the window property, even if it also works on 4.3x.
UIApplicationDelegate
protocol doesn't have a window method, it's common convention that it has a property called window. However it is not enforced.