MPIdentityApi Class Reference
Inherits from | NSObject |
---|---|
Declared in | MPIdentityApi.h |
currentUser
The current user. All actions taken in the SDK will be associated with this user (e.g. logging events, setting attributes, etc.)
@property (nonatomic, strong, readonly, nullable) MParticleUser *currentUser
Discussion
The current user. All actions taken in the SDK will be associated with this user (e.g. logging events, setting attributes, etc.)
Declared In
MPIdentityApi.h
deviceApplicationStamp
The device application stamp. This is a random identifier associated with this particular app as installed on this particular device.
@property (nonatomic, strong, readonly, nonnull) NSString *deviceApplicationStamp
Discussion
The device application stamp. This is a random identifier associated with this particular app as installed on this particular device.
The value persists throughout the lifetime of the app being installed, even if the user changes.
Declared In
MPIdentityApi.h
– getUser:
Returns the user with the given MPID, or nil if no such user is known to the SDK.
- (nullable MParticleUser *)getUser:(NSNumber *)mpId
Discussion
Returns the user with the given MPID, or nil if no such user is known to the SDK.
Declared In
MPIdentityApi.h
– getAllUsers
Returns all users known to the SDK, ordered by last seen date.
- (nonnull NSArray<MParticleUser*> *)getAllUsers
Discussion
Returns all users known to the SDK, ordered by last seen date.
The ordering is going backwards in time such that the most recently seen user is at index 0.
Declared In
MPIdentityApi.h
– identify:completion:
Requests that the server return a MPID for the current set of device and user identities.
- (void)identify:(MPIdentityApiRequest *)identifyRequest completion:(nullable MPIdentityApiResultCallback)completion
Discussion
Requests that the server return a MPID for the current set of device and user identities.
This method is called automatically by the SDK on startup and typically should not be called manually.
Declared In
MPIdentityApi.h
– identifyWithCompletion:
Performs an identify request without explicitly specifying a request object.
- (void)identifyWithCompletion:(nullable MPIdentityApiResultCallback)completion
Discussion
Performs an identify request without explicitly specifying a request object.
Declared In
MPIdentityApi.h
– login:completion:
Indicates that the user has logged in, usually transitioning from anonymous.
- (void)login:(MPIdentityApiRequest *)loginRequest completion:(nullable MPIdentityApiResultCallback)completion
Discussion
Indicates that the user has logged in, usually transitioning from anonymous.
The completion handler for this method is typically where you will send an alias request.
Declared In
MPIdentityApi.h
– loginWithCompletion:
Performs a login request without explicitly specifying a request object.
- (void)loginWithCompletion:(nullable MPIdentityApiResultCallback)completion
Discussion
Performs a login request without explicitly specifying a request object.
Declared In
MPIdentityApi.h
– logout:completion:
Indicates that the current user has logged out.
- (void)logout:(MPIdentityApiRequest *)logoutRequest completion:(nullable MPIdentityApiResultCallback)completion
Discussion
Indicates that the current user has logged out.
Declared In
MPIdentityApi.h
– logoutWithCompletion:
Performs a logout request without explicitly specifying a request object.
- (void)logoutWithCompletion:(nullable MPIdentityApiResultCallback)completion
Discussion
Performs a logout request without explicitly specifying a request object.
Declared In
MPIdentityApi.h
– modify:completion:
This method should only be used in certain uncommon circumstances, e.g. if the user modifies their account to update their email address.
- (void)modify:(MPIdentityApiRequest *)modifyRequest completion:(nullable MPModifyApiResultCallback)completion
Discussion
This method should only be used in certain uncommon circumstances, e.g. if the user modifies their account to update their email address.
Declared In
MPIdentityApi.h
– aliasUsers:
Performs an alias request to copy data from one user to another for a particular time period.
- (BOOL)aliasUsers:(MPAliasRequest *)aliasRequest
Return Value
Whether preliminary local validation of the request succeeded.
Discussion
Performs an alias request to copy data from one user to another for a particular time period.
Declared In
MPIdentityApi.h