{"_id":"588861fc165af631008ee223","category":{"_id":"588861fa165af631008ee1b9","__v":0,"version":"588861fa165af631008ee1b8","project":"54861bb654b3ce0b00367292","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-03-22T15:19:16.310Z","from_sync":false,"order":0,"slug":"intigration","title":"iOS / Essentials KIt"},"project":"54861bb654b3ce0b00367292","version":{"_id":"588861fa165af631008ee1b8","__v":1,"project":"54861bb654b3ce0b00367292","createdAt":"2017-01-25T08:29:46.061Z","releaseDate":"2017-01-25T08:29:46.061Z","categories":["588861fa165af631008ee1b9","588861fa165af631008ee1ba","588861fa165af631008ee1bb","588861fa165af631008ee1bc","588861fa165af631008ee1bd","588861fa165af631008ee1be","588861fa165af631008ee1bf","588861fa165af631008ee1c0","588861fa165af631008ee1c1","588861fa165af631008ee1c2","588861fa165af631008ee1c3","588861fa165af631008ee1c4","588861fa165af631008ee1c5","588861fa165af631008ee1c6","588861fa165af631008ee1c7","588861fa165af631008ee1c8","588861fa165af631008ee1c9"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"5.0.0","version":"5.0"},"parentDoc":null,"__v":0,"githubsync":"","user":"54861b9f3681d914006992a4","metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-08T15:02:41.975Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"[block:code]\n{\n \"codes\": [\n {\n \"code\": \"//\\n// AppDelegate.m\\n// \\n// Created by Tomer Shkolnik. \\n// Copyright © 2016 elasticode. All rights reserved.\\n//\\n\\n#import \\\"AppDelegate.h\\\"\\n#import <ElastiCode/ElastiCode.h>\\n:::at:::interface AppDelegate ()\\n@end\\n\\n@implementation AppDelegate\\n\\n- (BOOL)application:(UIApplication *)application \\n didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\\n\\n\\t\\t// basic setup \\n [ElastiCode setAPIKey:@\\\"<APIKey>\\\"]; \\n \\t[ElastiCode setOnLaunchCompletionBlock:^(BOOL didAppear) {}];\\n\\n // Uncomment to add actions\\n //ECOnBoardingAction * ac = [ECOnBoardingAction createWithName:@\\\"show video\\\" actionWithContext:^(NSDictionary *context) {}];\\n\\t\\t//[ElastiCode setActions:@[ac]];\\n \\n // Uncomment to set third party analytics\\n //[ElastiCode setThirdPartyAnalytics:@\\\"Mixpanel\\\" action:^(NSString * _Nonnull eventName) {\\n //NSLog(@\\\"Mixpanel event : %@\\\", eventName);\\n //[mixpanel track:eventName properties:@{@\\\"Source\\\": @\\\"Elasticode\\\"}];\\n\\t\\t//}];\\n \\n [ElastiCode ready];\\n \\n return YES;\\n}\\n- (void)applicationWillResignActive:(UIApplication *)application {}\\n- (void)applicationDidEnterBackground:(UIApplication *)application {}\\n- (void)applicationWillEnterForeground:(UIApplication *)application {}\\n- (void)applicationDidBecomeActive:(UIApplication *)application {}\\n- (void)applicationWillTerminate:(UIApplication *)application {}\\n\\n@end\\n \",\n \"language\": \"objectivec\"\n },\n {\n \"code\": \"//\\n// AppDelegate.swift\\n//\\n// Created by Tomer Shkolnik.\\n// Copyright © 2016 elasticode. All rights reserved.\\n//\\n\\nimport UIKit\\n\\n@UIApplicationMain\\nclass AppDelegate: UIResponder, UIApplicationDelegate {\\n\\n var window: UIWindow?\\n \\n func application(application: UIApplication, didFinishLaunchingWithOptions\\n launchOptions: [NSObject: AnyObject]?) -> Bool {\\n\\t\\t\\t\\t\\n // basic setup\\n \\t\\tElastiCode.setAPIKey(\\\"<APIKey>\\\")\\n\\t\\t ElastiCode.setOnBoardingCompletionBlock { (didAppear) in }\\n \\n // Uncomment to add actions\\n\\t \\t//ElastiCode.setActions([\\n\\t\\t\\t //ECOnBoardingAction .createWithName(\\\"Show video\\\",\\n \\t\\t//action: { (dict) -> Void in\\n \\t//\\t// video showing logic\\n \\t\\t//})]\\n\\t\\t\\t\\t//)\\n \\n \\t\\t// Uncomment to set third party analytics\\n\\t\\t //ElastiCode.setThirdPartyAnalytics(\\\"Mixpanel\\\") \\n\\t\\t\\t\\t//{ (eventName) -> Void in\\n\\t\\t\\t\\t// print(\\\"Mixpanel event - %s\\\", eventName);\\n\\t\\t\\t\\t// mixpanel.track(eventName,properties: [])\\n\\t\\t\\t\\t//}\\n \\n\\t\\t ElastiCode.ready() \\n return true\\n }\\n func applicationWillResignActive(application: UIApplication) {}\\n func applicationDidEnterBackground(application: UIApplication) {}\\n func applicationWillEnterForeground(application: UIApplication) {}\\n func applicationDidBecomeActive(application: UIApplication) {}\\n func applicationWillTerminate(application: UIApplication) {}\\n}\",\n \"language\": \"swift\"\n }\n ]\n}\n[/block]","excerpt":"iOS / Essentials KIt: AppDelegate Example","slug":"appdelegate-example","type":"basic","title":"AppDelegate Example"}
AppDelegate Example
iOS / Essentials KIt: AppDelegate Example