Add the Pulsate iOS SDK to your app and configure the location usage keys.
The Pulsate iOS SDK is the bridge between your customers' mobile devices and the Pulsate server. It ships as a precompiled PULPulsate.framework and is imported into your app as import PULPulsate.
Deployment target
The SDK supports iOS 13.0 and later.
1. Add the PULPulsate dependency
Pulsate distributes the SDK through Swift Package Manager (SPM). From Xcode 11 onwards, you can use Swift Package Manager to add the Pulsate SDK to your project.
- In Xcode, select File → Swift Packages → Add Package Dependency.
- Enter the repository URL:
https://github.com/PulsateHQ/pulsate-ios-sdk.git - Specify the version: 4.7.2 or later.
- Add the
PULPulsatelibrary to your app target.
Import it anywhere you use Pulsate:
import PULPulsate
2. Add the location usage keys
Pulsate uses CoreLocation for geofencing. Add the following keys to your app's Info.plist, each with a message explaining to the user why location access is requested:
| Key | Purpose |
|---|---|
NSLocationWhenInUseUsageDescription | Shown when requesting foreground location |
NSLocationAlwaysAndWhenInUseUsageDescription | Shown when requesting always-on location |
For example:
We use this to provide the best experience possible inside our store. We also send relevant communications based on your location.
"When In Use" already granted
If your app already has When In Use permission, iOS won't show the location prompt again. The only way for a user to upgrade from When In Use to Always is in the system Settings app. You can open Settings for them programmatically:
if let url = URL(string: UIApplication.openSettingsURLString) { UIApplication.shared.open(url) }Alternatively, send them a campaign with an
app-settings:deeplink.
Next steps
Once the SDK is installed, continue to Running the Pulsate SDK.

