MapsIndoors iOS SDK V3
Loading...
Searching...
No Matches
MPMapsIndoors.h
Go to the documentation of this file.
1//
2// MPMapsIndoors.h
3// MapsIndoorsSDK
4//
5// Created by Daniel Nielsen on 04/11/2016.
6// Copyright (c) 2016-2018 MapsPeople A/S. All rights reserved.
7//
8
9#import <UIKit/UIKit.h>
10#import "MPDefines.h"
11
12
14@class MPUserRole;
15@protocol MPAuthDetails;
16@protocol MPImageProvider;
17@protocol MPLocationSource;
18@protocol MPLocationsProvider;
19@protocol MPMapsIndoorsDelegate;
20@protocol MPPositionProvider;
21
22
28typedef void(^mpSyncContentHandlerBlockType)( NSError* _Nullable error );
29
35typedef void(^mpOfflineDataHandlerBlockType)( NSError* _Nullable error);
36
43typedef void(^mpAuthDetailsHandlerBlockType)( id<MPAuthDetails> _Nullable authDetails, NSError* _Nullable error );
44
45
46#define kMPNotificationPositionProviderReassign @"MP_POSITION_PROVIDER_REASSIGNED"
47#define kMPNotificationApiKeyInvalid @"MAPSINDOORS_API_KEY_INVALID"
48#define kMPNotificationAppDataUpdate @"MP_APP_DATA_UPDATE"
49#define kMPNotificationAppDataValueKey @"kMPNotificationAppDataValueKey"
50#define kMPNotificationAppDataErrorKey @"kMPNotificationAppDataErrorKey"
51
52
56@interface MapsIndoors : NSObject
57
65+ (BOOL) provideAPIKey:(nonnull NSString*)mapsIndoorsAPIKey googleAPIKey:(nullable NSString*)googleAPIKey;
66
71+ (void) provideAPIKey:(nonnull NSString*)mapsIndoorsAPIKey googleAPIKey:(nullable NSString*)googleAPIKey completionBlock:(void (^_Nullable)(BOOL))completion;
72
77+ (nullable NSString*) getMapsIndoorsAPIKey;
82+ (nullable NSString*) getGoogleAPIKey;
83
88+ (void) setLanguage:(nonnull NSString*)languageCode;
89
94+ (nullable NSString*) getLanguage;
95
102+ (void)synchronizeContent: (nonnull mpSyncContentHandlerBlockType) completionHandler;
103
109+ (void)registerLocationSources: (nonnull NSArray<id<MPLocationSource>>*) sources;
110
115+ (void) setOfflineMode:(BOOL)offlineMode;
116
120+ (BOOL) getOfflineMode;
121
129
135+ (void) checkOfflineDataAvailabilityAsync:(void(^_Nonnull)(void))completion;
136
142+ (void) fetchAuthenticationDetails:(mpAuthDetailsHandlerBlockType _Nonnull)completion;
143
144
148@property (class, nullable) id<MPPositionProvider> positionProvider;
149
153@property (class, nullable) id<MPImageProvider> imageProvider;
154
159@property (class, nullable) id<MPLocationsProvider> locationsProvider DEPRECATED_MSG_ATTRIBUTE("Use MPLocationSource, setting MapsIndoors.sources instead");
160
164@property (class, readonly, nullable) NSArray<id<MPLocationSource>>* sources;
165
166
170+ (BOOL) isAPIKeyValid;
171
172
176@property (class, readonly, nonnull) MPDataSetCacheManager* dataSetCacheManager;
177
181@property (class, nonatomic, strong, nullable) NSArray<MPUserRole*>* userRoles;
182
186@property (class, nonatomic) BOOL eventLoggingDisabled;
187
191@property (class, nonatomic, strong, nullable) NSString* accessToken;
192
196@property (class, nonatomic, weak, nullable) id<MPMapsIndoorsDelegate> delegate;
197
198@end
void(^ mpOfflineDataHandlerBlockType)(NSError *_Nullable error)
Definition MPMapsIndoors.h:35
void(^ mpSyncContentHandlerBlockType)(NSError *_Nullable error)
Definition MPMapsIndoors.h:28
void(^ mpAuthDetailsHandlerBlockType)(id< MPAuthDetails > _Nullable authDetails, NSError *_Nullable error)
Definition MPMapsIndoors.h:43
Definition MPDataSetCacheManager.h:26
Definition MPImageProvider.h:18
Definition MPLocationsProvider.h:163
Definition MPUserRole.h:14
Definition MPMapsIndoors.h:57
NSArray< id< MPLocationSource > > * sources
Definition MPMapsIndoors.h:164
nullable NSString * getGoogleAPIKey()
NSArray< MPUserRole * > * userRoles
Definition MPMapsIndoors.h:181
id< MPPositionProvider > positionProvider
Definition MPMapsIndoors.h:148
BOOL eventLoggingDisabled
Definition MPMapsIndoors.h:186
BOOL getOfflineMode()
BOOL isAPIKeyValid()
BOOL isOfflineDataAvailable()
nullable NSString * getLanguage()
id< MPLocationsProvider > locationsProvider
Definition MPMapsIndoors.h:159
NSString * accessToken
Definition MPMapsIndoors.h:191
nullable NSString * getMapsIndoorsAPIKey()
id< MPMapsIndoorsDelegate > delegate
Definition MPMapsIndoors.h:196
id< MPImageProvider > imageProvider
Definition MPMapsIndoors.h:153
MPDataSetCacheManager * dataSetCacheManager
Definition MPMapsIndoors.h:176