Today's Menu  Portugal
journal and plan nutrition
AppDelegate.m
Go to the documentation of this file.
1 //
2 // AppDelegate.m
3 // StayWellFed
4 //
5 // Created by Don Zeek on 5/12/15.
6 // Copyright (c) 2015 net.dzeek.y2015.ios.portfolio. All rights reserved.
7 //
8 
9 #import "AppDelegate.h"
11 #import "SecondViewController.h"
12 // #import "Y3MailcoreViewController.h"
14 #import "Z5DataController.h"
16 
17 @interface AppDelegate ()
18 
19 @end
20 
27 @implementation AppDelegate
28 
29 
30 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
31 
32  self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
33  // Override point for customization after application launch.
34 
35  // [FIRApp configure];
36 
38  UINavigationController *nutrRootNC = [[UINavigationController alloc] initWithRootViewController:nutrRootVC];
39 
40  self.window.rootViewController = nutrRootNC;
41 
42  [self.window makeKeyAndVisible];
43 
44  return YES;
45 }
46 
47 - (void)applicationWillResignActive:(UIApplication *)application {
48  // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
49  [[[Z5DataController sharedInstance] localDataController] saveContext];
50  // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
51 }
52 
53 - (BOOL)application:(UIApplication *)app
54  openURL:(NSURL *)url
55  options:(NSDictionary<NSString *, id> *)options {
56  return [[GIDSignIn sharedInstance] handleURL:url
57  sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
58  annotation:options[UIApplicationOpenURLOptionsAnnotationKey]];
59 }
60 
61 - (void)applicationDidEnterBackground:(UIApplication *)application {
62  // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
63  // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
64 }
65 
66 - (void)applicationWillEnterForeground:(UIApplication *)application {
67  // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
68 }
69 
70 - (void)applicationDidBecomeActive:(UIApplication *)application {
71  // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
72 }
73 
74 - (void)applicationWillTerminate:(UIApplication *)application {
75  // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
76 }
77 
78 @end
instancetype sharedInstance()
UIWindow * window
Definition: AppDelegate.h:13
BOOL handleURL:sourceApplication:annotation:(NSURL *url, [sourceApplication] NSString *sourceApplication, [annotation] id annotation)
Singleton interface to both core and remote data sources.
GIDSignIn * sharedInstance()