OMCMobileBackend Class Reference
Inherits from | OMCMobileComponent : NSObject |
---|---|
Declared in | OMCMobileBackend.h |
Overview
A mobile backend holds the settings that allow a mobile backend service proxy to communicate with an OMCe mobile backend server.
Extends OMCMobileBackend
with Synchronization-specific methods.
Extends OMCMobileBackend
with Notifications-specific methods.
Extends OMCMobileBackend
with Location-specific methods.
Extends OMCMobileBackend
with Storage-specific methods.
Extends OMCMobileBackend
with Analytics-specific methods.
Other Methods
diagnostics
The mobile backend’s diagnostics.
@property (readonly) OMCDiagnostics *diagnostics
Declared In
OMCMobileBackend.h
authorization
The mobile backend’s authorization.
@property (readonly) OMCAuthorization *authorization
Declared In
OMCMobileBackend.h
– buildURLRequestWithPath:completionHandler:
Builds a URL request configured with a URL with the specified path, relative to the mobile backend’s base URL and path.
- (void)buildURLRequestWithPath:(nullable NSString *)relativePath completionHandler:(OMCURLRequestCompletionBlock)completionHandler
Parameters
relativePath |
The 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. |
Discussion
The request will be configured with the appropriate OMCe HTTP headers:
- authorization
- diagnostics device ID
- diagnostics session ID
- diagnostics timestamp
Declared In
OMCMobileBackend.h
– setHTTPHeadersOnURLRequest:completionHandler:
Sets the receiver’s HTTP headers on the specified URL request. The headers will include:
- (void)setHTTPHeadersOnURLRequest:(NSMutableURLRequest *)request completionHandler:(OMCErrorCompletionBlock)completionHandler
Parameters
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
- authorization
- diagnostics device ID
- diagnostics session ID
- diagnostics timestamp
Call this method to ensure that all the required OMCe headers are set appropriately.
Warning: Raises an NSInvalidArgumentException
if request
is nil
.
Declared In
OMCMobileBackend.h
– buildAnonymousAuthorizationURLRequestWithPath:completionHandler:
Builds an anonymous authorization URL request configured with a URL with the specified path, relative to the mobile backend’s base URL and path.
- (void)buildAnonymousAuthorizationURLRequestWithPath:(nullable NSString *)relativePath completionHandler:(OMCURLRequestCompletionBlock)completionHandler
Parameters
relativePath |
The 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. |
Discussion
The request will be configured with the appropriate OMCe HTTP headers:
- authorization (anonymous)
- diagnostics device ID
- diagnostics session ID
- diagnostics timestamp
Declared In
OMCMobileBackend.h
– setAnonymousAuthorizationHTTPHeadersOnURLRequest:completionHandler:
Sets the receiver’s anonymous authorization HTTP headers on the specified URL request. The headers will include:
- (void)setAnonymousAuthorizationHTTPHeadersOnURLRequest:(NSMutableURLRequest *)request completionHandler:(OMCErrorCompletionBlock)completionHandler
Parameters
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
- authorization (anonymous)
- diagnostics device ID
- diagnostics session ID
- diagnostics timestamp
Call this method to ensure that all the required OMCe headers are set appropriately.
Warning: Raises an NSInvalidArgumentException
if request
is nil
.
Declared In
OMCMobileBackend.h
platformPath
The mobile backend’s platform path, which is appended to the url
to
form the platformURL
.
The platform path is held by OMCMobileBackendPlatformPath
.
@property (readonly) NSString *platformPath
Declared 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 platformPath
to the url
.
@property (readonly) NSURL *platformURL
Declared In
OMCMobileBackend.h
– buildPlatformURLRequestWithPath:completionHandler:
Builds a URL request configured with a URL with the specified path, relative to the mobile backend’s platform URL.
- (void)buildPlatformURLRequestWithPath:(nullable NSString *)relativePath completionHandler:(OMCURLRequestCompletionBlock)completionHandler
Parameters
relativePath |
The 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. |
Discussion
The request will be configured with the appropriate OMCe HTTP headers:
- authorization
- diagnostics device ID
- diagnostics session ID
- diagnostics timestamp
Declared In
OMCMobileBackend.h
– buildAnonymousAuthorizationPlatformURLRequestWithPath:completionHandler:
Builds an anonymous authorization URL request configured with a URL with the specified path, relative to the mobile backend’s platform URL.
- (void)buildAnonymousAuthorizationPlatformURLRequestWithPath:(nullable NSString *)relativePath completionHandler:(OMCURLRequestCompletionBlock)completionHandler
Parameters
relativePath |
The 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. |
Discussion
The request will be configured with the appropriate OMCe HTTP headers:
- authorization (anonymous)
- diagnostics device ID
- diagnostics session ID
- diagnostics timestamp
Declared In
OMCMobileBackend.h
appConfigPath
The mobile backend’s application configuration path, which is appended to the platformURL
to
form the appConfigURL
.
The application configuration path is held by OMCMobileBackendAppConfigPath
.
@property (readonly) NSString *appConfigPath
Declared 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 *appConfigURL
Declared In
OMCMobileBackend.h
appConfig
The mobile backend’s application configuration. The application configuration will be empty until it is loaded.
@property (readonly) OMCAppConfig *appConfig
See Also
Declared In
OMCMobileBackend.h
– appConfigWithCompletionHandler:
Loads the receiver’s application configuration asynchronously.
- (void)appConfigWithCompletionHandler:(OMCAppConfigCompletionBlock)completionHandler
Parameters
completionHandler |
The completion block invoked when the application configuration is loaded or an error occurs. |
---|
Declared In
OMCMobileBackend.h
– buildAppConfigURLRequestWithPath: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)buildAppConfigURLRequestWithPath:(nullable NSString *)relativePath completionHandler:(OMCURLRequestCompletionBlock)completionHandler
Parameters
relativePath |
The 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. |
Discussion
The request will be configured with the appropriate OMCe HTTP headers:
- diagnostics device ID
- diagnostics session ID
- diagnostics timestamp
- anonymous authorization
- gzip JSON accept encoding
See Also
Declared In
OMCMobileBackend.h
customCodePath
The mobile backend’s custom API path, which is appended to the url
to
form the customCodeURL
.
The custom API path is held by OMCMobileBackendCustomCodePath
.
@property (readonly) NSString *customCodePath
Declared 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 *customCodeURL
Declared In
OMCMobileBackend.h
customCodeClient
The mobile backend’s custom code client.
@property (readonly) OMCCustomCodeClient *customCodeClient
Declared In
OMCMobileBackend.h
– buildCustomCodeURLRequestWithPath:completionHandler:
Builds a URL request configured with a URL with the specified path, relative to the mobile backend’s custom code URL.
- (void)buildCustomCodeURLRequestWithPath:(nullable NSString *)relativePath completionHandler:(OMCURLRequestCompletionBlock)completionHandler
Parameters
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. |
Declared In
OMCMobileBackend.h
– buildAnonymousAuthorizationCustomCodeURLRequestWithPath:completionHandler:
Builds an anonymous authorization URL request configured with a URL with the specified path, relative to the mobile backend’s custom code URL.
- (void)buildAnonymousAuthorizationCustomCodeURLRequestWithPath:(nullable NSString *)relativePath completionHandler:(OMCURLRequestCompletionBlock)completionHandler
Parameters
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. |
Declared In
OMCMobileBackend.h
OMC_Synchronization Methods
– synchronization
Returns the receiver’s synchronization service.
- (OMCSynchronization *)synchronization
Declared In
OMCMobileBackend+OMC_Synchronization.h
– removeSynchronization
Removes the receiver’s synchronization service.
- (void)removeSynchronization
Declared In
OMCMobileBackend+OMC_Synchronization.h
OMC_Notifications Methods
– notifications
Returns the receiver’s notifications service.
- (OMCNotifications *)notifications
Declared In
OMCMobileBackend+OMC_Notifications.h
– removeNotifications
Removes the receiver’s notifications service.
- (void)removeNotifications
Declared In
OMCMobileBackend+OMC_Notifications.h
OMC_Location Methods
– location
Returns the receiver’s location service.
- (OMCLocation *)location
Declared In
OMCMobileBackend+OMC_Location.h
– removeLocation
Removes the receiver’s location service.
- (void)removeLocation
Declared In
OMCMobileBackend+OMC_Location.h
OMCStorage Methods
– storage
Returns the receiver’s storage service.
- (OMCStorage *)storage
Declared In
OMCMobileBackend+OMC_Storage.h
– removeStorage
Removes the receiver’s storage service.
- (void)removeStorage
Declared In
OMCMobileBackend+OMC_Storage.h
OMC_Analytics Methods
– analytics
Returns the receiver’s analytics service.
- (OMCAnalytics *)analytics
Declared In
OMCMobileBackend+OMC_Analytics.h
– removeAnalytics
Removes the receiver’s analytics service.
- (void)removeAnalytics
Declared In
OMCMobileBackend+OMC_Analytics.h