As UIApplication.sharedApplication() isn't available in the an iOS8 today widget/extension, how can I dynamically check if the code is currently running as widget or as app? When running the app I'd like to call e.g.
UIApplication.sharedApplication().registerUserNotificationSettings(settings)
When running the same code as widget this should simply be skipped. Is it possible to check for this?