Configure Marketing Cloud Engagement
Runtime Toggles
Add Beacon Support
Enable Background Location Updates
Segment Location Messages
Event Tracking
Handle URLs
Data Protection and Privacy
Changelog
Beacon support is enabled when you implement the location requirements for iOS location messaging.
To range for beacons in the background, add an entry to your app’s Info.plist. This permission ensures that your app can range for beacons when your app is in the background or suspended.
The SDK suppresses beacon messages with no content. If you include AMPscript or a merge field in your message that returns an empty string, your app doesn’t display that message to the user.
Important
To understand how beacons behave in different situations, see Salesforce Help: MobilePush Beacon Scenarios.
If you create your own CLLocationManager object, we can’t guarantee that features of our SDK work as intended.
If you have enabled notifications using MarketingCloudSDK and have called mp.startWatchingLocation(), you can access the device’s last known location using the SDK.
1MarketingCloudSdk.requestSdk { mc in
2 let location = mc?.lastKnownLocation()
3}1SFMCSdk.requestPushSdk { mp in
2 let location = mp.lastKnownLocation()
3}1let location = MarketingCloudSDK.sharedInstance().sfmc_lastKnownLocation()