Top "Appdelegate" questions

In iOS, the app delegate is responsible for managing the app throughout its lifecycle by responding to events such as launch and termination.

How to get managedObjectContext for viewController other than getting it from appDelegate?

Recently I came to know that "You really shouldn't be calling down to the AppDelegate to get the managed object …

ios objective-c core-data nsmanagedobjectcontext appdelegate
this class is not key value coding-compliant for the key view.'

I have a problem in AppDelegate, when run the app I get this error: Terminating app due to uncaught exception …

ios compiler-errors ios-universal-app appdelegate
Pausing timer when app is in background state Swift

My ViewController.swift func startTimer() { timer = NSTimer().scheduleTimerWithTimerInvterval(1.0,target: self,selctor: Selector("couting"),userinfo: nil, repeats: true) } func pauseTimer() { timer.…

ios swift nstimer appdelegate
Why is didReceiveRemoteNotification not called but didReceiveRemoteNotification:fetchCompletionHandler called when my app is in the foreground?

If I override override func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject], fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) { println("hey) } …

ios swift apple-push-notifications appdelegate
swift ios - How to run function in ViewController from AppDelegate

I am trying to run a function in certain ViewController using AppDelegate func applicationDidBecomeActive(_ application: UIApplication) { ViewController().grabData() } But somehow …

ios swift function appdelegate func
When do the appdelegate methods get called in relation to the view lifecycle methods of your initial view controller?

What is the sequence of methods that get called when your app loads, especially for these methods: applicationDidFinishLaunching viewDidLoad viewWillAppear …

ios objective-c appdelegate
How to convert Objective-C App Delegate to Swift?

I am working on old projects converting all classes to Swift. How can I convert the AppDelegate class to Swift? …

ios objective-c swift appdelegate
How to configure Background App Refresh using Swift?

I have following function to download JSON data in my SeachVC (UIViewController) which works perfect. func downloadJSON(){ guard let url = …

ios swift background-process appdelegate completionhandler
"Error : Use of undeclared type MessagingDelegate" in Firebase messaging

I have updated my firebase messaging pod recently and followed the Quickstart guide of Firebase to perform necessary changes of …

ios swift3 appdelegate firebase-notifications
How can I check when an app comes back into the foreground from the background, but not from push notification?

func application(application: UIApplication, didReceiveRemoteNotification data: [NSObject : AnyObject]) { var dat = JSON(data) if application.applicationState == UIApplicationState.Active { // app was already …

ios swift lifecycle appdelegate application-lifecycle