20240422
This commit is contained in:
commit
e0afef912e
1285 files changed
+83219
No files matched your search
@@ -0,0 +1,197 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "MMETypes.h"
|
||||
|
||||
extern NSString * const MMEAPIClientBaseURL;
|
||||
extern NSString * const MMEAPIClientBaseAPIURL;
|
||||
extern NSString * const MMEAPIClientBaseChinaEventsURL;
|
||||
extern NSString * const MMEAPIClientBaseChinaAPIURL;
|
||||
extern NSString * const MMEAPIClientEventsPath;
|
||||
extern NSString * const MMEAPIClientEventsConfigPath;
|
||||
extern NSString * const MMEAPIClientAttachmentsPath;
|
||||
extern NSString * const MMEAPIClientHeaderFieldUserAgentKey;
|
||||
extern NSString * const MMEAPIClientHeaderFieldContentTypeKey;
|
||||
extern NSString * const MMEAPIClientHeaderFieldContentTypeValue;
|
||||
extern NSString * const MMEAPIClientAttachmentsHeaderFieldContentTypeValue;
|
||||
extern NSString * const MMEAPIClientHeaderFieldContentEncodingKey;
|
||||
extern NSString * const MMEAPIClientHTTPMethodPost;
|
||||
extern NSString * const MMEAPIClientHTTPMethodGet;
|
||||
|
||||
// Debug types
|
||||
extern NSString * const MMEDebugEventType;
|
||||
extern NSString * const MMEDebugEventTypeError;
|
||||
extern NSString * const MMEDebugEventTypeFlush;
|
||||
extern NSString * const MMEDebugEventTypePush;
|
||||
extern NSString * const MMEDebugEventTypePost;
|
||||
extern NSString * const MMEDebugEventTypePostFailed;
|
||||
extern NSString * const MMEDebugEventTypeTurnstile;
|
||||
extern NSString * const MMEDebugEventTypeTurnstileFailed;
|
||||
extern NSString * const MMEDebugEventTypeBackgroundTask;
|
||||
extern NSString * const MMEDebugEventTypeMetricCollection;
|
||||
extern NSString * const MMEDebugEventTypeLocationManager;
|
||||
extern NSString * const MMEDebugEventTypeTelemetryMetrics;
|
||||
extern NSString * const MMEDebugEventTypeCertPinning;
|
||||
|
||||
// Event types
|
||||
extern NSString * const MMEEventTypeAppUserTurnstile;
|
||||
extern NSString * const MMEEventTypeTelemetryMetrics;
|
||||
extern NSString * const MMEEventTypeMapLoad;
|
||||
extern NSString * const MMEEventTypeLocation;
|
||||
extern NSString * const MMEEventTypeVisit;
|
||||
extern NSString * const MMEEventTypeLocalDebug;
|
||||
extern NSString * const MMEventTypeOfflineDownloadStart;
|
||||
extern NSString * const MMEventTypeOfflineDownloadEnd;
|
||||
|
||||
// Event keys
|
||||
extern NSString * const MMEEventKeyArrivalDate;
|
||||
extern NSString * const MMEEventKeyDepartureDate;
|
||||
extern NSString * const MMEEventKeyLatitude;
|
||||
extern NSString * const MMEEventKeyLongitude;
|
||||
extern NSString * const MMEEventKeyZoomLevel;
|
||||
extern NSString * const MMEEventKeyMaxZoomLevel;
|
||||
extern NSString * const MMEEventKeyMinZoomLevel;
|
||||
extern NSString * const MMEEventKeyEvent;
|
||||
extern NSString * const MMEEventKeyCreated;
|
||||
extern NSString * const MMEEventKeyStyleURL;
|
||||
extern NSString * const MMEEventKeyVendorId;
|
||||
extern NSString * const MMEEventKeyModel;
|
||||
extern NSString * const MMEEventKeyDevice;
|
||||
extern NSString * const MMEEventKeySkuId;
|
||||
extern NSString * const MMEEventKeyEnabledTelemetry;
|
||||
extern NSString * const MMEEventKeyOperatingSystem;
|
||||
extern NSString * const MMEEventKeyResolution;
|
||||
extern NSString * const MMEEventKeyAccessibilityFontScale;
|
||||
extern NSString * const MMEEventKeyOrientation;
|
||||
extern NSString * const MMEEventKeyPluggedIn;
|
||||
extern NSString * const MMEEventKeyWifi;
|
||||
extern NSString * const MMEEventKeyShapeForOfflineRegion;
|
||||
extern NSString * const MMEEventKeySource;
|
||||
extern NSString * const MMEEventKeySessionId;
|
||||
extern NSString * const MMEEventKeyApplicationState;
|
||||
extern NSString * const MMEEventKeyAltitude;
|
||||
extern NSString * const MMEEventKeyLocationAuthorization;
|
||||
extern NSString * const MMEEventKeyLocationEnabled;
|
||||
extern NSString * const MMEEventHorizontalAccuracy;
|
||||
extern NSString * const MMEEventSDKIdentifier;
|
||||
extern NSString * const MMEEventSDKVersion;
|
||||
extern NSString * const MMEEventKeyLocalDebugDescription;
|
||||
extern NSString * const MMEEventKeyErrorCode;
|
||||
extern NSString * const MMEEventKeyErrorDomain;
|
||||
extern NSString * const MMEEventKeyErrorDescription;
|
||||
extern NSString * const MMEEventKeyErrorFailureReason;
|
||||
extern NSString * const MMEEventKeyErrorNoReason;
|
||||
extern NSString * const MMEEventKeyErrorNoDomain;
|
||||
extern NSString * const MMEEventKeyFailedRequests;
|
||||
extern NSString * const MMEEventKeyHeader;
|
||||
extern NSString * const MMEEventKeyPlatform;
|
||||
extern NSString * const MMEEventKeyUserAgent;
|
||||
extern NSString * const MMEEventKeyiOS;
|
||||
extern NSString * const MMEEventKeyMac;
|
||||
extern NSString * const MMENavigationEventPrefix;
|
||||
extern NSString * const MMEVisionEventPrefix;
|
||||
extern NSString * const MMEEventTypeNavigationDepart;
|
||||
extern NSString * const MMEEventTypeNavigationArrive;
|
||||
extern NSString * const MMEEventTypeNavigationCancel;
|
||||
extern NSString * const MMEEventTypeNavigationFeedback;
|
||||
extern NSString * const MMEEventTypeNavigationReroute;
|
||||
extern NSString * const MMEventTypeNavigationCarplayConnect;
|
||||
extern NSString * const MMEventTypeNavigationCarplayDisconnect;
|
||||
extern NSString * const MMEEventTypeSearchSelected;
|
||||
extern NSString * const MMEEventTypeSearchFeedback;
|
||||
extern NSString * const MMESearchEventPrefix;
|
||||
extern NSString * const MMEEventDateUTC;
|
||||
extern NSString * const MMEEventRequests;
|
||||
extern NSString * const MMEEventTotalDataSent;
|
||||
extern NSString * const MMEEventCellDataSent;
|
||||
extern NSString * const MMEEventWiFiDataSent;
|
||||
extern NSString * const MMEEventTotalDataReceived;
|
||||
extern NSString * const MMEEventCellDataReceived;
|
||||
extern NSString * const MMEEventWiFiDataReceived;
|
||||
extern NSString * const MMEEventAppWakeups;
|
||||
extern NSString * const MMEEventEventCountPerType;
|
||||
extern NSString * const MMEEventEventCountFailed;
|
||||
extern NSString * const MMEEventEventCountTotal;
|
||||
extern NSString * const MMEEventEventCountMax;
|
||||
extern NSString * const MMEEventDeviceLat;
|
||||
extern NSString * const MMEEventDeviceLon;
|
||||
extern NSString * const MMEEventDeviceTimeDrift;
|
||||
extern NSString * const MMEEventConfigResponse;
|
||||
extern NSString * const MMEEventStatusDenied;
|
||||
extern NSString * const MMEEventStatusRestricted;
|
||||
extern NSString * const MMEEventStatusNotDetermined;
|
||||
extern NSString * const MMEEventStatusAuthorizedAlways;
|
||||
extern NSString * const MMEEventStatusAuthorizedWhenInUse;
|
||||
extern NSString * const MMEEventUnknown;
|
||||
|
||||
extern NSString * const MMEResponseKey;
|
||||
|
||||
/*! @brief SDK event source */
|
||||
extern NSString * const MMEEventSource;
|
||||
|
||||
#pragma mark - mobile.crash Keys
|
||||
|
||||
extern NSString * const MMEEventMobileCrash;
|
||||
extern NSString * const MMEEventKeyOSVersion;
|
||||
extern NSString * const MMEEventKeyBuildType;
|
||||
extern NSString * const MMEEventKeyIsSilentCrash;
|
||||
extern NSString * const MMEEventKeyStackTrace;
|
||||
extern NSString * const MMEEventKeyStackTraceHash;
|
||||
extern NSString * const MMEEventKeyInstallationId;
|
||||
extern NSString * const MMEEventKeyThreadDetails;
|
||||
extern NSString * const MMEEventKeyAppId;
|
||||
extern NSString * const MMEEventKeyAppVersion;
|
||||
extern NSString * const MMEEventKeyAppStartDate;
|
||||
extern NSString * const MMEEventKeyCustomData;
|
||||
|
||||
#pragma mark - MMEErrorDomain
|
||||
|
||||
/*! @brief NSErrorDomain for MapboxMobileEvents */
|
||||
extern NSErrorDomain const MMEErrorDomain;
|
||||
|
||||
/*! @brief MMEErrorDomain Error Numbers
|
||||
- MMENoError: No Error
|
||||
- MMEErrorException for exceptions
|
||||
- MMEErrorEventInit for errors when initlizing events
|
||||
- MMEErrorEventInitMissingKey if the event attributes dictionary does not include the event key,
|
||||
- MMEErrorEventInitException if an exception occured durring initWithAttributes:error:,
|
||||
- MMEErrorEventInitInvalid if the provided eventAttributes cannot be converted to JSON objects
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, MMEErrorNumber) {
|
||||
MMENoError = 0,
|
||||
MMEErrorException = 10001,
|
||||
MMEErrorEventInit = 10002,
|
||||
MMEErrorEventInitMissingKey = 10003,
|
||||
MMEErrorEventInitException = 10004,
|
||||
MMEErrorEventInitInvalid = 10005,
|
||||
MMEErrorEventEncoding = 10006,
|
||||
MMEErrorEventCounting = 10007
|
||||
};
|
||||
|
||||
/*! @brief key for MMEErrorEventInit userInfo dictionary containing the attributes which failed to create the event */
|
||||
extern NSString * const MMEErrorEventAttributesKey;
|
||||
|
||||
/*! @brief key for MMEErrorDomain userInfo dictionary containing the underlying exception which triggered the error */
|
||||
extern NSString * const MMEErrorUnderlyingExceptionKey;
|
||||
|
||||
#pragma mark - Deprecated
|
||||
|
||||
extern NSString * const MMEErrorDescriptionKey; MME_DEPRECATED_MSG("Use NSLocalizedDescriptionKey")
|
||||
|
||||
extern NSString * const MMEEventKeyVendorID MME_DEPRECATED_MSG("Use MMEEventKeyVendorId");
|
||||
extern NSString * const MMEEventKeyInstallationID MME_DEPRECATED_MSG("Use MMEEventKeyInstallationId");
|
||||
extern NSString * const MMEEventKeyAppID MME_DEPRECATED_MSG("Use MMEEventKeyInstallationId");
|
||||
|
||||
extern NSString * const MMELoggerHTML MME_DEPRECATED;
|
||||
extern NSString * const MMELoggerShareableHTML MME_DEPRECATED;
|
||||
|
||||
extern NSString * const MMEEventKeyGestureId MME_DEPRECATED;
|
||||
extern NSString * const MMEEventKeyGestureID MME_DEPRECATED;
|
||||
extern NSString * const MMEEventGestureSingleTap MME_DEPRECATED;
|
||||
extern NSString * const MMEEventGestureDoubleTap MME_DEPRECATED;
|
||||
extern NSString * const MMEEventGestureTwoFingerSingleTap MME_DEPRECATED;
|
||||
extern NSString * const MMEEventGestureQuickZoom MME_DEPRECATED;
|
||||
extern NSString * const MMEEventGesturePanStart MME_DEPRECATED;
|
||||
extern NSString * const MMEEventGesturePinchStart MME_DEPRECATED;
|
||||
extern NSString * const MMEEventGestureRotateStart MME_DEPRECATED;
|
||||
extern NSString * const MMEEventGesturePitchStart MME_DEPRECATED;
|
||||
extern NSString * const MMEEventTypeMapTap MME_DEPRECATED;
|
||||
extern NSString * const MMEEventTypeMapDragEnd MME_DEPRECATED;
|
||||
@@ -0,0 +1,26 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6718394795f184698a40cb2aaeb50e0f
|
||||
timeCreated: 1570560566
|
||||
licenseType: Pro
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,172 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "MMETypes.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class MMECommonEventData;
|
||||
|
||||
/*! @brief represents a telemetry event, with a name, date and attributes */
|
||||
@interface MMEEvent : NSObject <NSCopying,NSSecureCoding>
|
||||
|
||||
/*! @brief date on which the event occured - MMEEventKeyDateCreated */
|
||||
@property (nonatomic, readonly, copy) NSDate *date;
|
||||
|
||||
/*! @brief name of the event, from MMEConstants.h - MMEEventKeyEvent */
|
||||
@property (nonatomic, readonly, copy) NSString *name;
|
||||
|
||||
/*! @brief attributes of the event, a dictionary for which [NSJSONSerialization isValidJSONObject:] returns YES */
|
||||
@property (nonatomic, readonly, copy) NSDictionary *attributes;
|
||||
|
||||
/*! @brief Designated Initilizer for events
|
||||
@param eventAttributes attributes of the event
|
||||
@param error present if the event could not be created with the properties provided
|
||||
@return a new event with the date, name and attributes provided
|
||||
*/
|
||||
- (instancetype)initWithAttributes:(NSDictionary *)eventAttributes error:(NSError **)error NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
#pragma mark - Generic Events
|
||||
|
||||
/*! @brief eventWithAttributes: - initilization errors are reported to the EventsManagerDelegate
|
||||
@param attributes attrs
|
||||
@return event
|
||||
*/
|
||||
+ (instancetype)eventWithAttributes:(NSDictionary *)attributes;
|
||||
|
||||
/*! @brief eventWithAttributes: - initilization errors are reported to the EventsManagerDelegate
|
||||
@param attributes attrs
|
||||
@return event
|
||||
*/
|
||||
+ (instancetype)eventWithAttributes:(NSDictionary *)attributes error:(NSError **)error;
|
||||
|
||||
#pragma mark - Custom Events
|
||||
|
||||
/*! @brief turnstileEventWithAttributes:
|
||||
@param attributes event attrs
|
||||
@return turnstile event
|
||||
*/
|
||||
+ (instancetype)turnstileEventWithAttributes:(NSDictionary *)attributes;
|
||||
|
||||
/*! @brief visitEventWithAttributes:
|
||||
@param attributes attrs
|
||||
@return event
|
||||
*/
|
||||
+ (instancetype)visitEventWithAttributes:(NSDictionary *)attributes;
|
||||
|
||||
#pragma mark - Crash Events
|
||||
|
||||
/*! @brief crashEventReporting:error:
|
||||
@param eventsError error to report
|
||||
@param createError pointer to an error creating the report
|
||||
@return event
|
||||
*/
|
||||
+ (instancetype)crashEventReporting:(NSError *)eventsError error:(NSError **)createError;
|
||||
|
||||
#pragma mark - Debug Devents
|
||||
|
||||
/*! @brief debugEventWithAttributes: debug logging event with attributes provided
|
||||
@param attributes attrs
|
||||
@return event
|
||||
*/
|
||||
+ (instancetype)debugEventWithAttributes:(NSDictionary *)attributes MME_DEPRECATED;
|
||||
|
||||
/*! @brief debugEventWithError: debug logging event with the error provided
|
||||
@param error error
|
||||
@return event
|
||||
*/
|
||||
+ (instancetype)debugEventWithError:(NSError *)error MME_DEPRECATED;
|
||||
|
||||
/*! @brief debugEventWithException: debug logging event the the exception provided
|
||||
@param except exception
|
||||
@return event
|
||||
*/
|
||||
+ (instancetype)debugEventWithException:(NSException *)except MME_DEPRECATED;
|
||||
|
||||
#pragma mark - Deprecated
|
||||
|
||||
#pragma mark - Deprecated (MMECommonEventData)
|
||||
|
||||
/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
|
||||
@note please use eventWithAttributes:error:
|
||||
*/
|
||||
+ (instancetype)locationEventWithAttributes:(NSDictionary *)attributes instanceIdentifer:(NSString *)instanceIdentifer commonEventData:(MMECommonEventData *)commonEventData
|
||||
MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
|
||||
|
||||
/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
|
||||
@note replacment TBD
|
||||
*/
|
||||
+ (instancetype)mapLoadEventWithDateString:(NSString *)dateString commonEventData:(MMECommonEventData *)commonEventData
|
||||
MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
|
||||
|
||||
#pragma mark - Deprecated (Event Name)
|
||||
|
||||
/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
|
||||
@note please use eventWithAttributes:error:
|
||||
*/
|
||||
+ (instancetype)eventWithName:(NSString *)eventName attributes:(NSDictionary *)attributes
|
||||
MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
|
||||
|
||||
/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
|
||||
@note please use eventWithAttributes:error:
|
||||
*/
|
||||
+ (instancetype)navigationEventWithName:(NSString *)name attributes:(NSDictionary *)attributes
|
||||
MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
|
||||
|
||||
/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
|
||||
@note please use eventWithAttributes:error:
|
||||
*/
|
||||
+ (instancetype)visionEventWithName:(NSString *)name attributes:(NSDictionary *)attributes
|
||||
MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
|
||||
|
||||
/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
|
||||
@note please use eventWithAttributes:error:
|
||||
*/
|
||||
+ (instancetype)searchEventWithName:(NSString *)name attributes:(NSDictionary *)attributes
|
||||
MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
|
||||
|
||||
/*! brief deprecated in MabboxMobileEvents 1.0.0 or later
|
||||
@note please use eventWithAttributes:error:
|
||||
*/
|
||||
+ (instancetype)carplayEventWithName:(NSString *)name attributes:(NSDictionary *)attributes
|
||||
MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
|
||||
|
||||
#pragma mark - Deprecated (Date String)
|
||||
|
||||
/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
|
||||
@note please use eventWithName:attributes:
|
||||
*/
|
||||
+ (instancetype)telemetryMetricsEventWithDateString:(NSString *)dateString attributes:(NSDictionary *)attributes
|
||||
MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
|
||||
|
||||
/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
|
||||
@note map gesture events are no longer supported
|
||||
*/
|
||||
+ (instancetype)mapTapEventWithDateString:(NSString *)dateString attributes:(NSDictionary *)attributes
|
||||
MME_DEPRECATED_MSG("map gesture events are no longer supported");
|
||||
|
||||
/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
|
||||
@note map gesture events are no longer supported
|
||||
*/
|
||||
+ (instancetype)mapDragEndEventWithDateString:(NSString *)dateString attributes:(NSDictionary *)attributes
|
||||
MME_DEPRECATED_MSG("map gesture events are no longer supported");
|
||||
|
||||
/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
|
||||
@note please use eventWithName:attributes:
|
||||
*/
|
||||
+ (instancetype)mapOfflineDownloadStartEventWithDateString:(NSString *)dateString attributes:(NSDictionary *)attributes
|
||||
MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
|
||||
|
||||
/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
|
||||
@note please use eventWithName:attributes:
|
||||
*/
|
||||
+ (instancetype)mapOfflineDownloadEndEventWithDateString:(NSString *)dateString attributes:(NSDictionary *)attributes
|
||||
MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
|
||||
|
||||
/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
|
||||
@note please use eventWithName:attributes:
|
||||
*/
|
||||
+ (instancetype)eventWithDateString:(NSString *)dateString name:(NSString *)name attributes:(NSDictionary *)attributes
|
||||
MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,26 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6c1879202f10e4c3da36b4eac7f010e1
|
||||
timeCreated: 1570560566
|
||||
licenseType: Pro
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,152 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreLocation/CoreLocation.h>
|
||||
|
||||
#import "MMETypes.h"
|
||||
|
||||
@class MMEEvent;
|
||||
@protocol MMEEventsManagerDelegate;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/*! @brief Mapbox Mobile Events Manager */
|
||||
@interface MMEEventsManager : NSObject
|
||||
|
||||
/*! @brief events manager delegate */
|
||||
@property (nonatomic, weak) id<MMEEventsManagerDelegate> delegate;
|
||||
|
||||
/*! @brief YES if metrics collection is enabled */
|
||||
@property (nonatomic, getter=isMetricsEnabled) BOOL metricsEnabled;
|
||||
|
||||
/*! @brief YES if metrics collection is enabled in the simulator */
|
||||
@property (nonatomic, getter=isMetricsEnabledInSimulator) BOOL metricsEnabledInSimulator;
|
||||
|
||||
/*! @brief YES if metrics collection is enabled when the app is in use */
|
||||
@property (nonatomic, getter=isMetricsEnabledForInUsePermissions) BOOL metricsEnabledForInUsePermissions;
|
||||
|
||||
/*! @brief YES if debug logging is enabled */
|
||||
@property (nonatomic, getter=isDebugLoggingEnabled) BOOL debugLoggingEnabled;
|
||||
|
||||
/*! @brief UserAgent base string, in RFC 2616 format
|
||||
@link https://www.ietf.org/rfc/rfc2616.txt */
|
||||
@property (nonatomic, readonly) NSString *userAgentBase;
|
||||
|
||||
/*! @brief SDK version, in Semantic Versioning 2.0.0 format
|
||||
@link https://semver.org */
|
||||
@property (nonatomic, readonly) NSString *hostSDKVersion;
|
||||
|
||||
/*! @brief SKU Identifier */
|
||||
@property (nonatomic, copy) NSString *skuId;
|
||||
|
||||
/*! @brief Mapbox Access Token
|
||||
@link https://account.mapbox.com */
|
||||
@property (nonatomic, copy) NSString *accessToken;
|
||||
|
||||
/*! @brief baseURL */
|
||||
@property (nonatomic, null_resettable) NSURL *baseURL;
|
||||
|
||||
/*! @brief accountType */
|
||||
@property (nonatomic) NSInteger accountType;
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/*! @brief Shared Mabpox Mobile Events Manager */
|
||||
+ (instancetype)sharedManager;
|
||||
|
||||
#pragma mark - Exception Free API
|
||||
|
||||
/*!
|
||||
@brief designated initilizer
|
||||
@param accessToken Mapbox Access Token
|
||||
@param userAgentBase UserAgent base string, in RFC 2616 format
|
||||
@param hostSDKVersion SDK version, in Semantic Versioning 2.0.0 format
|
||||
@throws no exceptions
|
||||
*/
|
||||
- (void)initializeWithAccessToken:(NSString *)accessToken userAgentBase:(NSString *)userAgentBase hostSDKVersion:(NSString *)hostSDKVersion;
|
||||
|
||||
/*! @brief pauseOrResumeMetricsCollectionIfRequired
|
||||
@throws no exceptions */
|
||||
- (void)pauseOrResumeMetricsCollectionIfRequired;
|
||||
|
||||
/*! @brief flush the events pipeline, sending any pending events
|
||||
@throws no exceptions */
|
||||
- (void)flush;
|
||||
|
||||
/*! @brief resetEventQueuing
|
||||
@throws no exceptions */
|
||||
- (void)resetEventQueuing;
|
||||
|
||||
/*! @brief sendTurnstileEvent
|
||||
@throws no exceptions */
|
||||
- (void)sendTurnstileEvent;
|
||||
|
||||
/*! @brief sendTelemetryMetricsEvent
|
||||
@throws no exceptions */
|
||||
- (void)sendTelemetryMetricsEvent;
|
||||
|
||||
/*! @brief disableLocationMetrics */
|
||||
- (void)disableLocationMetrics;
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/*! @brief enqueueEventWithName:
|
||||
@param name event name */
|
||||
- (void)enqueueEventWithName:(NSString *)name;
|
||||
|
||||
/*! @brief enqueueEventWithName:attributes:
|
||||
@param name event name
|
||||
@param attributes event attributes */
|
||||
- (void)enqueueEventWithName:(NSString *)name attributes:(MMEMapboxEventAttributes *)attributes;
|
||||
|
||||
/*! @brief postMetadata:filePaths:completionHander:
|
||||
@param metadata array of metadat
|
||||
@param filePaths array of file paths
|
||||
@param completionHandler completion handler block
|
||||
*/
|
||||
- (void)postMetadata:(NSArray *)metadata filePaths:(NSArray *)filePaths completionHandler:(nullable void (^)(NSError * _Nullable error))completionHandler;
|
||||
|
||||
- (void)displayLogFileFromDate:(NSDate *)logDate MME_DEPRECATED;
|
||||
|
||||
#pragma mark - Error & Exception Reporting
|
||||
|
||||
/*! @brief report an error to the telemetry service
|
||||
@return the report event, for inspection or logging
|
||||
@throws no exceptions */
|
||||
- (MMEEvent *)reportError:(NSError *)eventsError;
|
||||
|
||||
/*! @brief report an exception to the telemetry service
|
||||
@return the report event, for inspection or logging
|
||||
@throws no exceptions */
|
||||
- (MMEEvent *)reportException:(NSException *)eventException;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/*! @brief delegate methods for MMEEventsManager */
|
||||
@protocol MMEEventsManagerDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
/*! @brief eventsManager:didUpdateLocations: reports location updates to the delegate
|
||||
@param eventsManager shared manager
|
||||
@param locations array of CLLocations
|
||||
*/
|
||||
- (void)eventsManager:(MMEEventsManager *)eventsManager didUpdateLocations:(NSArray<CLLocation *> *)locations;
|
||||
|
||||
#if TARGET_OS_IOS
|
||||
/*! @brief eventsManager:didVisit: reports visits to the delegate
|
||||
@param eventsManager shared manager
|
||||
@param visit CLVisit
|
||||
*/
|
||||
- (void)eventsManager:(MMEEventsManager *)eventsManager didVisit:(CLVisit *)visit;
|
||||
#endif
|
||||
|
||||
/** @brief reports errors encoutered by the Events Manager to the delegate
|
||||
@param eventsManager the shared events manager
|
||||
@param error the encountered NSError object
|
||||
*/
|
||||
- (void)eventsManager:(MMEEventsManager *)eventsManager didEncounterError:(NSError *)error;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3edca867bab9748d6be5abf6b6006229
|
||||
timeCreated: 1570560566
|
||||
licenseType: Pro
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,54 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef NS_ARRAY_OF
|
||||
// Foundation collection classes adopted lightweight generics in iOS 9.0 and OS X 10.11 SDKs.
|
||||
#if __has_feature(objc_generics) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
|
||||
/** Inserts a type specifier for a pointer to a lightweight generic with the given collection and object classes. Use a `*` for any non-`id` object classes but no `*` for the collection class. */
|
||||
#define NS_ARRAY_OF(ObjectClass...) NSArray <ObjectClass>
|
||||
#define NS_MUTABLE_ARRAY_OF(ObjectClass...) NSMutableArray <ObjectClass>
|
||||
#define NS_SET_OF(ObjectClass...) NSSet <ObjectClass>
|
||||
#define NS_MUTABLE_SET_OF(ObjectClass...) NSMutableSet <ObjectClass>
|
||||
#define NS_DICTIONARY_OF(ObjectClass...) NSDictionary <ObjectClass>
|
||||
#define NS_MUTABLE_DICTIONARY_OF(ObjectClass...) NSMutableDictionary <ObjectClass>
|
||||
#else
|
||||
#define NS_ARRAY_OF(ObjectClass...) NSArray
|
||||
#define NS_MUTABLE_ARRAY_OF(ObjectClass...) NSMutableArray
|
||||
#define NS_SET_OF(ObjectClass...) NSSet
|
||||
#define NS_MUTABLE_SET_OF(ObjectClass...) NSMutableSet
|
||||
#define NS_DICTIONARY_OF(ObjectClass...) NSDictionary
|
||||
#define NS_MUTABLE_DICTIONARY_OF(ObjectClass...) NSMutableDictionary
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef NS_DICTIONARY_OF(NSString *, id) MMEMapboxEventAttributes;
|
||||
typedef NS_MUTABLE_DICTIONARY_OF(NSString *, id) MMEMutableMapboxEventAttributes;
|
||||
|
||||
#ifdef MME_DEPRECATION_WARNINGS
|
||||
|
||||
#ifndef MME_DEPRECATED
|
||||
#define MME_DEPRECATED __attribute__((deprecated))
|
||||
#endif
|
||||
|
||||
#ifndef MME_DEPRECATED_MSG
|
||||
#define MME_DEPRECATED_MSG(msg) __attribute((deprecated((msg))))
|
||||
#endif
|
||||
|
||||
#ifndef MME_DEPRECATED_GOTO
|
||||
#define MME_DEPRECATED_GOTO(msg,label) __attribute((deprecated((msg),(label))))
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifndef MME_DEPRECATED
|
||||
#define MME_DEPRECATED
|
||||
#endif
|
||||
|
||||
#ifndef MME_DEPRECATED_MSG
|
||||
#define MME_DEPRECATED_MSG(msg)
|
||||
#endif
|
||||
|
||||
#ifndef MME_DEPRECATED_GOTO
|
||||
#define MME_DEPRECATED_GOTO(msg,label)
|
||||
#endif
|
||||
|
||||
#endif // MME_DEPRECATION_WARNINGS
|
||||
@@ -0,0 +1,26 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7743c930e90e943f4941ec6e3ad1a58f
|
||||
timeCreated: 1570560566
|
||||
licenseType: Pro
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,14 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for MapboxMobileEvents.
|
||||
FOUNDATION_EXPORT double MapboxMobileEventsVersionNumber;
|
||||
|
||||
//! Project version string for MapboxMobileEvents
|
||||
FOUNDATION_EXPORT const unsigned char MapboxMobileEventsVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <MapboxMobileEvents/PublicHeader.h>
|
||||
|
||||
#import <MapboxMobileEvents/MMEConstants.h>
|
||||
#import <MapboxMobileEvents/MMEEvent.h>
|
||||
#import <MapboxMobileEvents/MMETypes.h>
|
||||
#import <MapboxMobileEvents/MMEEventsManager.h>
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 458ba4499a3bc4d2aafae9f55ca4c37e
|
||||
timeCreated: 1570560566
|
||||
licenseType: Pro
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in new issue
Block a user