RLMApp
@interface RLMApp : NSObject
The RLMApp
has the fundamental set of methods for communicating with a Realm
application backend.
This interface provides access to login and authentication.
-
The configuration for this Realm app.
Declaration
Objective-C
@property (readonly, nonatomic) RLMAppConfiguration *_Nonnull configuration;
-
The
RLMSyncManager
for this Realm app.Declaration
Objective-C
@property (readonly, nonatomic) RLMSyncManager *_Nonnull syncManager;
-
Get an application with a given appId and configuration.
Declaration
Objective-C
+ (nonnull instancetype)appWithId:(nonnull NSString *)appId;
Parameters
appId
The unique identifier of your Realm app.
-
Get an application with a given appId and configuration.
Declaration
Objective-C
+ (nonnull instancetype)appWithId:(nonnull NSString *)appId configuration:(nullable RLMAppConfiguration *)configuration;
Parameters
appId
The unique identifier of your Realm app.
configuration
A configuration object to configure this client.
-
Get a dictionary containing all users keyed on id.
Declaration
Objective-C
- (nonnull NSDictionary<NSString *, RLMUser *> *)allUsers;
-
Get the current user logged into the Realm app.
Declaration
Objective-C
- (nullable RLMUser *)currentUser;
-
A client for the email/password authentication provider which can be used to obtain a credential for logging in.
Used to perform requests specifically related to the email/password provider.
Declaration
Objective-C
- (nonnull RLMEmailPasswordAuth *)emailPasswordAuth;
-
Login to a user for the Realm app.
Declaration
Objective-C
- (void)loginWithCredential:(nonnull RLMCredentials *)credentials completion:(nonnull RLMUserCompletionBlock)completion;
Parameters
credentials
The credentials identifying the user.
completion
A callback invoked after completion.
-
Switches the active user to the specified user.
This sets which user is used by all RLMApp operations which require a user. This is a local operation which does not access the network. An exception will be throw if the user is not valid. The current user will remain logged in.
Parameters
syncUser
The user to switch to. @returns The user you intend to switch to
-
A client which can be used to register devices with the server to receive push notificatons
Declaration
Objective-C
- (nonnull RLMPushClient *)pushClientWithServiceName: (nonnull NSString *)serviceName;
-
Unavailable
Use +appWithId or appWithId:configuration:.
RLMApp instances are cached internally by Realm and cannot be created directly.
Use
+[RLMRealm appWithId]
or+[RLMRealm appWithId:configuration:]
to obtain a reference to an RLMApp.Declaration
Objective-C
- (nonnull instancetype)init;
-
Unavailable
Use +appWithId or appWithId:configuration:.
RLMApp instances are cached internally by Realm and cannot be created directly.
Use
+[RLMRealm appWithId]
or+[RLMRealm appWithId:configuration:]
to obtain a reference to an RLMApp.Declaration
Objective-C
+ (nonnull instancetype)new;
-
Use this delegate to be provided a callback once authentication has succeed or failed.
Declaration
Objective-C
@property (nonatomic, nullable) id<RLMASLoginDelegate> authorizationDelegate;
-
Sets the ASAuthorizationControllerDelegate to be handled by
RLMApp
Declaration
Objective-C
- (void)setASAuthorizationControllerDelegateForController:(id)controller;
Parameters
controller
The ASAuthorizationController in which you want
RLMApp
to consume its delegate.