FSQPPilgrimManager Class Reference
FSQPPilgrimManager
Class for configuring the Pilgrim SDK in your app to get background location updates with context.
Delegate
A delegate object that you control that receives updates when new locations are visited. You may change this at any time. If you set this to nil, the location manager will continue running, but you will not receive updates until you set it again.
Declaration
debugLogsEnabled
Saves detailed logs of activity for debugging purposes.
Declaration
liveDebugEnabled
Enable to see live debug events in the developer console while in development.
Declaration
disableAdIdentitySharing
Disable sharing of advertising identity data.
Declaration
pilgrimSDKVersionString
Version string for Pilgrim SDK.
Declaration
lastKnownUserState
The most recently retrieved user state. The value of this property is nil if no user state has ever been retrieved.
Declaration
+sharedManager
A global shared instance of the Pilgrim SDK that should be used for configuring your consumer key and delegate.
Declaration
Return Value
The shared instance of the Pilgrim SDK
-configureWithConsumerKey:secret:delegate:completion:
Configure the Pilgrim SDK with your consumer key and secret, and add a delegate for subscribing to location updates. This method is safe to call more than once, but consumer key and secret must remain the same.
Declaration
Parameters
<br> key<br> |
Your app’s consumer key |
<br> secret<br> |
Your app’s consumer secret |
<br> delegate<br> |
(optional) A delegate for receiving location updates |
<br> completion<br> |
(optional) A completion handler to be called after configuration is done, for example to call startMonitoringVisits. |
-updateConfigurationWithConsumerKey:secret:
Update your configuration to use a new consumer key and secret.
Declaration
Parameters
<br> key<br> |
Your app’s updated consumer key |
<br> secret<br> |
Your app’s updated consumer secret |
-start
Call this after configuring the SDK to start the SDK and begin receiving location updates.
Declaration
-stop
Stop receiving location updates, until you call start again.
Declaration
-clearAllData:
Remove all visit history, including resetting the home/work model.
Declaration
Parameters
<br> completion<br> |
(optional) A completion handler to be called when finished. |
-debugLogs
Declaration
Return Value
An array of recent Debug logs, maximum 250.
-debugLogsWithCompletion:
Gets an array of recent Debug logs and delivers them to the completion handler.
Declaration
-deleteDebugLogs
Deletes debug logs from disk.
Declaration
-presentDebugViewController:
Initializes a debug mode view controller for viewing PilgrimSDK logs and presents it.
Declaration
Parameters
<br> parentViewController<br> |
the parent view controller presenting the debug view controller. |
-getCurrentLocationWithCompletion:
Gets the current location of the user. This includes possibly a visit and an array of geofences.
Declaration
Parameters
<br> completion<br> |
A completion handler to be called when finished. |
visitTester
Helper for testing visit. Asserts if no delegate is set.
Declaration
feedbackProvider
Use to provide feedback on visits for Foursquare to use to improve. This will be non-null once the location manager is configured.
Declaration
userInfo
For applications utilizing the server-to-server method for visit notifications, you can use this to pass through your own identifier to the notification endpoint call.
Declaration
-setUserInfo:persisted:
Declaration
Parameters
<br> persisted<br> |
Set to true to persist the user info data. |
oauthToken
For applications with logged in Foursquare users pass the users oauth token to pilgrim.
Declaration
installId
Returns a unique identifier that gets generated the first time this sdk runs on a specific device.
Declaration
-hasHomeOrWork
It can take several days to make a high confidence estimate of the user’s home and work locations.
Declaration
Return Value
YES if we have identified either a high confidence home or work venue.
homeLocations
Returns home locations. This returns an array of NSValue objects wrapping CLLocationCoordinate2D values (use property MKCoordinateValue).
Declaration
Return Value
Any home locations that exist.
workLocations
Returns work locations. This returns an array of NSValue objects wrapping CLLocationCoordinate2D values (use property MKCoordinateValue).
Declaration
Return Value
Any work locations that exist.
-startJourney:destinationType:withMetadata:completion:
Begin a journey to a Foursquare venue or geofence by passing the destination id as well any metadata you’d like to accompany the start request. Once a journey has been started you will automatically receive updates via the pilgrimManager:handleJourneyUpdate delegate method. Updates will occur roughly once per minute while the journey is active.
Declaration
Parameters
<br> destinationId<br> |
The destination id |
<br> destinationType<br> |
The destination type (venue or geofence) |
<br> metadata<br> |
(optional) Metadata to accompany the start request |
<br> completion<br> |
(optional) Completion handler that returns an error if the call fails and nil if it succeeds |
-checkinJourneyWithCompletion:
Checkin at the current journey’s destination, stop all journey updates and set currentJourney to nil. If successful, this method will cause a final journey update with a status of “completed.”
Declaration
Parameters
<br> completion<br> |
(optional) Completion handler that returns an error if the call fails and nil if it succeeds |
-cancelJourneyWithCompletion:
Cancel the current journey, stop all journey updates and set currentJourney to nil. If successful, this method will cause a final journey update with a status of “cancelled.”
Declaration
Parameters
<br> completion<br> |
(optional) Completion handler that returns an error if the call fails and nil if it succeeds |
-completeJourneyWithCompletion:
Complete the current journey, stop all journey updates and set currentJourney to nil. If successful, this method will cause a final journey update with a status of “completed.”
Declaration
Parameters
<br> completion<br> |
(optional) Completion handler that returns an error if the call fails and nil if it succeeds |
-currentJourney
Access data about a currently running journey. This method will return nil when there is not current journey running.
Declaration
-isEnabled
Is Pilgrim currently enabled.
Declaration
-init
Unavailable. Use sharedManager instead.
Declaration
+new
Unavailable. Use sharedManager instead.