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 ))completionParameters
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 ))completionParameters
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 ))completionParameters
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)startListeningForUpdatesDeclared In
MRSharingSession.h
– stopListeningForUpdates
	Stops listening for updates in friends.
- (void)stopListeningForUpdatesDeclared In
MRSharingSession.h
– startPostingLocationUpdates
	Begins posting location updates until stopPostingLocationUpdates is called.
- (void)startPostingLocationUpdatesDeclared In
MRSharingSession.h
– stopPostingLocationUpdates
	Stops posting location updates.
- (void)stopPostingLocationUpdatesDeclared In
MRSharingSession.h
  delegate
	The delegate for this session.
@property (nonatomic, weak, nullable) id<MRSharingSessionDelegate> delegateDeclared In
MRSharingSession.h
  key
	The authenticated user’s identifier.
@property (nonatomic, readonly) MREditorKey *keyDeclared In
MRSharingSession.h
  appKey
	The appKey for this session.
@property (nonatomic, readonly) MREditorKey *appKeyDeclared 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 pollIntervalDeclared In
MRSharingSession.h
  backgroundEnabled
	If set, allows SDK to request for “always” location permission. Defaults to “NO”
@property (nonatomic, readwrite, assign) BOOL backgroundEnabledDeclared In
MRSharingSession.h