MRSharingSession Class Reference

Inherits from NSObject
Declared in MRSharingSession.h

Overview

Represents an authenticated user. Used to authorize requests on the MRFriend and MRInvite. Additionally will post location changes and listen for updates in friend locations.

+ createAccountWithPassword:name:appKey:completion:

The password to create the account with

+ (void)createAccountWithPassword:(NSString *)password name:(NSString *)name appKey:(MREditorKey *)appKey completion:(void ( ^ _Nullable ) ( MRSharingSession *_Nullable session , NSError *_Nullable error ))completion

Parameters

password

The password to create the account with

name

User’s name

appKey

App key the user belongs to

completion

Block to be called upon completion with a MRSharingSession or an error

Declared In

MRSharingSession.h

+ loginWithKey:password:appKey:completion:

User’s identifier

+ (void)loginWithKey:(MREditorKey *)key password:(NSString *)password appKey:(MREditorKey *)appKey completion:(void ( ^ _Nullable ) ( MRSharingSession *_Nullable session , NSError *_Nullable error ))completion

Parameters

key

User’s identifier

password

User’s password

appKey

App key the user belongs to

completion

Block to be called upon completion with a MRSharingSession or an error

Declared In

MRSharingSession.h

– deleteAccountWithCompletion:

Block to be called upon completion with an error upon failure

- (NSOperation *)deleteAccountWithCompletion:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completion

Parameters

completion

Block to be called upon completion with an error upon failure

Declared In

MRSharingSession.h

– startListeningForUpdates

Begins listening for updates in friends until stopListeningForUpdates is called. Changes will call the delegate’s friendSession:friendsDidUpdate: method.

- (void)startListeningForUpdates

Declared In

MRSharingSession.h

– stopListeningForUpdates

Stops listening for updates in friends.

- (void)stopListeningForUpdates

Declared In

MRSharingSession.h

– startPostingLocationUpdates

Begins posting location updates until stopPostingLocationUpdates is called.

- (void)startPostingLocationUpdates

Declared In

MRSharingSession.h

– stopPostingLocationUpdates

Stops posting location updates.

- (void)stopPostingLocationUpdates

Declared In

MRSharingSession.h

  delegate

The delegate for this session.

@property (nonatomic, weak, nullable) id<MRSharingSessionDelegate> delegate

Declared In

MRSharingSession.h

  key

The authenticated user’s identifier.

@property (nonatomic, readonly) MREditorKey *key

Declared In

MRSharingSession.h

  appKey

The appKey for this session.

@property (nonatomic, readonly) MREditorKey *appKey

Declared In

MRSharingSession.h

  pollInterval

The interval in seconds between friend location update server requests. The interval must be between 1-120. The default is 5. More frequent intervals may negatively affect battery life.

@property (nonatomic, assign) NSUInteger pollInterval

Declared In

MRSharingSession.h