Pulsate iOS SDK is a static library built with slices for arm7, arm64 and simulator architecture. It's a bridge between your customers' mobile devices and the Pulsate server. It's very easy to use, and even easier to install thanks to the CocoaPods dependency manager.

1. Setup CocoaPods

CocoaPods is built in Ruby and you can install it with the Terminal:

$ sudo gem install cocoapods

After you install CocoaPods, you can setup the files needed to integrate by going to your XCode project folder and running:

$ pod init

If you have any problems, please refer to the official CocoaPods Getting Started document.

2. Add Dependency

The last step should produce the Podfile file, where you declare all your dependencies. You need to add a PULPulsate dependency:

# Uncomment this line if you're using Swift
# use_frameworks!

target 'PulsateDemoProject' do

pod 'PULPulsate'

end

After saving the Podfile you can run the command that will install your dependencies and set your project to use them:

$ pod install

📘

After integrating CocoaPods with your project, please remember to always use the *.xcworkspace file, not *.xcodeproj to open your project.

❗️

Updating your pods

You can update your pods by using:

$ pod update

Please be careful when updating the PULPulsate pod. It'll overwrite all the UI and language customizations you might have in your PULPulsateBasic.bundle. Please keep a copy of your customizations when updating.

3. Adding CoreLocation Authorization Key

iOS 8.0 and later requires adding "NSLocationAlwaysUsageDescription" to your *.plist file for CoreLocation to work.
iOS 11 and later requires adding the "NSLocationAlwaysAndWhenInUseUsageDescription" and "NSLocationWhenInUseUsageDescription" keys.

Add all three keys to your project’s Info.plist containing the message to be displayed to the user at the prompt. For example "We use this to provide the best experience possible inside our store. We also send relevant communications based on your location."

17561756

🚧

When In Use Permission

If your app already has the When In Use permission, there's no way to show the location prompt second time. The only way for the users to update the permission from When In Use to Always is in the settings. You can open the settings for the user programatically:

NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
[[UIApplication sharedApplication] openURL:url];

or send them a campaign with app-settings: deeplink.