{"_id":"55781fe45129590d003ff51a","__v":41,"user":"54aa7f3f9bb00c0b00cb899b","category":{"_id":"55781fe35129590d003ff4fb","version":"55781fe25129590d003ff4f7","__v":11,"pages":["55781fe45129590d003ff517","55781fe45129590d003ff518","55781fe45129590d003ff519","55781fe45129590d003ff51a","55781fe45129590d003ff51b","55781fe45129590d003ff51c","55781fe45129590d003ff51d","55781fe45129590d003ff51e","55781fe45129590d003ff51f","55781fe45129590d003ff520","55781fe45129590d003ff521","55781fe45129590d003ff522","5579ab5fc7fb3f2100096fad","55f7de1660cc850d008a7a22","55f7e1fbe32e9b0d00a2d4d0","561f72bacec1a50d00979598","561f764f61c0521700acc428","563337539c607719001b85dd","564318f1f49bfa0d002f5566","564f03454f000617007bd670","565ee80a23fd5f0d00a129f9","56793cd73473bc0d008e141b"],"project":"54aa7f773b56130b0056c86e","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-01-05T12:43:51.897Z","from_sync":false,"order":3,"slug":"ios-sdk","title":"iOS SDK"},"parentDoc":null,"version":{"_id":"55781fe25129590d003ff4f7","project":"54aa7f773b56130b0056c86e","forked_from":"54aa7f773b56130b0056c871","__v":6,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z","categories":["55781fe35129590d003ff4f8","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","55781fe35129590d003ff4fb","55781fe35129590d003ff4fc","55781fe35129590d003ff4fd","55781fe35129590d003ff4fe","564bbc7e8841060d00abb2ee","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","582318b23b961a0f009516a1","594a848c9f4771001a43c959"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Developers","version_clean":"2.0.0","version":"2.0"},"project":"54aa7f773b56130b0056c86e","githubsync":"","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-05-13T14:06:38.430Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"After you've successfully integrated the Pulsate SDK with your project you should import the library umbrella header: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"#import <PULPulsate/PULPulsate.h>\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"import PULPulsate\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\niOS enables CoreLocation to wake up a terminated apps so they can react to monitored regions actions. In order for that functionality to work you need to instantiate the Pulsate SDK in *application:didFinishLaunchingWithOptions* method of your *AppDelegate* and pass the *launchOptions* dictionary to Pulsate.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"#import <PULPulsate/PULPulsate.h>\\n\\n:::at:::implementation AppDelegate\\n\\n- (BOOL)application:(UIApplication *)application\\n  didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\\n    NSError* authError;\\n\\n\\t\\tPULAuthorizationData* authData = [[PULAuthorizationData alloc] initWithAppId:@\\\"YOUR_SDK_APP_ID\\\" andAppKey:@\\\"YOUR_SDK_APP_KEY\\\" validationError:&authError];\\n\\n    if (authError == nill)\\n    {\\n        NSError* managerError;\\n        PULPulsateManager* pulsateManager = [PULPulsateFactory getInstanceWithAuthorizationData:authData withLocationEnabled:YES withPushEnabled:YES withLaunchOptions:launchOptions error:&managerError];\\n      \\n        if (managerError == nil)\\n        {\\n            [_pulsateManager startPulsateSession::^(BOOL success, NSError* error) {}];\\n        }\\n    }\\n    return YES;\\n}\\n\\n\\n@end\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"import PULPulsate\\n\\nclass AppDelegate {\\n\\n\\t  func application(_ application: UIApplication, \\n    didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool\\n    {\\n        do\\n        {\\n            let authData: PULAuthorizationData = try PULAuthorizationData(appId: \\\"SDK_APP_ID\\\", andAppKey: \\\"SDK_APP_KEY\\\");\\n      \\n            let pulsateManager = try PULPulsateFactory.getInstanceWith(authData,\\n            withLocationEnabled: true, withPushEnabled: true, \\n            withLaunchOptions: launchOptions, withPulsateAppDelegate: true);\\n      \\n            pulsateManager.startPulsateSession();\\n        } catch {\\n    \\t      print(error);\\n        }\\n        return true;\\n    }\\n}\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Pulsate SDK sets a new delegate for *UIApplication* so it can do all the heavy lifting for you. \\nYou will receive all *UIApplicationDelegate* callbacks, as they are forwarded to the original AppDelegate. \\n\\nRemember to not to change the *delegate* property of *UIApplication* after instantiating Pulsate.\",\n  \"title\": \"\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Authorization Keys\"\n}\n[/block]\nSDK App Key and SDK App ID are used to associate the Pulsate framework with your Pulsate application which was created using Pulsate web panel.\n\nSDK App ID and SDK App Key can be found in your app settings screen. To find them log into the Pulsate web interface and click the **CONFIGURE** icon on the main menu, your ID and KEY will be displayed here.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/8d58099-SDK_Connect.png\",\n        \"SDK Connect.png\",\n        2380,\n        378,\n        \"#e3e3e3\"\n      ]\n    }\n  ]\n}\n[/block]\nYou need to instantiate the *PULAuthorizationData* object with these keys: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"NSError* error;\\n\\nPULAuthorizationData* authData = [[PULAuthorizationData alloc] initWithAppId:@\\\"YOUR_SDK_APP_ID\\\" andAppKey:@\\\"YOUR_SDK_APP_KEY\\\" validationError:&error];\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"let authData: PULAuthorizationData = try PULAuthorizationData(appId: \\\"SDK_APP_ID\\\", andAppKey: \\\"SDK_APP_KEY\\\");\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Pulsate Factory\"\n}\n[/block]\nIn order to instantiate the Pulsate Manager you need to use the *PULPulsateFactory*. It creates and holds the Pulsate Manager instance, making sure there's only one per application.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"NSError* error;\\n\\nPULAuthorizationData* authData = [[PULAuthorizationData alloc] initWithAppId:@\\\"YOUR_SDK_APP_ID\\\" andAppKey:@\\\"YOUR_SDK_APP_KEY\\\" validationError:&error];\\n    \\nPULPulsateManageer* pulsateManager = [PULPulsateFactory getInstanceWithAuthorizationData:authData andLocationEnabled:YES withPushEnabled:YES withLaunchOptions:launchOptions error:&error];\\n\\n[pulsateManager startPulsateSession:^(BOOL success, NSError* error) {}];\\n    \",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"let authData: PULAuthorizationData = try PULAuthorizationData(appId: \\\"SDK_APP_ID\\\", andAppKey: \\\"SDK_APP_KEY\\\");\\n\\nlet pulsateManager = try PULPulsateFactory.getInstanceWith(authData, withLocationEnabled: true, withPushEnabled: true, withLaunchOptions: launchOptions, withPulsateAppDelegate: true);\\n        \\npulsateManager.startPulsateSession()\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n**Delaying startPulsate Session**\n\nYou can delay the *startPulsateSession* method call. For example, you can call it after the user successfully logins into your app so that only users that successfully log into your app are added to Pulsate and receive content from Pulsate. Here is an example of how to delay *startPulsateSession* until after the user has logged in:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"-(void)userLoggedInSuccessfully\\n{\\n  PULPulsateManager* pulsateManager = [PULPulsateFactory getDefaultInstance];\\n  [pulsateManager startPulsateSession:^(BOOL success, NSError* error) {}];\\n}\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"func userLoggedInSuccessfully() {\\n    let pulsateManager = PULPulsateFactory.getDefaultInstance();\\n    pulsateManager?.startPulsateSession();\\n}\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\nThe *startPulsateSession* method starts the session lifecycle and remote notifications, location if passed in parameters as *YES*. \n\nIf you delay the Pulsate Session make sure that *\"startPulsateSession\"* is still called in your *application:didFinishLaunchingWithOptions* method after the first session delay. \n\nIn the example below we delay the first session until the user logs in, after the first log the \"*startPulsateSession*\" will be called every time the *application:didFinishLaunchingWithOptions* method gets called by the system.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"#import <PULPulsate/PULPulsate.h>\\n\\n@implementation AppDelegate\\n\\n- (BOOL)application:(UIApplication *)application\\n  didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\\n    NSError* error;\\n\\n\\t\\tPULAuthorizationData* authData = [[PULAuthorizationData alloc] initWithAppId:@\\\"YOUR_SDK_APP_ID\\\" andAppKey:@\\\"YOUR_SDK_APP_KEY\\\" validationError:&error];\\n    \\n    PULPulsateManager* pulsateManager = [PULPulsateFactory getInstanceWithAuthorizationData:authData withLocationEnabled:YES withPushEnabled:YES withLaunchOptions:launchOptions error:&error];\\n\\n    if (userLoggedIn == YES)\\n\\t\\t\\t[_pulsateManager startPulsateSession:^(BOOL success, NSError* error) {}];\\n   \\n    return YES;\\n}\\n\\n\\n@end\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"import PULPulsate\\n\\nclass AppDelegate {\\n\\n\\t  func application(_ application: UIApplication, \\n    didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool\\n    {\\n        do\\n        {\\n            let authData: PULAuthorizationData = try PULAuthorizationData(appId: \\\"SDK_APP_ID\\\", andAppKey: \\\"SDK_APP_KEY\\\");\\n      \\n            let pulsateManager = try PULPulsateFactory.getInstanceWith(authData,\\n            withLocationEnabled: true, withPushEnabled: true, \\n            withLaunchOptions: launchOptions, withPulsateAppDelegate: true);\\n      \\n            if (userLoggedIn)\\n                pulsateManager.startPulsateSession();\\n        } catch {\\n    \\t      print(error);\\n        }\\n        return true;\\n    }\\n}\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\nThe factory will instantiate only one object per application. If a Pulsate Manger object already exists it will return it, instead of creating a new one.\n\nIn order to easily get the instantiated Pulsate Manager object you can use the *getDefaultInstance* method of the factory:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"PULPulsateManager* pulsateManager = [PULPulsateFactory getDefaultInstance];\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"let pulsateManager = PULPulsateFactory.getDefaultInstance()\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Authorization Prompts\"\n}\n[/block]\nDuring the Pulsate Manager instantiation you can declare if you want remote notifications or location authorization prompts to be shown when the *startPulsateSession* method is called. You can delay these prompts by passing *NO* and using  *startLocation*, *startRemoteNotifications* at your convenience.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"PULPulsateManager* pulsateManager = [PULPulsateFactory getInstanceWithAuthorizationData:authData andLocationEnabled:NO withRemoteNotificationsEnabled:NO withLaunchOptions:launchOptions error:&error];\\n\\n[pulsateManager startPulsateSession:^(BOOL success, NSError* error) {}];\\n\\n\\t// The session lifecycle has started, but without remote notifications \\tand location\\n\\n\\t//... \\n\\n\\t// At the time of your convenience you can start the modules you want and present the authorization prompts to the user.\\n\\n[pulsateManager startLocation];\\n\\n// You can also use the startRemoteNotificationsWithSettings: method if you want to pass custom UIUserNotificationSettings settings \\n[pulsateManager startRemoteNotifications];\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"let pulsateManager = try PULPulsateFactory.getInstanceWith(authData, withLocationEnabled: false, withPushEnabled: false, withLaunchOptions: launchOptions, withPulsateAppDelegate: true);\\n             \\npulsateManager.startPulsateSession()\\n\\n// The session lifecycle has started, but without remote notifications \\tand location\\n//... \\n// At the time of your convenience you can start the modules you want and present the authorization prompts to the user.\\n\\npulsateManager.startLocation()\\n// You can also use the startRemoteNotificationsWithSettings: method if you want to pass custom UIUserNotificationSettings settings \\npulsateManager.startRemoteNotifications()\\n\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"running-the-pulsate-sdk","type":"basic","title":"Running the Pulsate SDK"}

Running the Pulsate SDK


After you've successfully integrated the Pulsate SDK with your project you should import the library umbrella header: [block:code] { "codes": [ { "code": "#import <PULPulsate/PULPulsate.h>", "language": "objectivec" } ] } [/block] [block:code] { "codes": [ { "code": "import PULPulsate", "language": "swift" } ] } [/block] iOS enables CoreLocation to wake up a terminated apps so they can react to monitored regions actions. In order for that functionality to work you need to instantiate the Pulsate SDK in *application:didFinishLaunchingWithOptions* method of your *AppDelegate* and pass the *launchOptions* dictionary to Pulsate. [block:code] { "codes": [ { "code": "#import <PULPulsate/PULPulsate.h>\n\n@implementation AppDelegate\n\n- (BOOL)application:(UIApplication *)application\n didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n NSError* authError;\n\n\t\tPULAuthorizationData* authData = [[PULAuthorizationData alloc] initWithAppId:@\"YOUR_SDK_APP_ID\" andAppKey:@\"YOUR_SDK_APP_KEY\" validationError:&authError];\n\n if (authError == nill)\n {\n NSError* managerError;\n PULPulsateManager* pulsateManager = [PULPulsateFactory getInstanceWithAuthorizationData:authData withLocationEnabled:YES withPushEnabled:YES withLaunchOptions:launchOptions error:&managerError];\n \n if (managerError == nil)\n {\n [_pulsateManager startPulsateSession::^(BOOL success, NSError* error) {}];\n }\n }\n return YES;\n}\n\n\n@end", "language": "objectivec" } ] } [/block] [block:code] { "codes": [ { "code": "import PULPulsate\n\nclass AppDelegate {\n\n\t func application(_ application: UIApplication, \n didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool\n {\n do\n {\n let authData: PULAuthorizationData = try PULAuthorizationData(appId: \"SDK_APP_ID\", andAppKey: \"SDK_APP_KEY\");\n \n let pulsateManager = try PULPulsateFactory.getInstanceWith(authData,\n withLocationEnabled: true, withPushEnabled: true, \n withLaunchOptions: launchOptions, withPulsateAppDelegate: true);\n \n pulsateManager.startPulsateSession();\n } catch {\n \t print(error);\n }\n return true;\n }\n}", "language": "swift" } ] } [/block] [block:callout] { "type": "info", "body": "Pulsate SDK sets a new delegate for *UIApplication* so it can do all the heavy lifting for you. \nYou will receive all *UIApplicationDelegate* callbacks, as they are forwarded to the original AppDelegate. \n\nRemember to not to change the *delegate* property of *UIApplication* after instantiating Pulsate.", "title": "" } [/block] [block:api-header] { "type": "basic", "title": "Authorization Keys" } [/block] SDK App Key and SDK App ID are used to associate the Pulsate framework with your Pulsate application which was created using Pulsate web panel. SDK App ID and SDK App Key can be found in your app settings screen. To find them log into the Pulsate web interface and click the **CONFIGURE** icon on the main menu, your ID and KEY will be displayed here. [block:image] { "images": [ { "image": [ "https://files.readme.io/8d58099-SDK_Connect.png", "SDK Connect.png", 2380, 378, "#e3e3e3" ] } ] } [/block] You need to instantiate the *PULAuthorizationData* object with these keys: [block:code] { "codes": [ { "code": "NSError* error;\n\nPULAuthorizationData* authData = [[PULAuthorizationData alloc] initWithAppId:@\"YOUR_SDK_APP_ID\" andAppKey:@\"YOUR_SDK_APP_KEY\" validationError:&error];", "language": "objectivec" } ] } [/block] [block:code] { "codes": [ { "code": "let authData: PULAuthorizationData = try PULAuthorizationData(appId: \"SDK_APP_ID\", andAppKey: \"SDK_APP_KEY\");", "language": "swift" } ] } [/block] [block:api-header] { "type": "basic", "title": "Pulsate Factory" } [/block] In order to instantiate the Pulsate Manager you need to use the *PULPulsateFactory*. It creates and holds the Pulsate Manager instance, making sure there's only one per application. [block:code] { "codes": [ { "code": "NSError* error;\n\nPULAuthorizationData* authData = [[PULAuthorizationData alloc] initWithAppId:@\"YOUR_SDK_APP_ID\" andAppKey:@\"YOUR_SDK_APP_KEY\" validationError:&error];\n \nPULPulsateManageer* pulsateManager = [PULPulsateFactory getInstanceWithAuthorizationData:authData andLocationEnabled:YES withPushEnabled:YES withLaunchOptions:launchOptions error:&error];\n\n[pulsateManager startPulsateSession:^(BOOL success, NSError* error) {}];\n ", "language": "objectivec" } ] } [/block] [block:code] { "codes": [ { "code": "let authData: PULAuthorizationData = try PULAuthorizationData(appId: \"SDK_APP_ID\", andAppKey: \"SDK_APP_KEY\");\n\nlet pulsateManager = try PULPulsateFactory.getInstanceWith(authData, withLocationEnabled: true, withPushEnabled: true, withLaunchOptions: launchOptions, withPulsateAppDelegate: true);\n \npulsateManager.startPulsateSession()", "language": "swift" } ] } [/block] **Delaying startPulsate Session** You can delay the *startPulsateSession* method call. For example, you can call it after the user successfully logins into your app so that only users that successfully log into your app are added to Pulsate and receive content from Pulsate. Here is an example of how to delay *startPulsateSession* until after the user has logged in: [block:code] { "codes": [ { "code": "-(void)userLoggedInSuccessfully\n{\n PULPulsateManager* pulsateManager = [PULPulsateFactory getDefaultInstance];\n [pulsateManager startPulsateSession:^(BOOL success, NSError* error) {}];\n}", "language": "objectivec" } ] } [/block] [block:code] { "codes": [ { "code": "func userLoggedInSuccessfully() {\n let pulsateManager = PULPulsateFactory.getDefaultInstance();\n pulsateManager?.startPulsateSession();\n}", "language": "swift" } ] } [/block] The *startPulsateSession* method starts the session lifecycle and remote notifications, location if passed in parameters as *YES*. If you delay the Pulsate Session make sure that *"startPulsateSession"* is still called in your *application:didFinishLaunchingWithOptions* method after the first session delay. In the example below we delay the first session until the user logs in, after the first log the "*startPulsateSession*" will be called every time the *application:didFinishLaunchingWithOptions* method gets called by the system. [block:code] { "codes": [ { "code": "#import <PULPulsate/PULPulsate.h>\n\n@implementation AppDelegate\n\n- (BOOL)application:(UIApplication *)application\n didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n NSError* error;\n\n\t\tPULAuthorizationData* authData = [[PULAuthorizationData alloc] initWithAppId:@\"YOUR_SDK_APP_ID\" andAppKey:@\"YOUR_SDK_APP_KEY\" validationError:&error];\n \n PULPulsateManager* pulsateManager = [PULPulsateFactory getInstanceWithAuthorizationData:authData withLocationEnabled:YES withPushEnabled:YES withLaunchOptions:launchOptions error:&error];\n\n if (userLoggedIn == YES)\n\t\t\t[_pulsateManager startPulsateSession:^(BOOL success, NSError* error) {}];\n \n return YES;\n}\n\n\n@end", "language": "objectivec" } ] } [/block] [block:code] { "codes": [ { "code": "import PULPulsate\n\nclass AppDelegate {\n\n\t func application(_ application: UIApplication, \n didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool\n {\n do\n {\n let authData: PULAuthorizationData = try PULAuthorizationData(appId: \"SDK_APP_ID\", andAppKey: \"SDK_APP_KEY\");\n \n let pulsateManager = try PULPulsateFactory.getInstanceWith(authData,\n withLocationEnabled: true, withPushEnabled: true, \n withLaunchOptions: launchOptions, withPulsateAppDelegate: true);\n \n if (userLoggedIn)\n pulsateManager.startPulsateSession();\n } catch {\n \t print(error);\n }\n return true;\n }\n}", "language": "swift" } ] } [/block] The factory will instantiate only one object per application. If a Pulsate Manger object already exists it will return it, instead of creating a new one. In order to easily get the instantiated Pulsate Manager object you can use the *getDefaultInstance* method of the factory: [block:code] { "codes": [ { "code": "PULPulsateManager* pulsateManager = [PULPulsateFactory getDefaultInstance];", "language": "objectivec" } ] } [/block] [block:code] { "codes": [ { "code": "let pulsateManager = PULPulsateFactory.getDefaultInstance()", "language": "swift" } ] } [/block] [block:api-header] { "type": "basic", "title": "Authorization Prompts" } [/block] During the Pulsate Manager instantiation you can declare if you want remote notifications or location authorization prompts to be shown when the *startPulsateSession* method is called. You can delay these prompts by passing *NO* and using *startLocation*, *startRemoteNotifications* at your convenience. [block:code] { "codes": [ { "code": "PULPulsateManager* pulsateManager = [PULPulsateFactory getInstanceWithAuthorizationData:authData andLocationEnabled:NO withRemoteNotificationsEnabled:NO withLaunchOptions:launchOptions error:&error];\n\n[pulsateManager startPulsateSession:^(BOOL success, NSError* error) {}];\n\n\t// The session lifecycle has started, but without remote notifications \tand location\n\n\t//... \n\n\t// At the time of your convenience you can start the modules you want and present the authorization prompts to the user.\n\n[pulsateManager startLocation];\n\n// You can also use the startRemoteNotificationsWithSettings: method if you want to pass custom UIUserNotificationSettings settings \n[pulsateManager startRemoteNotifications];", "language": "objectivec" } ] } [/block] [block:code] { "codes": [ { "code": "let pulsateManager = try PULPulsateFactory.getInstanceWith(authData, withLocationEnabled: false, withPushEnabled: false, withLaunchOptions: launchOptions, withPulsateAppDelegate: true);\n \npulsateManager.startPulsateSession()\n\n// The session lifecycle has started, but without remote notifications \tand location\n//... \n// At the time of your convenience you can start the modules you want and present the authorization prompts to the user.\n\npulsateManager.startLocation()\n// You can also use the startRemoteNotificationsWithSettings: method if you want to pass custom UIUserNotificationSettings settings \npulsateManager.startRemoteNotifications()\n", "language": "swift" } ] } [/block]