Before trying to run Pulsate make sure you have properly installed Pulsate - https://pulsate.readme.io/v2.7/docs/installing-the-ios-pulsate-sdk

1. Initializing PULPulsateFactory

The PULPulsateFactory creates and holds the Pulsate Manager instance, making sure there's only one per application. For Pulsate to properly work you must initialize it in the application:didFinishLaunchingWithOptions method of your AppDelegate.

#import <PULPulsate/PULPulsate.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
  didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    NSError* authError;

        PULAuthorizationData* authData = [[PULAuthorizationData alloc] initWithAppId:@"YOUR_SDK_APP_ID" andAppKey:@"YOUR_SDK_APP_KEY" validationError:&authError];

    if (authError == nill)
    {
        NSError* managerError;
        PULPulsateManager* pulsateManager = [PULPulsateFactory getInstanceWithAuthorizationData:authData withLocationEnabled:YES withPushEnabled:YES withLaunchOptions:launchOptions error:&managerError];
      
        if (managerError == nil)
        {
            [_pulsateManager startPulsateSession::^(BOOL success, NSError* error) {}];
        }
    }
    return YES;
}


@end
import PULPulsate

class AppDelegate {

      func application(_ application: UIApplication, 
    didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
    {
        do
        {
            let authData: PULAuthorizationData = try PULAuthorizationData(appId: "YOUR_SDK_APP_ID", andAppKey: "YOUR_SDK_APP_KEY");
      
            let pulsateManager = try PULPulsateFactory.getInstanceWith(authData,
            withLocationEnabled: true, withPushEnabled: true, 
            withLaunchOptions: launchOptions, withPulsateAppDelegate: true);
      
            pulsateManager.startPulsateSession();
        } catch {
              print(error);
        }
        return true;
    }
}

iOS enables CoreLocation to wake up terminated apps so they can react to geofences and beacons. In order for that functionality to work you need to initialize the Pulsate SDK in the application:didFinishLaunchingWithOptions method of your AppDelegate and pass the launchOptions dictionary to Pulsate.

After you successfully initialize PULPulsateFactory and create a PULPulsateManager you can later access the PULPulsateManager anywhere in your App by using the getDefaultInstance method.

PULPulsateManager* pulsateManager = [PULPulsateFactory getDefaultInstance];
let pulsateManager = PULPulsateFactory.getDefaultInstance()

📘

Pulsate SDK sets a new delegate for UIApplication so it can do all the heavy lifting for you.
You will receive all UIApplicationDelegate callbacks, as they are forwarded to the original AppDelegate.

Remember to not to change the delegate property of UIApplication after instantiating Pulsate.

2. Authorization Keys

SDK App ID and SDK App Key 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.

23802380

You need to instantiate the PULAuthorizationData object with these keys:

NSError* error;

PULAuthorizationData* authData = [[PULAuthorizationData alloc] initWithAppId:@"YOUR_SDK_APP_ID" andAppKey:@"YOUR_SDK_APP_KEY" validationError:&error];
let authData: PULAuthorizationData = try PULAuthorizationData(appId: "YOUR_SDK_APP_ID", andAppKey: "YOUR_SDK_APP_KEY");