MapsIndoors iOS SDK V3
|
#include <MPMapsIndoors.h>
Class Methods | |
(BOOL) | + provideAPIKey:googleAPIKey: |
(void) | + provideAPIKey:googleAPIKey:completionBlock: |
(nullable NSString *) | + getMapsIndoorsAPIKey |
(nullable NSString *) | + getGoogleAPIKey |
(void) | + setLanguage: |
(nullable NSString *) | + getLanguage |
(void) | + synchronizeContent: |
(void) | + registerLocationSources: |
(void) | + setOfflineMode: |
(BOOL) | + getOfflineMode |
(BOOL) | + isOfflineDataAvailable |
(void) | + checkOfflineDataAvailabilityAsync: |
(void) | + fetchAuthenticationDetails: |
(BOOL) | + isAPIKeyValid |
Properties | |
id< MPPositionProvider > | positionProvider |
id< MPImageProvider > | imageProvider |
id< MPLocationsProvider > | locationsProvider |
NSArray< id< MPLocationSource > > * | sources |
MPDataSetCacheManager * | dataSetCacheManager |
NSArray< MPUserRole * > * | userRoles |
BOOL | eventLoggingDisabled |
NSString * | accessToken |
id< MPMapsIndoorsDelegate > | delegate |
Main class for initialisation, configuration and content synchronisation.
+ (void) checkOfflineDataAvailabilityAsync: | (void(^)(void)) | completion |
Check availability of offline data.
completion | callback |
+ (void) fetchAuthenticationDetails: | (mpAuthDetailsHandlerBlockType _Nonnull) | completion |
Fetch authentication details needed to perform an Auth2 supported single signon flow in your application.
completion | callback |
+ (nullable NSString *) getGoogleAPIKey |
Gets the current Google API key.
+ (nullable NSString *) getLanguage |
Gets the current language for the content provided by MapsIndoors.
+ (nullable NSString *) getMapsIndoorsAPIKey |
Gets the current MapsIndoors API key.
+ (BOOL) getOfflineMode |
Gets the current offline mode. True means that the SDK is not allowed to use network traffic.
+ (BOOL) isAPIKeyValid |
Returns whether the current API key is valid or not.
+ (BOOL) isOfflineDataAvailable |
Determine if enough data is available for a good user experience in offline mode. For results that are not dependent on timing of async calls, this is best used in the completion handler of +[MapsIndoors checkOfflineDataAvailabilityAsync:].
+ (BOOL) provideAPIKey: | (nonnull NSString *) | mapsIndoorsAPIKey | |
googleAPIKey: | (nullable NSString *) | googleAPIKey |
Provides your API key and content key to the MapsIndoors SDK. These keys are unique for your MapsIndoors solution and are used to identify and authorise use of the data provided by MapsIndoors.
mapsIndoorsAPIKey | The MapsIndoors API key |
googleAPIKey | The Google API key. |
+ (void) provideAPIKey: | (nonnull NSString *) | mapsIndoorsAPIKey | |
googleAPIKey: | (nullable NSString *) | googleAPIKey | |
completionBlock: | (void(^)(BOOL)) | completion |
Provides the API key to MapsIndoors SDK after validating the key.
mapsIndoorsAPIKey | The MapsIndoors API key |
googleAPIKey | The Google API key |
completion | Whether the API key and content key was successfully provided |
+ (void) registerLocationSources: | (nonnull NSArray< id< MPLocationSource > > *) | sources |
Register Location data sources. All registered location sources must have a unique sourceId.
sources | The sources of Location data to use in the current session. |
+ (void) setLanguage: | (nonnull NSString *) | languageCode |
Sets the language for the content provided by MapsIndoors.
languageCode | The language for which the content should be fetched. Uses the two-letter language code ISO 639-1. |
+ (void) setOfflineMode: | (BOOL) | offlineMode |
Sets the offline mode for the content provided by MapsIndoors. True means that the SDK is not allowed to use network traffic. NB: This forces the implementation to be offline, even if there is no data available offline.
offlineMode | The offline mode. Can be true/offline false/online. |
+ (void) synchronizeContent: | (nonnull mpSyncContentHandlerBlockType) | completionHandler |
Fetch all neccesary content to be able to run MapsIndoors in offline environments. If you have registered custom location sources, they are not synchronized by this method - it is the responsibility of the provider of the custom location source to synchronize as appropriate. This method only synchronizes the current dataset - If you need to synchronize data for non-current datasets, please see
completionHandler | Callback function that fires when content has been fetched or if this process resolves in an error. Note: Does not automtically retry fetch. |
|
readwritenonatomicstrong |
Get or set the access token. Only relevant for datasets that requires authorised access.
|
readatomicassign |
Get the shared dataset cache manager.
|
readwritenonatomicweak |
Get or set the delegate object.
|
readwritenonatomicassign |
Gets or sets the event logging state. If enabled, the SDK will collect anonymous SDK usage data from the application. By default, the collection of usage event data is enabled, but in order for logs to be collected, the logging must also be enabled in the MapsIndoors CMS.
|
readwriteatomicassign |
The image provider that MapsIndoors should use when image ressources are needed. MapsIndoors will provide a default if this property is nil.
|
readwriteatomicassign |
The location provider that MapsIndoors should use.
|
readwriteatomicassign |
The position provider that MapsIndoors should use when user location services are needed.
|
readatomicassign |
The currently registered location sources.
|
readwritenonatomicstrong |
Get or set the user roles that should apply generally for querying routes and locations. The roles are applied in an OR fashion. This means that if for example a locations internal restrictions matches one or more of the given roles, the location will be included in response object. Setting the user roles will only work when online.