OMCMobileBackend Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | OMCMobileBackend.h |
Overview
A mobile backend object holds the settings that allow a service proxy to communicate with an MCS mobile backend.
Extends OMCMobileBackend with Notifications-specific methods.
Extends OMCMobileBackend with Location-specific methods.
Extends OMCMobileBackend with Synchronization-specific methods.
Extends OMCMobileBackend with Storage-specific methods.
Extends OMCMobileBackend with Analytics-specific methods.
Other Methods
manager
The mobile backend’s manager.
@property (readonly, nonatomic) OMCMobileBackendManager *managerDeclared In
OMCMobileBackend.h
name
The mobile backend’s name.
@property (readonly, nonatomic) NSString *nameDeclared In
OMCMobileBackend.h
applicationKey
The mobile backend’s application key, which is generated by the MCS
portal, specified in the OMC
property list file (OMC.plist), and passed as an HTTP header in every
HTTP call to the MCS server.
@property (readonly, nonatomic) NSString *applicationKeyDeclared In
OMCMobileBackend.h
appConfig
The mobile backend’s application configuration. The application configuration will be empty until it is loaded.
@property (readonly) OMCAppConfig *appConfigDeclared In
OMCMobileBackend.h
baseURL
The mobile backend’s base URL, upon which requests such as HTTP URLs are
built. Typically, this URL is set via the OMC property list file (OMC.plist)
and is in the form http://<host>:<port>.
@property (copy) NSURL *baseURLDeclared In
OMCMobileBackend.h
platformPath
The mobile backend’s platform path, which is appended to the url to
form the platformURL. The default platform path is OMCMobileBackendPlatformPathDefault.
@property (copy) NSString *platformPathDeclared In
OMCMobileBackend.h
platformURL
The mobile backend’s platform URL, upon which requests such as HTTP URLs are
built. This URL is built by appending the current platformPath
to the current url.
@property (readonly) NSURL *platformURLDeclared In
OMCMobileBackend.h
appConfigPath
The mobile backend’s application configuration path, which is appended to the platformURL to
form the appConfigURL. The default application configuration path is OMCMobileBackendAppConfigPathDefault.
@property (copy) NSString *appConfigPathDeclared In
OMCMobileBackend.h
appConfigURL
The mobile backend’s application configuration URL, upon which requests such as HTTP URLs are
built. This URL is built by appending the current appConfigPath
to the current platformURL.
@property (readonly) NSURL *appConfigURLDeclared In
OMCMobileBackend.h
customCodePath
The mobile backend’s custom API path, which is appended to the url to
form the customCodeURL. The default custom API path is OMCMobileBackendCustomCodePathDefault.
@property (copy) NSString *customCodePathDeclared In
OMCMobileBackend.h
customCodeURL
The mobile backend’s custom API URL, upon which requests such as HTTP URLs are
built. This URL is built by appending the current customCodePath
to the current url.
@property (readonly) NSURL *customCodeURLDeclared In
OMCMobileBackend.h
diagnostics
The mobile backend’s diagnostics.
@property (readonly, nonatomic) OMCDiagnostics *diagnosticsDeclared In
OMCMobileBackend.h
authorization
The mobile backend’s authorization.
@property (readonly, nonatomic) OMCAuthorization *authorizationDeclared In
OMCMobileBackend.h
customCodeClient
The mobile backend’s custom code client.
@property (readonly, nonatomic) OMCCustomCodeClient *customCodeClientDeclared In
OMCMobileBackend.h
properties
The mobile backend’s properties, as specified by the OMC property list file
(OMC.plist).
@property (readonly, nonatomic) NSDictionary<NSString*id> *propertiesDeclared In
OMCMobileBackend.h
– serviceProxyForClass:
Returns the receiver’s instance of the specified service proxy, if present. If the specified service proxy is not present, creates it via reflection and returns the new instance.
- (nullable OMCServiceProxy *)serviceProxyForClass:(Class)serviceProxyClassParameters
serviceProxyClass |
The type of service proxy. |
|---|
Discussion
Warning: Raises an NSInvalidArgumentException if serviceProxyClass is nil.
Declared In
OMCMobileBackend.h
– removeServiceProxy:
Removes the specified service proxy from the receiver.
- (void)removeServiceProxy:(OMCServiceProxy *)serviceProxyParameters
serviceProxy |
The service proxy. |
|---|
Discussion
Does nothing if the receiver does not contain serviceProxy.
Warning: Raises an NSInvalidArgumentException if serviceProxy is nil.
Declared In
OMCMobileBackend.h
– removeServiceProxyForClass:
Removes the receiver’s instance of the specified service proxy.
- (void)removeServiceProxyForClass:(Class)serviceProxyClassParameters
serviceProxyClass |
The type of service proxy. |
|---|
Discussion
Does nothing if the receiver does not contain the specified service proxy.
Warning: Raises an NSInvalidArgumentException if serviceProxyClass is nil.
Declared In
OMCMobileBackend.h
– appConfigWithCompletionHandler:
Loads the receiver’s application configuration asynchronously.
- (void)appConfigWithCompletionHandler:(OMCAppConfigCompletionBlock)completionHandlerParameters
completionHandler |
The completion block invoked when the application configuration is loaded or an error occurs. |
|---|
Declared In
OMCMobileBackend.h
– urlRequestWithPath:
Returns a URL request configured with a URL with the specified path, relative to the mobile backend’s URL.
- (NSMutableURLRequest *)urlRequestWithPath:(nullable NSString *)relativePathParameters
relativePath |
The return request’s URL path, relative to the mobile backend’s URL. |
|---|
Discussion
The request will be configured with the appropriate MCS HTTP headers:
- application key
- diagnostics device ID
- diagnostics session ID
- diagnostics timestamp
- authorization
Declared In
OMCMobileBackend.h
– urlRequestWithPath:completionHandler:
Builds a URL request configured with a URL with the specified path, relative to the mobile backend’s URL.
- (void)urlRequestWithPath:(nullable NSString *)relativePath completionHandler:(OMCURLRequestCompletionBlock)completionHandlerParameters
relativePath |
The return request’s URL path, relative to the mobile backend’s URL. |
|---|---|
completionHandler |
The completion block invoked when the URL request is built or an error occurs. |
See Also
Declared In
OMCMobileBackend.h
– platformURLRequestWithPath:
Returns a URL request configured with a URL with the specified path, relative to the mobile backend’s platform URL.
- (NSMutableURLRequest *)platformURLRequestWithPath:(nullable NSString *)relativePathParameters
relativePath |
The return request’s URL path, relative to the mobile backend’s platform URL. |
|---|
Discussion
The request will be configured with the appropriate MCS HTTP headers:
- application key
- diagnostics device ID
- diagnostics session ID
- diagnostics timestamp
- authorization
Declared In
OMCMobileBackend.h
– platformURLRequestWithPath:completionHandler:
Builds a URL request configured with a URL with the specified path, relative to the mobile backend’s platform URL.
- (void)platformURLRequestWithPath:(nullable NSString *)relativePath completionHandler:(OMCURLRequestCompletionBlock)completionHandlerParameters
relativePath |
The return request’s URL path, relative to the mobile backend’s platform URL. |
|---|---|
completionHandler |
The completion block invoked when the URL request is built or an error occurs. |
See Also
Declared In
OMCMobileBackend.h
– customCodeURLRequestWithPath:
Returns a URL request configured with a URL with the specified path, relative to the mobile backend’s custom code URL.
- (NSMutableURLRequest *)customCodeURLRequestWithPath:(nullable NSString *)relativePathParameters
relativePath |
The return request’s URL path, relative to the mobile backend’s custom code URL. |
|---|
Discussion
The request will be configured with the appropriate MCS HTTP headers:
- application key
- diagnostics device ID
- diagnostics session ID
- diagnostics timestamp
- authorization
- analytics session ID
Declared In
OMCMobileBackend.h
– customCodeURLRequestWithPath:completionHandler:
Builds a URL request configured with a URL with the specified path, relative to the mobile backend’s custom code URL.
- (void)customCodeURLRequestWithPath:(nullable NSString *)relativePath completionHandler:(OMCURLRequestCompletionBlock)completionHandlerParameters
relativePath |
The return request’s URL path, relative to the mobile backend’s custom code URL. |
|---|---|
completionHandler |
The completion block invoked when the URL request is built or an error occurs. |
See Also
Declared In
OMCMobileBackend.h
– appConfigURLRequestWithPath:
Returns an HTTP URL GET request configured with a URL with the specified path,
relative to the mobile backend’s application configuration URL.
- (NSMutableURLRequest *)appConfigURLRequestWithPath:(nullable NSString *)relativePathParameters
relativePath |
The return request’s URL path, relative to the mobile backend’s application configuration URL. |
|---|
Discussion
The request will be configured with the appropriate MCS HTTP headers:
- application key
- diagnostics device ID
- diagnostics session ID
- diagnostics timestamp
- anonymous authorization
- gzip JSON accept encoding
Declared In
OMCMobileBackend.h
– appConfigURLRequestWithPath:completionHandler:
Builds an HTTP URL GET request configured with a URL with the specified path,
relative to the mobile backend’s application configuration URL.
- (void)appConfigURLRequestWithPath:(nullable NSString *)relativePath completionHandler:(OMCURLRequestCompletionBlock)completionHandlerParameters
relativePath |
The return request’s URL path, relative to the mobile backend’s application configuration URL. |
|---|---|
completionHandler |
The completion block invoked when the URL request is built or an error occurs. |
See Also
Declared In
OMCMobileBackend.h
– setHTTPHeadersOnRequest:
Sets the receiver’s HTTP headers on the specified URL request. The headers will include the application key, authorization settings, and the diagnostics context state. Call this method to ensure that all the required MCS headers are included.
- (void)setHTTPHeadersOnRequest:(NSMutableURLRequest *)requestParameters
request |
A URL request. |
|---|
Discussion
Warning: Raises an NSInvalidArgumentException if request is nil.
Declared In
OMCMobileBackend.h
– setHTTPHeadersOnRequest:completionHandler:
Sets the receiver’s HTTP headers on the specified URL request. The headers will include the application key, authorization settings, and the diagnostics context state. Call this method to ensure that all the required MCS headers are included.
- (void)setHTTPHeadersOnRequest:(NSMutableURLRequest *)request completionHandler:(OMCErrorCompletionBlock)completionHandlerParameters
request |
A URL request. |
|---|---|
completionHandler |
The completion block invoked once the mobile backend’s HTTP headers have been added to the URL request or an error occurs. |
Discussion
Warning: Raises an NSInvalidArgumentException if request is nil.
See Also
Declared In
OMCMobileBackend.h
OMC_Notifications Methods
– notifications
Returns the receiver’s notifications service.
- (OMCNotifications *)notificationsDeclared In
OMCMobileBackend+OMC_Notifications.h
– removeNotifications
Removes the receiver’s notifications service.
- (void)removeNotificationsDeclared In
OMCMobileBackend+OMC_Notifications.h
OMC_Location Methods
– location
Returns the receiver’s location service.
- (OMCLocation *)locationDeclared In
OMCMobileBackend+OMC_Location.h
– removeLocation
Removes the receiver’s location service.
- (void)removeLocationDeclared In
OMCMobileBackend+OMC_Location.h
OMC_Synchronization Methods
– synchronization
Returns the receiver’s synchronization service.
- (OMCSynchronization *)synchronizationDeclared In
OMCMobileBackend+OMC_Synchronization.h
– removeSynchronization
Removes the receiver’s synchronization service.
- (void)removeSynchronizationDeclared In
OMCMobileBackend+OMC_Synchronization.h
OMCStorage Methods
– storage
Returns the receiver’s storage service.
- (OMCStorage *)storageDeclared In
OMCMobileBackend+OMC_Storage.h
– removeStorage
Removes the receiver’s storage service.
- (void)removeStorageDeclared In
OMCMobileBackend+OMC_Storage.h
OMC_Analytics Methods
– analytics
Returns the receiver’s analytics service.
- (OMCAnalytics *)analyticsDeclared In
OMCMobileBackend+OMC_Analytics.h
– removeAnalytics
Removes the receiver’s analytics service.
- (void)removeAnalyticsDeclared In
OMCMobileBackend+OMC_Analytics.h