MapsIndoors iOS SDK V3
Loading...
Searching...
No Matches
Class Methods | Properties | List of all members
MapsIndoors Class Reference

#include <MPMapsIndoors.h>

Inheritance diagram for MapsIndoors:

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< MPPositionProviderpositionProvider
 
id< MPImageProviderimageProvider
 
id< MPLocationsProviderlocationsProvider
 
NSArray< id< MPLocationSource > > * sources
 
MPDataSetCacheManagerdataSetCacheManager
 
NSArray< MPUserRole * > * userRoles
 
BOOL eventLoggingDisabled
 
NSString * accessToken
 
id< MPMapsIndoorsDelegatedelegate
 

Detailed Description

Main class for initialisation, configuration and content synchronisation.

Method Documentation

◆ checkOfflineDataAvailabilityAsync:

+ (void) checkOfflineDataAvailabilityAsync: (void(^)(void)) completion

Check availability of offline data.

Parameters
completioncallback

◆ fetchAuthenticationDetails:

+ (void) fetchAuthenticationDetails: (mpAuthDetailsHandlerBlockType _Nonnull) completion

Fetch authentication details needed to perform an Auth2 supported single signon flow in your application.

Parameters
completioncallback

◆ getGoogleAPIKey

+ (nullable NSString *) getGoogleAPIKey

Gets the current Google API key.

Returns
The Google API key as a string value.

◆ getLanguage

+ (nullable NSString *) getLanguage

Gets the current language for the content provided by MapsIndoors.

Returns
The language for which the content should be fetched. Uses the two-letter language code ISO 639-1.

◆ getMapsIndoorsAPIKey

+ (nullable NSString *) getMapsIndoorsAPIKey

Gets the current MapsIndoors API key.

Returns
The MapsIndoors API key as a string value.

◆ getOfflineMode

+ (BOOL) getOfflineMode

Gets the current offline mode. True means that the SDK is not allowed to use network traffic.

◆ isAPIKeyValid

+ (BOOL) isAPIKeyValid

Returns whether the current API key is valid or not.

◆ isOfflineDataAvailable

+ (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:].

Returns
YES if offline data is available, else NO.

◆ provideAPIKey:googleAPIKey:

+ (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.

Parameters
mapsIndoorsAPIKeyThe MapsIndoors API key
googleAPIKeyThe Google API key.
Returns
Whether the API key and content key was successfully provided

◆ provideAPIKey:googleAPIKey:completionBlock:

+ (void) provideAPIKey: (nonnull NSString *) mapsIndoorsAPIKey
googleAPIKey: (nullable NSString *) googleAPIKey
completionBlock: (void(^)(BOOL)) completion 

Provides the API key to MapsIndoors SDK after validating the key.

Parameters
mapsIndoorsAPIKeyThe MapsIndoors API key
googleAPIKeyThe Google API key
completionWhether the API key and content key was successfully provided

◆ registerLocationSources:

+ (void) registerLocationSources: (nonnull NSArray< id< MPLocationSource > > *) sources

Register Location data sources. All registered location sources must have a unique sourceId.

Parameters
sourcesThe sources of Location data to use in the current session.

◆ setLanguage:

+ (void) setLanguage: (nonnull NSString *) languageCode

Sets the language for the content provided by MapsIndoors.

Parameters
languageCodeThe language for which the content should be fetched. Uses the two-letter language code ISO 639-1.

◆ setOfflineMode:

+ (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.

Parameters
offlineModeThe offline mode. Can be true/offline false/online.

◆ synchronizeContent:

+ (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

See also
dataSetCacheManager and - synchronizeContent (MPDataSetCacheManager)
Parameters
completionHandlerCallback function that fires when content has been fetched or if this process resolves in an error. Note: Does not automtically retry fetch.

Property Documentation

◆ accessToken

- (NSString*) accessToken
readwritenonatomicstrong

Get or set the access token. Only relevant for datasets that requires authorised access.

◆ dataSetCacheManager

- (MPDataSetCacheManager*) dataSetCacheManager
readatomicassign

Get the shared dataset cache manager.

◆ delegate

- (id<MPMapsIndoorsDelegate>) delegate
readwritenonatomicweak

Get or set the delegate object.

◆ eventLoggingDisabled

- (BOOL) eventLoggingDisabled
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.

◆ imageProvider

- (id<MPImageProvider>) imageProvider
readwriteatomicassign

The image provider that MapsIndoors should use when image ressources are needed. MapsIndoors will provide a default if this property is nil.

◆ locationsProvider

- (id<MPLocationsProvider>) locationsProvider
readwriteatomicassign

The location provider that MapsIndoors should use.

Deprecated
Use MPLocationSource, setting MapsIndoors.sources instead

◆ positionProvider

- (id<MPPositionProvider>) positionProvider
readwriteatomicassign

The position provider that MapsIndoors should use when user location services are needed.

◆ sources

- (NSArray<id<MPLocationSource> >*) sources
readatomicassign

The currently registered location sources.

◆ userRoles

- (NSArray<MPUserRole*>*) userRoles
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.