I'm pretty much worried here - I'm trying to determine if an application is running from LocalNotification or not. But all my code is met.
func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: NSDictionary!) -> Bool { var firstWay = launchOptions.objectForKey(UIApplicationLaunchOptionsLocalNotificationKey) var secondWay = launchOptions[UIApplicationLaunchOptionsLocalNotificationKey] return true }
Both of them fail with the message.
"unexpectedly found nil while unwrapping an Optional value"
I am sure that I am doing something very simple here. Any pointers?
source share