MRCampaignManager Class Reference
Inherits from | NSObject |
---|---|
Declared in | MRCampaignManager.h |
Overview
Monitors all of the proximity beacons for a Meridian app identified with MREditorKey
.
Use of this class prompts end users to opt in to use Location Services.
You must set the message at the opt-in prompt.
To do this, in Info.plist, use the NSLocationAlwaysUsageDescription
key to set the “purpose string”.
Use [CLLocationManager locationServicesEnabled]
and related properties to check whether
the end user has opted in to Location Services.
delegate
A delegate object to handle campaign events. Campaign events are triggered when a device enters or exits a proximity beacon’s range.
@property (nullable, nonatomic, weak) id<MRCampaignManagerDelegate> delegate
Declared In
MRCampaignManager.h
– initWithApp:
Initializes a MRCampaignManager
object with the MREditorKey
Meridian app identifier.
- (instancetype)initWithApp:(MREditorKey *)appKey
Parameters
appKey |
A key representing a Meridian app. |
---|
Declared In
MRCampaignManager.h
– startMonitoring
Start monitoring regions defined by proximity beacons. Monitoring continues until stopMonitoring
is called,
even if your application is running in the background or terminated. Entry and exit events will trigger any
associated campaigns.
- (void)startMonitoring
Declared In
MRCampaignManager.h
– stopMonitoring
Stop monitoring proximity beacon regions.
- (void)stopMonitoring
Declared In
MRCampaignManager.h
– resetCampaign:withCompletionHandler:
The Meridian Editor protects against campaign notifications being triggered repeatedly by establishing a cooldown period for each campaign. For testing purposes, use this method to manually reset the cooldown period.
- (void)resetCampaign:(NSString *)campaignId withCompletionHandler:(MRCampaignResetHandler _Nullable)completionHandler
Parameters
campaignId |
The campaign to reset |
---|---|
completionHandler |
The completion handler to call when the reset request is complete. |
Declared In
MRCampaignManager.h
– resetAllCampaignsWithCompletionHandler:
The Meridian Editor protects against campaign notifications being triggered repeatedly by establishing a cooldown period for each campaign. For testing purposes, use this method to manually reset the cooldown period.
- (void)resetAllCampaignsWithCompletionHandler:(MRCampaignResetHandler _Nullable)completionHandler
Parameters
completionHandler |
The completion handler to call when the reset request is complete. |
---|
Declared In
MRCampaignManager.h