OMCMobileBackendManager Class Reference
Inherits from | NSObject |
---|---|
Declared in | OMCMobileBackendManager.h |
Overview
The mobile backend manager is the entry point to the Oracle Mobile Cloud Service SDK. It is responsible for building and holding the various mobile backends.
defaultMobileBackend
The mobile backend manager’s default mobile backend. This is the mobile backend
designated as the the “default” mobile backend in the OMC property list file
(OMC.plist
).
@property (readonly, nonatomic, nullable) OMCMobileBackend *defaultMobileBackend
Discussion
The default mobile backend can be designated by adding a boolean flag named
default
to the corresponding mobile backend’s dictionary in the OMC property
list file (OMC.plist
) and setting its value to YES
. The manager’s default
mobile backend is undefined if more than one mobile backend is designated “default”
or if no mobile backend is designated “default”.
Declared In
OMCMobileBackendManager.h
properties
The mobile backend manager’s properties, as specified by the OMC property list file
(OMC.plist
).
@property (readonly, nonatomic) NSDictionary<NSString*id> *properties
Declared In
OMCMobileBackendManager.h
logLevel
The mobile backend manager’s log level. This log level controls the volume of log entries
produced by the Oracle Mobile Cloud Service SDK. The log level can be set to one of the following
levels: none, error, warning, info, debug.
This log level can be either initialized
from the default property list file (OMC.plist
) or set directly at
runtime via this property. If it is not set explicitly, the log level is error
.
@property (nonatomic) NSString *logLevel
Declared In
OMCMobileBackendManager.h
+ sharedManager
Returns the singleton mobile backend manager.
+ (OMCMobileBackendManager *)sharedManager
Declared In
OMCMobileBackendManager.h
– mobileBackendForName:
Returns the receiver’s mobile backend for the specified name, if present.
- (nullable OMCMobileBackend *)mobileBackendForName:(NSString *)name
Parameters
name |
The name of the mobile backend. |
---|
Discussion
Returns nil
if the receiver does not contain a mobile backend for the specified name.
Warning: Raises an NSInvalidArgumentException
if name
is nil
.
Declared In
OMCMobileBackendManager.h
– addMobileBackendForName:properties:
Adds to the receiver and returns a new mobile backend for the specified name
and initialized with the specified properties.
The properties must be in the same form as the properties in the OMC property
list file (OMC.plist
).
- (OMCMobileBackend *)addMobileBackendForName:(NSString *)name properties:(NSDictionary<NSString*,id> *)properties
Parameters
name |
The name of the new mobile backend. |
---|---|
properties |
The new mobile backend’s initial properties. |
Discussion
If the receiver already contains a mobile backend with the specified name, replaces it with the newly created mobile backend.
If the specified properties indicate the new mobile backend should be the default mobile backend, the new mobile backend will replace the current default mobile backend.
If the receiver does not yet have a default mobile backend, the new mobile backend will become the default mobile backend, even if the specified properties do not indicate the new mobile backend should be the default.
Warning: Raises an NSInvalidArgumentException
if either name
or properties
is nil
.
Declared In
OMCMobileBackendManager.h
– removeMobileBackend:
Removes from the receiver the specified mobile backend.
- (void)removeMobileBackend:(OMCMobileBackend *)mobileBackend
Parameters
mobileBackend |
The mobile backend. |
---|
Discussion
Does nothing if the receiver does not contain the specified mobile backend.
Warning: Raises an NSInvalidArgumentException
if mobileBackend
is nil
.
Declared In
OMCMobileBackendManager.h
– removeMobileBackendForName:
Removes from the receiver the mobile backend for the specified name.
- (void)removeMobileBackendForName:(NSString *)name
Parameters
name |
The name of the mobile backend. |
---|
Discussion
Does nothing if the receiver does not contain a mobile backend for the specified name.
Warning: Raises an NSInvalidArgumentException
if name
is nil
.
Declared In
OMCMobileBackendManager.h