Removing telemetry and mapbox mobile events

This commit is contained in:
Petr Pokorny
2021-01-24 12:09:51 +01:00
parent 5c8719f86d
commit 38763fe65b
38 changed files with 13 additions and 1081 deletions

View File

@@ -8,8 +8,6 @@ NS_ASSUME_NONNULL_BEGIN
@optional
- (NSString *)skuToken;
- (NSURLSession *)sessionForNetworkManager:(MGLNativeNetworkManager *)networkManager;
@required
@@ -36,8 +34,6 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, weak) id<MGLNativeNetworkDelegate> delegate;
@property (nonatomic, readonly) NSString *skuToken;
@property (nonatomic, readonly) NSURLSessionConfiguration *sessionConfiguration;
- (void)startDownloadEvent:(NSString *)event type:(NSString *)type;

View File

@@ -206,9 +206,6 @@ NSURL *resourceURL(const Resource& resource) {
if (resource.usage == Resource::Usage::Offline) {
[queryItems addObject:[NSURLQueryItem queryItemWithName:@"offline" value:@"true"]];
} else {
// Only add SKU token to requests not tagged as "offline" usage.
[queryItems addObject:[NSURLQueryItem queryItemWithName:@"sku" value:MGLNativeNetworkManager.sharedManager.skuToken]];
}
if (components.queryItems) {

View File

@@ -24,15 +24,6 @@ static MGLNativeNetworkManager *instance = nil;
return sessionConfiguration;
}
#pragma mark - Optionals
- (NSString *)skuToken {
if([self.delegate respondsToSelector:@selector(skuToken)]) {
return [self.delegate skuToken];
}
return nil;
}
#pragma mark - Required
- (NSURLSessionConfiguration *)sessionConfiguration {

View File

@@ -5,14 +5,6 @@
#import "NSProcessInfo+MGLAdditions.h"
#endif
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
#import "MGLMapboxEvents.h"
#import "MBXSKUToken.h"
static NSString * const MGLAccountManagerExternalClassName = @"MBXAccounts";
static NSString * const MGLAccountManagerExternalMethodName = @"skuToken";
#endif
NSString * const MGLMapboxAccountTypeKey = @"MGLMapboxAccountType";
@interface MGLAccountManager ()
@@ -73,12 +65,6 @@ NSString * const MGLMapboxAccountTypeKey = @"MGLMapboxAccountType";
}
[MGLAccountManager sharedManager].accessToken = accessToken;
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
dispatch_async(dispatch_get_main_queue(), ^{
[MGLMapboxEvents setupWithAccessToken:accessToken];
});
#endif
}
+ (NSString *)accessToken {
@@ -93,20 +79,4 @@ NSString * const MGLMapboxAccountTypeKey = @"MGLMapboxAccountType";
return [MGLAccountManager sharedManager].apiBaseURL;
}
#pragma mark - SKU Tokens
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
+ (NSString *)skuToken {
Class mbx = NSClassFromString(MGLAccountManagerExternalClassName);
if ([mbx respondsToSelector:NSSelectorFromString(MGLAccountManagerExternalMethodName)]) {
return (NSString *)[mbx valueForKeyPath:MGLAccountManagerExternalMethodName];
}
return MBXSKUToken.skuToken;
}
#endif
@end

View File

@@ -16,11 +16,6 @@ FOUNDATION_EXTERN NSString * const MGLMapboxAccountTypeKey;
/// The API base URL that is used to access Mapbox resources. The default base URL is `https://api.mapbox.com`. If `nil`, the Mapbox default base API URL is in use.
@property (atomic, readwrite, nullable) NSURL *apiBaseURL;
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
/// The current global SKU.
@property (class, atomic, readonly) NSString *skuToken;
#endif
@end
NS_ASSUME_NONNULL_END

View File

@@ -17,10 +17,6 @@
#import "MGLRendererConfiguration.h"
#import "MGLMapSnapshotter_Private.h"
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
#import "MGLMapboxEvents.h"
#endif
#if TARGET_OS_IPHONE
#import "UIImage+MGLAdditions.h"
#else
@@ -268,9 +264,6 @@ private:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:UIApplicationWillTerminateNotification object:nil];
#else
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:NSApplicationWillTerminateNotification object:nil];
#endif
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[MGLMapboxEvents pushTurnstileEvent];
#endif
}
return self;
@@ -336,9 +329,7 @@ private:
NSString *description = @(mbgl::util::toString(mbglError).c_str());
NSDictionary *userInfo = @{NSLocalizedDescriptionKey: description};
NSError *error = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeSnapshotFailed userInfo:userInfo];
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[[MMEEventsManager sharedManager] reportError:error];
#endif
// Dispatch to result queue
dispatch_async(queue, ^{
strongSelf.loading = NO;

View File

@@ -105,12 +105,6 @@ NSString * const kMGLDownloadPerformanceEvent = @"mobile.performance_trace";
}
}
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
- (NSString *)skuToken {
return MGLAccountManager.skuToken;
}
#endif
- (void)startDownloadEvent:(NSString *)urlString type:(NSString *)resourceType {
if (urlString && resourceType && ![self eventDictionaryForKey:urlString]) {
NSDate *startDate = [NSDate date];

View File

@@ -10,10 +10,6 @@
#import "NSValue+MGLAdditions.h"
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
#import "MGLMapboxEvents.h"
#endif
#include <mbgl/map/map_options.hpp>
#include <mbgl/storage/database_file_source.hpp>
@@ -130,9 +126,6 @@ private:
error = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeModifyingOfflineStorageFailed userInfo:errorDescription ? @{
NSLocalizedDescriptionKey: errorDescription,
} : nil];
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[[MMEEventsManager sharedManager] reportError:error];
#endif
}
dispatch_async(dispatch_get_main_queue(), [&, completion, weakSelf, error](void) {
[weakSelf reloadWithCompletionHandler:^(NSError * _Nullable reloadingError) {

View File

@@ -13,11 +13,6 @@
#import "MGLLoggingConfiguration_Private.h"
#import "MGLNetworkConfiguration_Private.h"
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
#import <MapboxMobileEvents/MapboxMobileEvents.h>
#import "MGLMapboxEvents.h"
#endif
#include <mbgl/actor/actor.hpp>
#include <mbgl/actor/scheduler.hpp>
#include <mbgl/storage/file_source_manager.hpp>
@@ -390,9 +385,6 @@ const MGLExceptionName MGLUnsupportedRegionTypeException = @"MGLUnsupportedRegio
NSLocalizedDescriptionKey: description,
NSLocalizedFailureReasonErrorKey: @(mbgl::util::toString(result.error()).c_str())
}];
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[[MMEEventsManager sharedManager] reportError:error];
#endif
} else {
auto& regions = result.value();
packs = [NSMutableArray arrayWithCapacity:regions.size()];
@@ -421,17 +413,6 @@ const MGLExceptionName MGLUnsupportedRegionTypeException = @"MGLUnsupportedRegio
if (completion) {
completion(pack, error);
}
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
NSMutableDictionary *offlineDownloadStartEventAttributes = [NSMutableDictionary dictionaryWithObject:MMEventTypeOfflineDownloadStart forKey:MMEEventKeyEvent];
if ([region conformsToProtocol:@protocol(MGLOfflineRegion_Private)]) {
NSDictionary *regionAttributes = ((id<MGLOfflineRegion_Private>)region).offlineStartEventAttributes;
[offlineDownloadStartEventAttributes addEntriesFromDictionary:regionAttributes];
}
[MGLMapboxEvents pushEvent:MMEventTypeOfflineDownloadStart withAttributes:offlineDownloadStartEventAttributes];
#endif
}];
}
@@ -452,9 +433,6 @@ const MGLExceptionName MGLUnsupportedRegionTypeException = @"MGLUnsupportedRegio
error = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeModifyingOfflineStorageFailed userInfo:errorDescription ? @{
NSLocalizedDescriptionKey: errorDescription,
} : nil];
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[[MMEEventsManager sharedManager] reportError:error];
#endif
}
if (completion) {
MGLOfflinePack *pack = mbglOfflineRegion ? [[MGLOfflinePack alloc] initWithMBGLRegion:new mbgl::OfflineRegion(std::move(mbglOfflineRegion.value()))] : nil;
@@ -492,9 +470,6 @@ const MGLExceptionName MGLUnsupportedRegionTypeException = @"MGLUnsupportedRegio
error = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeModifyingOfflineStorageFailed userInfo:@{
NSLocalizedDescriptionKey: @(mbgl::util::toString(exception).c_str()),
}];
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[[MMEEventsManager sharedManager] reportError:error];
#endif
}
if (completion) {
dispatch_async(dispatch_get_main_queue(), [&, completion, error](void) {
@@ -518,9 +493,6 @@ const MGLExceptionName MGLUnsupportedRegionTypeException = @"MGLUnsupportedRegio
error = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeModifyingOfflineStorageFailed userInfo:@{
NSLocalizedDescriptionKey: @(mbgl::util::toString(exception).c_str()),
}];
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[[MMEEventsManager sharedManager] reportError:error];
#endif
}
});
if (completion) {
@@ -548,9 +520,6 @@ const MGLExceptionName MGLUnsupportedRegionTypeException = @"MGLUnsupportedRegio
error = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeUnknown userInfo:@{
NSLocalizedDescriptionKey: @(mbgl::util::toString(result.error()).c_str()),
}];
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[[MMEEventsManager sharedManager] reportError:error];
#endif
} else {
auto& regions = result.value();
packs = [NSMutableArray arrayWithCapacity:regions.size()];
@@ -582,9 +551,6 @@ const MGLExceptionName MGLUnsupportedRegionTypeException = @"MGLUnsupportedRegio
error = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeModifyingOfflineStorageFailed userInfo:@{
NSLocalizedDescriptionKey: @(mbgl::util::toString(exception).c_str()),
}];
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[[MMEEventsManager sharedManager] reportError:error];
#endif
}
dispatch_sync(dispatch_get_main_queue(), ^ {
completion(error);
@@ -602,9 +568,6 @@ const MGLExceptionName MGLUnsupportedRegionTypeException = @"MGLUnsupportedRegio
error = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeModifyingOfflineStorageFailed userInfo:@{
NSLocalizedDescriptionKey: @(mbgl::util::toString(exception).c_str()),
}];
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[[MMEEventsManager sharedManager] reportError:error];
#endif
}
dispatch_async(dispatch_get_main_queue(), ^ {
completion(error);
@@ -621,9 +584,6 @@ const MGLExceptionName MGLUnsupportedRegionTypeException = @"MGLUnsupportedRegio
error = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeModifyingOfflineStorageFailed userInfo:@{
NSLocalizedDescriptionKey: @(mbgl::util::toString(exception).c_str()),
}];
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[[MMEEventsManager sharedManager] reportError:error];
#endif
}
dispatch_async(dispatch_get_main_queue(), [&, completion, error](void) {
completion(error);
@@ -640,9 +600,6 @@ const MGLExceptionName MGLUnsupportedRegionTypeException = @"MGLUnsupportedRegio
error = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeUnknown userInfo:@{
NSLocalizedDescriptionKey: @(mbgl::util::toString(exception).c_str()),
}];
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[[MMEEventsManager sharedManager] reportError:error];
#endif
}
dispatch_async(dispatch_get_main_queue(), ^{
completion(error);

View File

@@ -1,79 +0,0 @@
#import <Foundation/Foundation.h>
#import "MGLFoundation.h"
NS_ASSUME_NONNULL_BEGIN
/**
:nodoc:
The metrics type used to handle metrics events.
*/
typedef NS_ENUM(NSUInteger, MGLMetricType) {
/** :nodoc:
Metric that measures performance.
*/
MGLMetricTypePerformance = 0,
};
FOUNDATION_EXTERN MGL_EXPORT NSString* MGLStringFromMetricType(MGLMetricType metricType);
@class MGLMetricsManager;
/**
:nodoc:
The `MGLMetricsManagerDelegate` protocol defines a set of methods that you
can use to receive metric events.
*/
@protocol MGLMetricsManagerDelegate <NSObject>
/**
:nodoc:
Asks the delegate whether the metrics manager should handle metric events.
@param metricsManager The metrics manager object.
@param metricType The metric type event.
*/
- (BOOL)metricsManager:(MGLMetricsManager *)metricsManager shouldHandleMetric:(MGLMetricType)metricType;
/**
:nodoc:
Asks the delegate to handle metric events.
@param metricsManager The metrics manager object.
@param metricType The metric type event.
@param attributes The metric attributes.
*/
- (void)metricsManager:(MGLMetricsManager *)metricsManager didCollectMetric:(MGLMetricType)metricType withAttributes:(NSDictionary *)attributes;
@end
/**
:nodoc:
The `MGLMetricsManager` object provides a single poin to collect SDK metrics
such as tile download latency.
*/
MGL_EXPORT
@interface MGLMetricsManager : NSObject
/**
:nodoc:
Returns the shared metrics manager object.
*/
@property (class, nonatomic, readonly) MGLMetricsManager *sharedManager;
/**
:nodoc:
The metrics manager delegate that will recieve metric events.
*/
@property (nonatomic, weak) id<MGLMetricsManagerDelegate> delegate;
#if TARGET_OS_IOS
/**
:nodoc:
Sends metric events to Mapbox.
*/
- (void)pushMetric:(MGLMetricType)metricType withAttributes:(NSDictionary *)attributes;
#endif
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,134 +0,0 @@
#import "MGLSDKMetricsManager_Private.h"
#import "MGLNetworkConfiguration_Private.h"
#if TARGET_OS_IOS
#import "MGLMapboxEvents.h"
#import <mach-o/arch.h>
#import <sys/utsname.h>
#import <UIKit/UIKit.h>
#endif
NSString* MGLStringFromMetricType(MGLMetricType metricType) {
NSString *eventName;
switch (metricType) {
case MGLMetricTypePerformance:
eventName = kMGLDownloadPerformanceEvent;
break;
}
return eventName;
}
// Taken verbatim from NXFreeArchInfo header documentation
#if TARGET_OS_IOS
static void MGLFreeArchInfo(const NXArchInfo *x)
{
const NXArchInfo *p;
p = NXGetAllArchInfos();
while(p->name != NULL){
if(x == p)
return;
p++;
}
free((char *)x->description);
free((NXArchInfo *)x);
}
#endif
@interface MGLMetricsManager() <MGLNetworkConfigurationMetricsDelegate>
@property (strong, nonatomic) NSDictionary *metadata;
@end
@implementation MGLMetricsManager
+ (instancetype)sharedManager
{
static dispatch_once_t once;
static MGLMetricsManager *sharedConfiguration;
dispatch_once(&once, ^{
sharedConfiguration = [[self alloc] init];
[MGLNetworkConfiguration sharedManager].metricsDelegate = sharedConfiguration;
#if TARGET_OS_IOS
UIDevice *currentDevice = [UIDevice currentDevice];
NSString *osVersion = currentDevice.systemVersion;
NSString *screenSize = [NSString stringWithFormat:@"%.fx%.f", [UIScreen mainScreen].bounds.size.width,
[UIScreen mainScreen].bounds.size.height];
NSLocale *currentLocale = [NSLocale currentLocale];
NSString *country = [currentLocale objectForKey:NSLocaleCountryCode] ?: @"unknown";
NSString *device = deviceName();
NSString *abi = @"unknown";
{
const NXArchInfo *localArchInfo = NXGetLocalArchInfo();
if (localArchInfo) {
abi = @(localArchInfo->description);
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
// Although NXFreeArchInfo appears to be weakly linked, it does
// not have the weak_import attribute, so check the OS version.
if (&NXFreeArchInfo && [processInfo isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){10, 0, 0}]) {
NXFreeArchInfo(localArchInfo);
} else {
MGLFreeArchInfo(localArchInfo);
}
}
}
NSString *ram = [NSString stringWithFormat:@"%llu", [NSProcessInfo processInfo].physicalMemory];
NSString *os = currentDevice.systemName;
sharedConfiguration.metadata = @{ @"version" : osVersion,
@"screenSize" : screenSize,
@"country" : country,
@"device" : device,
@"abi" : abi,
@"brand" : @"Apple",
@"ram" : ram,
@"os" : os
};
#endif
});
return sharedConfiguration;
}
- (void)handleMetricsEvent:(MGLMetricType)metricType withAttributes:(NSDictionary *)attributes {
if ([self.delegate metricsManager:self shouldHandleMetric:metricType]) {
[self.delegate metricsManager:self didCollectMetric:metricType withAttributes:attributes];
}
}
#if TARGET_OS_IOS
- (void)pushMetric:(MGLMetricType)metricType withAttributes:(NSDictionary *)attributes {
NSString *eventName = MGLStringFromMetricType(metricType);
NSMutableDictionary *mutableAttributes = [NSMutableDictionary dictionaryWithDictionary:attributes];
[mutableAttributes setObject:self.metadata forKey:@"metadata"];
[MGLMapboxEvents pushEvent:eventName withAttributes:mutableAttributes];
}
NSString* deviceName()
{
struct utsname systemInfo;
uname(&systemInfo);
return [NSString stringWithCString:systemInfo.machine
encoding:NSUTF8StringEncoding];
}
#endif
- (void)networkConfiguration:(MGLNetworkConfiguration *)networkConfiguration didGenerateMetricEvent:(NSDictionary *)metricEvent {
[self handleMetricsEvent:MGLMetricTypePerformance withAttributes:metricEvent];
}
@end

View File

@@ -1,11 +0,0 @@
#import "MGLSDKMetricsManager.h"
NS_ASSUME_NONNULL_BEGIN
@interface MGLMetricsManager (Private)
- (void)handleMetricsEvent:(MGLMetricType)metricType withAttributes:(NSDictionary *)attributes;
@end
NS_ASSUME_NONNULL_END

View File

@@ -5,10 +5,6 @@
#import "NSString+MGLAdditions.h"
#import "MGLTypes.h"
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
#import <MapboxMobileEvents/MapboxMobileEvents.h>
#endif
#import <mbgl/util/geo.hpp>
bool operator==(const CLLocationCoordinate2D lhs, const CLLocationCoordinate2D rhs) {
@@ -22,9 +18,6 @@ bool operator==(const CLLocationCoordinate2D lhs, const CLLocationCoordinate2D r
if (!string) {
if (outError) {
*outError = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeUnknown userInfo:nil];
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[[MMEEventsManager sharedManager] reportError:*outError];
#endif
}
return nil;
}
@@ -37,9 +30,6 @@ bool operator==(const CLLocationCoordinate2D lhs, const CLLocationCoordinate2D r
*outError = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeUnknown userInfo:@{
NSLocalizedFailureReasonErrorKey: @(err.what()),
}];
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[[MMEEventsManager sharedManager] reportError:*outError];
#endif
}
return nil;
}

View File

@@ -13,10 +13,6 @@
#import "MGLStyle.h"
#import "MGLLoggingConfiguration_Private.h"
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
#import <MapboxMobileEvents/MMEConstants.h>
#endif
@interface MGLShapeOfflineRegion () <MGLOfflineRegion_Private, MGLShapeOfflineRegion_Private>
@end
@@ -29,14 +25,7 @@
@synthesize includesIdeographicGlyphs = _includesIdeographicGlyphs;
-(NSDictionary *)offlineStartEventAttributes {
return @{
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
MMEEventKeyShapeForOfflineRegion: @"shaperegion",
MMEEventKeyMinZoomLevel: @(self.minimumZoomLevel),
MMEEventKeyMaxZoomLevel: @(self.maximumZoomLevel),
MMEEventKeyStyleURL: self.styleURL.absoluteString ?: [NSNull null]
#endif
};
return @{};
}
+ (BOOL)supportsSecureCoding {

View File

@@ -3,10 +3,6 @@
#import "MGLMapView_Private.h"
#import "NSBundle+MGLAdditions.h"
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
#import <MapboxMobileEvents/MapboxMobileEvents.h>
#endif
#include <mbgl/style/style.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/style/source.hpp>
@@ -90,10 +86,6 @@ const MGLExceptionName MGLInvalidStyleSourceException = @"MGLInvalidStyleSourceE
*outError = [NSError errorWithDomain:MGLErrorDomain
code:MGLErrorCodeSourceIsInUseCannotRemove
userInfo:@{ NSLocalizedDescriptionKey : localizedDescription }];
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[[MMEEventsManager sharedManager] reportError:*outError];
#endif
}
} else if (outError) {
// TODO: Consider raising an exception here
@@ -104,9 +96,6 @@ const MGLExceptionName MGLInvalidStyleSourceException = @"MGLInvalidStyleSourceE
*outError = [NSError errorWithDomain:MGLErrorDomain
code:MGLErrorCodeSourceIdentifierMismatch
userInfo:@{ NSLocalizedDescriptionKey : localizedDescription }];
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[[MMEEventsManager sharedManager] reportError:*outError];
#endif
}
return removed;

View File

@@ -10,10 +10,6 @@
#import "MGLStyle.h"
#import "MGLLoggingConfiguration_Private.h"
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
#import <MapboxMobileEvents/MMEConstants.h>
#endif
@interface MGLTilePyramidOfflineRegion () <MGLOfflineRegion_Private, MGLTilePyramidOfflineRegion_Private>
@end
@@ -26,14 +22,7 @@
@synthesize includesIdeographicGlyphs = _includesIdeographicGlyphs;
-(NSDictionary *)offlineStartEventAttributes {
return @{
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
MMEEventKeyShapeForOfflineRegion: @"tileregion",
MMEEventKeyMinZoomLevel: @(self.minimumZoomLevel),
MMEEventKeyMaxZoomLevel: @(self.maximumZoomLevel),
MMEEventKeyStyleURL: self.styleURL.absoluteString ?: [NSNull null]
#endif
};
return @{};
}
+ (BOOL)supportsSecureCoding {

View File

@@ -40,26 +40,6 @@ namespace mbgl {
Resource resource(Resource::Kind::Unknown, testURL);
// By default, resources are NOT offline
{
bool skuTokenQueryItemFound;
NSURL *url = resourceURL(resource);
NSURLComponents *components = [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO];
for (NSURLQueryItem *item in components.queryItems) {
XCTAssertFalse([item.name isEqualToString:@"offline"]);
if ([item.name isEqualToString:@"sku"]) {
skuTokenQueryItemFound = YES;
}
}
// https://github.com/mapbox/mapbox-gl-native-ios/pull/296
//#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
XCTAssertTrue(skuTokenQueryItemFound, "Default resource URL should have SKU token query item");
//#else
// XCTAssertFalse(skuTokenQueryItemFound, "Non-iOS platforms should not have a SKU token query item");
//#endif
}
// Now check offline
resource.setUsage(Resource::Usage::Offline);

View File

@@ -54,7 +54,6 @@
XCTAssertNotNil(manager);
// Expected properties
XCTAssertNotNil([manager skuToken]);
XCTAssertNotNil([manager sessionConfiguration]);
[MGLNetworkConfiguration sharedManager];
@@ -77,7 +76,6 @@
XCTAssertNotNil(manager);
// Expected properties
XCTAssertNotNil([manager skuToken]);
XCTAssertNotNil([manager sessionConfiguration]);
}

View File

@@ -3,7 +3,7 @@
#import "MBXAppDelegate.h"
#import "MBXViewController.h"
@interface MBXAppDelegate() <MGLMetricsManagerDelegate>
@interface MBXAppDelegate()
@end
@@ -15,7 +15,6 @@
[MGLLoggingConfiguration sharedConfiguration].loggingLevel = MGLLoggingLevelFault;
#endif
[MGLMetricsManager sharedManager].delegate = self;
return YES;
}
@@ -37,12 +36,4 @@
return NO;
}
- (BOOL)metricsManager:(MGLMetricsManager *)metricsManager shouldHandleMetric:(MGLMetricType)metricType {
return YES;
}
- (void)metricsManager:(MGLMetricsManager *)metricsManager didCollectMetric:(MGLMetricType)metricType withAttributes:(NSDictionary *)attributes {
[[MGLMetricsManager sharedManager] pushMetric:metricType withAttributes:attributes];
}
@end

View File

@@ -61,12 +61,6 @@
1FCAE2A520B872A400C577DD /* MGLLocationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCAE2A120B872A400C577DD /* MGLLocationManager.m */; };
1FCAE2A820B88B3800C577DD /* MGLLocationManager_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCAE2A620B88B3800C577DD /* MGLLocationManager_Private.h */; };
1FCAE2A920B88B3800C577DD /* MGLLocationManager_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCAE2A620B88B3800C577DD /* MGLLocationManager_Private.h */; };
1FCCEC34222605C400302E3B /* MGLSDKMetricsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCCEC32222605C400302E3B /* MGLSDKMetricsManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
1FCCEC35222605C400302E3B /* MGLSDKMetricsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCCEC32222605C400302E3B /* MGLSDKMetricsManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
1FCCEC36222605C400302E3B /* MGLSDKMetricsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCCEC33222605C400302E3B /* MGLSDKMetricsManager.m */; };
1FCCEC37222605C400302E3B /* MGLSDKMetricsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCCEC33222605C400302E3B /* MGLSDKMetricsManager.m */; };
1FCCEC3A222607A500302E3B /* MGLSDKMetricsManager_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCCEC38222607A500302E3B /* MGLSDKMetricsManager_Private.h */; };
1FCCEC3B222607A500302E3B /* MGLSDKMetricsManager_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCCEC38222607A500302E3B /* MGLSDKMetricsManager_Private.h */; };
1FF48587223710BE00F19727 /* MGLAttributedExpression.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FF48585223710BE00F19727 /* MGLAttributedExpression.h */; settings = {ATTRIBUTES = (Public, ); }; };
1FF48588223710BE00F19727 /* MGLAttributedExpression.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FF48585223710BE00F19727 /* MGLAttributedExpression.h */; settings = {ATTRIBUTES = (Public, ); }; };
1FF48589223710BE00F19727 /* MGLAttributedExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FF48586223710BE00F19727 /* MGLAttributedExpression.m */; };
@@ -306,10 +300,6 @@
96036A0620059BBA00510F3D /* MGLNSOrthographyAdditionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 96036A0520059BBA00510F3D /* MGLNSOrthographyAdditionsTests.m */; };
960D0C361ECF5AAF008E151F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 960D0C351ECF5AAF008E151F /* Images.xcassets */; };
960D0C371ECF5AAF008E151F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 960D0C351ECF5AAF008E151F /* Images.xcassets */; };
9620BB381E69FE1700705A1D /* MGLSDKUpdateChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 9620BB361E69FE1700705A1D /* MGLSDKUpdateChecker.h */; };
9620BB391E69FE1700705A1D /* MGLSDKUpdateChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 9620BB361E69FE1700705A1D /* MGLSDKUpdateChecker.h */; };
9620BB3A1E69FE1700705A1D /* MGLSDKUpdateChecker.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9620BB371E69FE1700705A1D /* MGLSDKUpdateChecker.mm */; };
9620BB3B1E69FE1700705A1D /* MGLSDKUpdateChecker.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9620BB371E69FE1700705A1D /* MGLSDKUpdateChecker.mm */; };
9621F2502091020E005B3800 /* NSExpression+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3510FFEE1D6D9D8C00F413B2 /* NSExpression+MGLAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
96381C0222C6F3950053497D /* MGLMapViewPitchTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 96381C0122C6F3950053497D /* MGLMapViewPitchTests.m */; };
9641771F22D546DA00332422 /* MGLCompassButton_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 9641771E22D546DA00332422 /* MGLCompassButton_Private.h */; };
@@ -328,8 +318,6 @@
967C864C210A9D3C004DF794 /* UIDevice+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 967C8649210A9D3C004DF794 /* UIDevice+MGLAdditions.h */; };
967C864D210A9D3C004DF794 /* UIDevice+MGLAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 967C864A210A9D3C004DF794 /* UIDevice+MGLAdditions.m */; };
967C864E210A9D3C004DF794 /* UIDevice+MGLAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 967C864A210A9D3C004DF794 /* UIDevice+MGLAdditions.m */; };
9680273F22653B84006BA4A1 /* MBXSKUToken.h in Headers */ = {isa = PBXBuildFile; fileRef = 9680273E22653B84006BA4A1 /* MBXSKUToken.h */; };
9680274022653B84006BA4A1 /* MBXSKUToken.h in Headers */ = {isa = PBXBuildFile; fileRef = 9680273E22653B84006BA4A1 /* MBXSKUToken.h */; };
9680276422655696006BA4A1 /* libmbxaccounts.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9680274122653C3E006BA4A1 /* libmbxaccounts.a */; };
96802766226556C5006BA4A1 /* libmbxaccounts.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9680274122653C3E006BA4A1 /* libmbxaccounts.a */; };
9686D1BD22D9357700194EA0 /* MGLMapViewZoomTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9686D1BC22D9357700194EA0 /* MGLMapViewZoomTests.mm */; };
@@ -374,29 +362,17 @@
96E6145C22CC169000109F14 /* MGLCompassButton.mm in Sources */ = {isa = PBXBuildFile; fileRef = 96E6145822CC169000109F14 /* MGLCompassButton.mm */; };
96ED34DE22374C0900E9FCA9 /* MGLMapViewDirectionTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 96ED34DD22374C0900E9FCA9 /* MGLMapViewDirectionTests.mm */; };
96F3F73C1F57124B003E2D2C /* MGLUserLocationHeadingIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 96F3F73B1F5711F1003E2D2C /* MGLUserLocationHeadingIndicator.h */; };
9C6E282B22A981570056B7BE /* MGLMapboxEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C6E282A22A980E50056B7BE /* MGLMapboxEvents.m */; };
9C6E282C22A981580056B7BE /* MGLMapboxEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C6E282A22A980E50056B7BE /* MGLMapboxEvents.m */; };
9C6E282D22A9815D0056B7BE /* MGLMapboxEvents.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C6E282922A980E50056B7BE /* MGLMapboxEvents.h */; };
9C6E282F22A9824B0056B7BE /* MGLTelemetryConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = AC518DFD201BB55A00EBC820 /* MGLTelemetryConfig.h */; };
9C6E283022A9824F0056B7BE /* MGLMapboxEvents.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C6E282922A980E50056B7BE /* MGLMapboxEvents.h */; };
A4DE3DCB23038C98005B3473 /* MGLMockGestureRecognizers.h in Sources */ = {isa = PBXBuildFile; fileRef = A4DE3DCA23038A7F005B3473 /* MGLMockGestureRecognizers.h */; };
A4DE3DCC23038CCA005B3473 /* MGLMockGestureRecognizers.m in Sources */ = {isa = PBXBuildFile; fileRef = A4DE3DC823038A07005B3473 /* MGLMockGestureRecognizers.m */; };
A4F3FB1D2254865900A30170 /* missing_icon.json in Resources */ = {isa = PBXBuildFile; fileRef = A4F3FB1C2254865900A30170 /* missing_icon.json */; };
AC518DFF201BB55A00EBC820 /* MGLTelemetryConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = AC518DFD201BB55A00EBC820 /* MGLTelemetryConfig.h */; };
AC518E03201BB56000EBC820 /* MGLTelemetryConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = AC518DFE201BB55A00EBC820 /* MGLTelemetryConfig.m */; };
AC518E04201BB56100EBC820 /* MGLTelemetryConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = AC518DFE201BB55A00EBC820 /* MGLTelemetryConfig.m */; };
CA0B3C022329DE9A00E4B493 /* MGLTestAssertionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = CAAA65D82321BBA900F08A39 /* MGLTestAssertionHandler.m */; };
CA0C27922076C804001CE5B7 /* MGLShapeSourceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0C27912076C804001CE5B7 /* MGLShapeSourceTests.m */; };
CA0C27942076CA19001CE5B7 /* MGLMapViewIntegrationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0C27932076CA19001CE5B7 /* MGLMapViewIntegrationTest.m */; };
CA0FAA05237B3BB700C9F3C9 /* Mapbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA8847D21CBAF91600AB86E3 /* Mapbox.framework */; };
CA0FAA06237B3BB700C9F3C9 /* MapboxMobileEvents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA96299B23731199004F1330 /* MapboxMobileEvents.framework */; };
CA0FAA07237B3BC600C9F3C9 /* Mapbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA8847D21CBAF91600AB86E3 /* Mapbox.framework */; };
CA0FAA08237B3BC600C9F3C9 /* MapboxMobileEvents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA96299B23731199004F1330 /* MapboxMobileEvents.framework */; };
CA0FAA09237B3BEA00C9F3C9 /* Mapbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA8847D21CBAF91600AB86E3 /* Mapbox.framework */; };
CA17464E23D8A93C008B7A43 /* MGLNetworkConfigurationIntegrationTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = CA17464D23D8A93C008B7A43 /* MGLNetworkConfigurationIntegrationTests.mm */; };
CA1B4A512099FB2200EDD491 /* MGLMapSnapshotterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CA1B4A502099FB2200EDD491 /* MGLMapSnapshotterTest.m */; };
CA488BAB23FCE6B900AEE226 /* MapboxMobileEvents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA96299B23731199004F1330 /* MapboxMobileEvents.framework */; };
CA488BAC23FCE6B900AEE226 /* MapboxMobileEvents.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CA96299B23731199004F1330 /* MapboxMobileEvents.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
CA4C54FE2324948100A81659 /* MGLSourceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA4C54FD2324948100A81659 /* MGLSourceTests.swift */; };
CA4EB8C720863487006AB465 /* MGLStyleLayerIntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA4EB8C620863487006AB465 /* MGLStyleLayerIntegrationTests.m */; };
CA4F3BDE230F74C3008BAFEA /* MGLMapViewPendingBlockTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA4F3BDD230F74C3008BAFEA /* MGLMapViewPendingBlockTests.m */; };
@@ -415,11 +391,9 @@
CA8FBC0921A47BB100D1203C /* MGLRendererConfigurationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8FBC0821A47BB100D1203C /* MGLRendererConfigurationTests.m */; };
CA94E5FB237D21030037AEA0 /* Mapbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA8847D21CBAF91600AB86E3 /* Mapbox.framework */; };
CA94E5FC237D21030037AEA0 /* Mapbox.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DA8847D21CBAF91600AB86E3 /* Mapbox.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
CA94E601237EF4110037AEA0 /* MapboxMobileEvents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA96299B23731199004F1330 /* MapboxMobileEvents.framework */; };
CAA69DA5206DCD0E007279CD /* Mapbox.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DA4A26961CB6E795000B7809 /* Mapbox.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
CAAA65D92321BBA900F08A39 /* MGLTestAssertionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = CAAA65D82321BBA900F08A39 /* MGLTestAssertionHandler.m */; };
CAB369E5237471D600592F74 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F7839A3235E11FC00D4D606 /* libz.tbd */; };
CAB36C3B2374D11600592F74 /* libMapboxMobileEvents.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CAB36C3A2374D11600592F74 /* libMapboxMobileEvents.a */; };
CABC52C22368CB5100B7E543 /* sideload_sat.db in Resources */ = {isa = PBXBuildFile; fileRef = 1F7839A5235E137000D4D606 /* sideload_sat.db */; };
CAD9D0AA22A86D6F001B25EE /* MGLResourceTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = CAD9D0A922A86D6F001B25EE /* MGLResourceTests.mm */; };
CAE7AD5520F46EF5003B6782 /* MGLMapSnapshotterSwiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAE7AD5420F46EF5003B6782 /* MGLMapSnapshotterSwiftTests.swift */; };
@@ -431,7 +405,6 @@
DA00FC8F1D5EEB0D009AABC8 /* MGLAttributionInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = DA00FC8C1D5EEB0D009AABC8 /* MGLAttributionInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA00FC901D5EEB0D009AABC8 /* MGLAttributionInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA00FC8D1D5EEB0D009AABC8 /* MGLAttributionInfo.mm */; };
DA00FC911D5EEB0D009AABC8 /* MGLAttributionInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA00FC8D1D5EEB0D009AABC8 /* MGLAttributionInfo.mm */; };
DA0BDD1E2407C07F00DAA576 /* MapboxMobileEvents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA96299B23731199004F1330 /* MapboxMobileEvents.framework */; };
DA0BDD1F2407C09C00DAA576 /* libmbgl-vendor-icu.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 358B3DBA2359EA0F007BEB26 /* libmbgl-vendor-icu.a */; };
DA0BDD202407C12600DAA576 /* libmbgl-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F78399D235AA1E600D4D606 /* libmbgl-core.a */; };
DA0BDD212407C13000DAA576 /* libmbgl-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F78399D235AA1E600D4D606 /* libmbgl-core.a */; };
@@ -504,7 +477,6 @@
DA72620E1DEEE3480043BB89 /* MGLOpenGLStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA72620A1DEEE3480043BB89 /* MGLOpenGLStyleLayer.mm */; };
DA737EE11D056A4E005BDA16 /* MGLMapViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = DA737EE01D056A4E005BDA16 /* MGLMapViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA737EE21D056A4E005BDA16 /* MGLMapViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = DA737EE01D056A4E005BDA16 /* MGLMapViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA74F0BD2436AFE600E2E089 /* MapboxMobileEvents.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CA96299B23731199004F1330 /* MapboxMobileEvents.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DA821D061CCC6D59007508D4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DA821D041CCC6D59007508D4 /* LaunchScreen.storyboard */; };
DA821D071CCC6D59007508D4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DA821D051CCC6D59007508D4 /* Main.storyboard */; };
DA8847EF1CBAFA5100AB86E3 /* MGLAccountManager.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8847DF1CBAFA5100AB86E3 /* MGLAccountManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -737,7 +709,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
DA74F0BD2436AFE600E2E089 /* MapboxMobileEvents.framework in Embed Frameworks */,
CA94E5FC237D21030037AEA0 /* Mapbox.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
@@ -749,7 +720,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
CA488BAC23FCE6B900AEE226 /* MapboxMobileEvents.framework in Embed Frameworks */,
CAA69DA5206DCD0E007279CD /* Mapbox.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
@@ -821,16 +791,13 @@
1F7454A61ED08AB400021D39 /* MGLLightTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLLightTest.mm; path = ../../darwin/test/MGLLightTest.mm; sourceTree = "<group>"; };
1F78399D235AA1E600D4D606 /* libmbgl-core.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libmbgl-core.a"; sourceTree = BUILT_PRODUCTS_DIR; };
1F7839A3235E11FC00D4D606 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/libz.tbd; sourceTree = DEVELOPER_DIR; };
1F7839A5235E137000D4D606 /* sideload_sat.db */ = {isa = PBXFileReference; lastKnownFileType = file; name = sideload_sat.db; path = "../../../../test/fixtures/offline_database/sideload_sat.db"; sourceTree = "<group>"; };
1F7839A5235E137000D4D606 /* sideload_sat.db */ = {isa = PBXFileReference; lastKnownFileType = file; name = sideload_sat.db; path = ../../../../test/fixtures/offline_database/sideload_sat.db; sourceTree = "<group>"; };
1F8E8A80233A9FD9009B51ED /* MGLMapViewGestureRecognizerTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLMapViewGestureRecognizerTests.mm; sourceTree = "<group>"; };
1F95931C1E6DE2E900D5B294 /* MGLNSDateAdditionsTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLNSDateAdditionsTests.mm; path = ../../darwin/test/MGLNSDateAdditionsTests.mm; sourceTree = "<group>"; };
1FC4817B2098CBC0000D09B4 /* NSPredicate+MGLPrivateAdditions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSPredicate+MGLPrivateAdditions.h"; sourceTree = "<group>"; };
1FCAE2A020B872A400C577DD /* MGLLocationManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLLocationManager.h; sourceTree = "<group>"; };
1FCAE2A120B872A400C577DD /* MGLLocationManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGLLocationManager.m; sourceTree = "<group>"; };
1FCAE2A620B88B3800C577DD /* MGLLocationManager_Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLLocationManager_Private.h; sourceTree = "<group>"; };
1FCCEC32222605C400302E3B /* MGLSDKMetricsManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLSDKMetricsManager.h; sourceTree = "<group>"; };
1FCCEC33222605C400302E3B /* MGLSDKMetricsManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGLSDKMetricsManager.m; sourceTree = "<group>"; };
1FCCEC38222607A500302E3B /* MGLSDKMetricsManager_Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLSDKMetricsManager_Private.h; sourceTree = "<group>"; };
1FDB00C721F8F14E00D21389 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = "<group>"; };
1FDB00C821F8F14F00D21389 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Foundation.strings; sourceTree = "<group>"; };
1FDB00C921F8F15000D21389 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = cs; path = cs.lproj/Foundation.stringsdict; sourceTree = "<group>"; };
@@ -987,8 +954,6 @@
96036A00200565C700510F3D /* NSOrthography+MGLAdditions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSOrthography+MGLAdditions.m"; sourceTree = "<group>"; };
96036A0520059BBA00510F3D /* MGLNSOrthographyAdditionsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGLNSOrthographyAdditionsTests.m; sourceTree = "<group>"; };
960D0C351ECF5AAF008E151F /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
9620BB361E69FE1700705A1D /* MGLSDKUpdateChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLSDKUpdateChecker.h; sourceTree = "<group>"; };
9620BB371E69FE1700705A1D /* MGLSDKUpdateChecker.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = MGLSDKUpdateChecker.mm; sourceTree = "<group>"; };
96381C0122C6F3950053497D /* MGLMapViewPitchTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLMapViewPitchTests.m; sourceTree = "<group>"; };
9641771E22D546DA00332422 /* MGLCompassButton_Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLCompassButton_Private.h; sourceTree = "<group>"; };
9654C1251FFC1AB900DB6A19 /* MGLPolyline_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLPolyline_Private.h; sourceTree = "<group>"; };
@@ -1007,7 +972,6 @@
966FCF511F3C321000F2B6DE /* MGLUserLocationHeadingArrowLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLUserLocationHeadingArrowLayer.m; sourceTree = "<group>"; };
967C8649210A9D3C004DF794 /* UIDevice+MGLAdditions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIDevice+MGLAdditions.h"; sourceTree = "<group>"; };
967C864A210A9D3C004DF794 /* UIDevice+MGLAdditions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIDevice+MGLAdditions.m"; sourceTree = "<group>"; };
9680273E22653B84006BA4A1 /* MBXSKUToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MBXSKUToken.h; path = "../vendor/mapbox-accounts-ios/MBXSKUToken.h"; sourceTree = "<group>"; };
9680274122653C3E006BA4A1 /* libmbxaccounts.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmbxaccounts.a; path = "vendor/mapbox-accounts-ios/libmbxaccounts.a"; sourceTree = SOURCE_ROOT; };
9686D1BC22D9357700194EA0 /* MGLMapViewZoomTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLMapViewZoomTests.mm; sourceTree = "<group>"; };
968F36B41E4D0FC6003A5522 /* ja */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = "<group>"; };
@@ -1026,8 +990,6 @@
96ED34DD22374C0900E9FCA9 /* MGLMapViewDirectionTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLMapViewDirectionTests.mm; sourceTree = "<group>"; };
96F017292118FBAE00892778 /* MGLMapView_Experimental.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLMapView_Experimental.h; sourceTree = "<group>"; };
96F3F73B1F5711F1003E2D2C /* MGLUserLocationHeadingIndicator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLUserLocationHeadingIndicator.h; sourceTree = "<group>"; };
9C6E282922A980E50056B7BE /* MGLMapboxEvents.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MGLMapboxEvents.h; path = src/MGLMapboxEvents.h; sourceTree = SOURCE_ROOT; };
9C6E282A22A980E50056B7BE /* MGLMapboxEvents.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MGLMapboxEvents.m; path = src/MGLMapboxEvents.m; sourceTree = SOURCE_ROOT; };
9C6E284822A984120056B7BE /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = ../../Makefile; sourceTree = "<group>"; };
9C6E285A22A9849E0056B7BE /* install-packaging-dependencies.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "install-packaging-dependencies.sh"; sourceTree = "<group>"; };
9C6E285B22A9849E0056B7BE /* ios-code-coverage.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "ios-code-coverage.sh"; sourceTree = "<group>"; };
@@ -1044,8 +1006,6 @@
A4DE3DC823038A07005B3473 /* MGLMockGestureRecognizers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLMockGestureRecognizers.m; sourceTree = "<group>"; };
A4DE3DCA23038A7F005B3473 /* MGLMockGestureRecognizers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLMockGestureRecognizers.h; sourceTree = "<group>"; };
A4F3FB1C2254865900A30170 /* missing_icon.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = missing_icon.json; sourceTree = "<group>"; };
AC518DFD201BB55A00EBC820 /* MGLTelemetryConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLTelemetryConfig.h; sourceTree = "<group>"; };
AC518DFE201BB55A00EBC820 /* MGLTelemetryConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGLTelemetryConfig.m; sourceTree = "<group>"; };
CA0C27912076C804001CE5B7 /* MGLShapeSourceTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGLShapeSourceTests.m; sourceTree = "<group>"; };
CA0C27932076CA19001CE5B7 /* MGLMapViewIntegrationTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGLMapViewIntegrationTest.m; sourceTree = "<group>"; wrapsLines = 0; };
CA0C27952076CA50001CE5B7 /* MGLMapViewIntegrationTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLMapViewIntegrationTest.h; sourceTree = "<group>"; };
@@ -1065,10 +1025,8 @@
CA86FF0D22D8D5A0009EB14A /* MGLNetworkConfigurationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGLNetworkConfigurationTests.m; sourceTree = "<group>"; };
CA88DC2F21C85D900059ED5A /* MGLStyleURLIntegrationTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGLStyleURLIntegrationTest.m; sourceTree = "<group>"; };
CA8FBC0821A47BB100D1203C /* MGLRendererConfigurationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MGLRendererConfigurationTests.m; path = ../../darwin/test/MGLRendererConfigurationTests.m; sourceTree = "<group>"; };
CA96299B23731199004F1330 /* MapboxMobileEvents.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MapboxMobileEvents.framework; sourceTree = BUILT_PRODUCTS_DIR; };
CAAA65D72321BBA900F08A39 /* MGLTestAssertionHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MGLTestAssertionHandler.h; path = ../../darwin/test/MGLTestAssertionHandler.h; sourceTree = "<group>"; };
CAAA65D82321BBA900F08A39 /* MGLTestAssertionHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MGLTestAssertionHandler.m; path = ../../darwin/test/MGLTestAssertionHandler.m; sourceTree = "<group>"; };
CAB36C3A2374D11600592F74 /* libMapboxMobileEvents.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libMapboxMobileEvents.a; sourceTree = BUILT_PRODUCTS_DIR; };
CAD9D0A922A86D6F001B25EE /* MGLResourceTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLResourceTests.mm; path = ../../darwin/test/MGLResourceTests.mm; sourceTree = "<group>"; };
CAE5AE2B2389FBF000E4A5A1 /* ios.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ios.xcconfig; sourceTree = "<group>"; };
CAE7AD5320F46EF5003B6782 /* integration-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "integration-Bridging-Header.h"; sourceTree = "<group>"; };
@@ -1283,8 +1241,8 @@
DAC49C621CD07D74009E1AA3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
DAC832642404AF9000A61BF8 /* darwin.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = darwin.xcconfig; path = ../darwin/darwin.xcconfig; sourceTree = "<group>"; };
DAC832672404AFBB00A61BF8 /* ci.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = ci.xcconfig; path = ../darwin/ci.xcconfig; sourceTree = "<group>"; };
DAC8A47F24527EDB00C795BB /* glyphs.pbf */ = {isa = PBXFileReference; lastKnownFileType = file; name = glyphs.pbf; path = "../../../../../test/fixtures/resources/glyphs.pbf"; sourceTree = "<group>"; };
DAC8A4812452971B00C795BB /* mixed.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = mixed.json; path = "../../../../../test/fixtures/local_glyphs/mixed.json"; sourceTree = "<group>"; };
DAC8A47F24527EDB00C795BB /* glyphs.pbf */ = {isa = PBXFileReference; lastKnownFileType = file; name = glyphs.pbf; path = ../../../../../test/fixtures/resources/glyphs.pbf; sourceTree = "<group>"; };
DAC8A4812452971B00C795BB /* mixed.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = mixed.json; path = ../../../../../test/fixtures/local_glyphs/mixed.json; sourceTree = "<group>"; };
DACA86242019218500E9693A /* MGLRasterDEMSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLRasterDEMSource.h; sourceTree = "<group>"; };
DACA86252019218500E9693A /* MGLRasterDEMSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLRasterDEMSource.mm; sourceTree = "<group>"; };
DACBC60B20118ABE00C4D7E2 /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/Localizable.strings; sourceTree = "<group>"; };
@@ -1344,7 +1302,6 @@
buildActionMask = 2147483647;
files = (
CA0FAA07237B3BC600C9F3C9 /* Mapbox.framework in Frameworks */,
CA0FAA08237B3BC600C9F3C9 /* MapboxMobileEvents.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1352,7 +1309,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
CA488BAB23FCE6B900AEE226 /* MapboxMobileEvents.framework in Frameworks */,
CA0FAA09237B3BEA00C9F3C9 /* Mapbox.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -1361,7 +1317,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DA0BDD1E2407C07F00DAA576 /* MapboxMobileEvents.framework in Frameworks */,
CA94E5FB237D21030037AEA0 /* Mapbox.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -1374,7 +1329,6 @@
DA35D9D6240992760013ECB0 /* libz.tbd in Frameworks */,
DA35D9D4240992400013ECB0 /* libmbgl-vendor-csscolorparser.a in Frameworks */,
CA0FAA05237B3BB700C9F3C9 /* Mapbox.framework in Frameworks */,
CA0FAA06237B3BB700C9F3C9 /* MapboxMobileEvents.framework in Frameworks */,
1F78399E235AA1E600D4D606 /* libmbgl-core.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -1390,7 +1344,6 @@
DA35D9D1240920B60013ECB0 /* libmbgl-vendor-parsedate.a in Frameworks */,
358B3DB92359E4A0007BEB26 /* libsqlite3.tbd in Frameworks */,
96802766226556C5006BA4A1 /* libmbxaccounts.a in Frameworks */,
CA94E601237EF4110037AEA0 /* MapboxMobileEvents.framework in Frameworks */,
DA27C24E1CBB3811000B0ECD /* GLKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -1399,7 +1352,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
CAB36C3B2374D11600592F74 /* libMapboxMobileEvents.a in Frameworks */,
DA0BDD212407C13000DAA576 /* libmbgl-core.a in Frameworks */,
DA35D9CF240920AC0013ECB0 /* libmbgl-vendor-csscolorparser.a in Frameworks */,
DA0BDD1F2407C09C00DAA576 /* libmbgl-vendor-icu.a in Frameworks */,
@@ -1644,15 +1596,6 @@
name = "Test Helpers";
sourceTree = "<group>";
};
40834BA11FE05CFD00C1BD0D /* Development */ = {
isa = PBXGroup;
children = (
9620BB361E69FE1700705A1D /* MGLSDKUpdateChecker.h */,
9620BB371E69FE1700705A1D /* MGLSDKUpdateChecker.mm */,
);
name = Development;
sourceTree = "<group>";
};
409F43FB1E9E77D10048729D /* Swift Integration */ = {
isa = PBXGroup;
children = (
@@ -1690,14 +1633,6 @@
name = Fixtures;
sourceTree = "<group>";
};
9680276322655623006BA4A1 /* Accounts */ = {
isa = PBXGroup;
children = (
9680273E22653B84006BA4A1 /* MBXSKUToken.h */,
);
name = Accounts;
sourceTree = "<group>";
};
9C6E285922A9849E0056B7BE /* Scripts */ = {
isa = PBXGroup;
children = (
@@ -1835,8 +1770,6 @@
children = (
DA27C24D1CBB3811000B0ECD /* GLKit.framework */,
DA4A26961CB6E795000B7809 /* Mapbox.framework */,
CA96299B23731199004F1330 /* MapboxMobileEvents.framework */,
CAB36C3A2374D11600592F74 /* libMapboxMobileEvents.a */,
554180411D2E97DE00012372 /* OpenGLES.framework */,
1F78399D235AA1E600D4D606 /* libmbgl-core.a */,
DA35D9CC240920910013ECB0 /* libmbgl-vendor-csscolorparser.a */,
@@ -1934,11 +1867,8 @@
DA00FC8C1D5EEB0D009AABC8 /* MGLAttributionInfo.h */,
DAF0D8171DFE6B2800B28378 /* MGLAttributionInfo_Private.h */,
DA00FC8D1D5EEB0D009AABC8 /* MGLAttributionInfo.mm */,
1FCCEC32222605C400302E3B /* MGLSDKMetricsManager.h */,
1FF48585223710BE00F19727 /* MGLAttributedExpression.h */,
1FF48586223710BE00F19727 /* MGLAttributedExpression.m */,
1FCCEC38222607A500302E3B /* MGLSDKMetricsManager_Private.h */,
1FCCEC33222605C400302E3B /* MGLSDKMetricsManager.m */,
556660C91E1BF3A900E2C41B /* MGLFoundation.h */,
558DE79E1E5615E400C7916D /* MGLFoundation_Private.h */,
558DE79F1E5615E400C7916D /* MGLFoundation.mm */,
@@ -1978,7 +1908,6 @@
DAD165841CF4D06B001FF4B9 /* Annotations */,
35CE617F1D4165C2004F2359 /* Categories */,
DA8848881CBB036000AB86E3 /* SMCalloutView */,
DAD165851CF4D08B001FF4B9 /* Telemetry */,
355ADFF91E9281C300F3939D /* Views */,
CA55CD3E202C16AA00CE7095 /* MGLCameraChangeReason.h */,
DA704CC01F65A475004B3F28 /* MGLMapAccessibilityElement.h */,
@@ -2227,19 +2156,6 @@
name = Annotations;
sourceTree = "<group>";
};
DAD165851CF4D08B001FF4B9 /* Telemetry */ = {
isa = PBXGroup;
children = (
9680276322655623006BA4A1 /* Accounts */,
40834BA11FE05CFD00C1BD0D /* Development */,
AC518DFD201BB55A00EBC820 /* MGLTelemetryConfig.h */,
AC518DFE201BB55A00EBC820 /* MGLTelemetryConfig.m */,
9C6E282922A980E50056B7BE /* MGLMapboxEvents.h */,
9C6E282A22A980E50056B7BE /* MGLMapboxEvents.m */,
);
name = Telemetry;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
@@ -2282,7 +2198,6 @@
3510FFF01D6D9D8C00F413B2 /* NSExpression+MGLAdditions.h in Headers */,
74CB5EBF219B280400102936 /* MGLHeatmapStyleLayer_Private.h in Headers */,
1FC4817D2098CBC0000D09B4 /* NSPredicate+MGLPrivateAdditions.h in Headers */,
1FCCEC3A222607A500302E3B /* MGLSDKMetricsManager_Private.h in Headers */,
1F2B94C0221636D900210640 /* MGLNetworkConfiguration_Private.h in Headers */,
353AFA141D65AB17005A69F4 /* NSDate+MGLAdditions.h in Headers */,
DA8848531CBAFB9800AB86E3 /* MGLCompactCalloutView.h in Headers */,
@@ -2321,7 +2236,6 @@
DD0902AB1DB192A800C5BDCE /* MGLNetworkConfiguration.h in Headers */,
35D3A1E61E9BE7EB002B38EE /* MGLScaleBar.h in Headers */,
0778DD431F67556700A73B34 /* MGLComputedShapeSource.h in Headers */,
1FCCEC34222605C400302E3B /* MGLSDKMetricsManager.h in Headers */,
1F6A82A221360F9D00BA5B41 /* MGLLoggingConfiguration.h in Headers */,
DA8848311CBAFA6200AB86E3 /* NSString+MGLAdditions.h in Headers */,
967C864B210A9D3C004DF794 /* UIDevice+MGLAdditions.h in Headers */,
@@ -2345,7 +2259,6 @@
DA88483D1CBAFB8500AB86E3 /* MGLMapView+IBAdditions.h in Headers */,
DA17BE301CC4BAC300402C41 /* MGLMapView_Private.h in Headers */,
DAD165781CF4CDFF001FF4B9 /* MGLShapeCollection.h in Headers */,
9C6E282D22A9815D0056B7BE /* MGLMapboxEvents.h in Headers */,
DAED38631D62D0FC00D7640F /* NSURL+MGLAdditions.h in Headers */,
DA88481E1CBAFA6200AB86E3 /* MGLMultiPoint_Private.h in Headers */,
3566C7661D4A77BA008152BC /* MGLShapeSource.h in Headers */,
@@ -2355,7 +2268,6 @@
DA35A29E1CC9E94C00E826B2 /* MGLCoordinateFormatter.h in Headers */,
DAF0D8181DFE6B2800B28378 /* MGLAttributionInfo_Private.h in Headers */,
DAAF722B1DA903C700312FA4 /* MGLStyleValue.h in Headers */,
9680273F22653B84006BA4A1 /* MBXSKUToken.h in Headers */,
DA8847F71CBAFA5100AB86E3 /* MGLOverlay.h in Headers */,
DA35A2B11CCA141D00E826B2 /* MGLCompassDirectionFormatter.h in Headers */,
DA88488B1CBB037E00AB86E3 /* SMCalloutView.h in Headers */,
@@ -2376,7 +2288,6 @@
1FF48587223710BE00F19727 /* MGLAttributedExpression.h in Headers */,
DAD1656C1CF41981001FF4B9 /* MGLFeature.h in Headers */,
40EDA1C01CFE0E0200D9EA68 /* MGLAnnotationContainerView.h in Headers */,
9620BB381E69FE1700705A1D /* MGLSDKUpdateChecker.h in Headers */,
DA88484F1CBAFB9800AB86E3 /* MGLAnnotationImage_Private.h in Headers */,
1753ED421E53CE6F00A9FD90 /* MGLConversion.h in Headers */,
DA8847F21CBAFA5100AB86E3 /* MGLMapCamera.h in Headers */,
@@ -2384,7 +2295,6 @@
DA8847F51CBAFA5100AB86E3 /* MGLOfflineRegion.h in Headers */,
DA737EE11D056A4E005BDA16 /* MGLMapViewDelegate.h in Headers */,
92FC0AEC207CEE16007B6B54 /* MGLShapeOfflineRegion_Private.h in Headers */,
AC518DFF201BB55A00EBC820 /* MGLTelemetryConfig.h in Headers */,
DA88481B1CBAFA6200AB86E3 /* MGLGeometry_Private.h in Headers */,
3510FFF91D6DCC4700F413B2 /* NSCompoundPredicate+MGLAdditions.h in Headers */,
3557F7B01E1D27D300CCA5E6 /* MGLDistanceFormatter.h in Headers */,
@@ -2450,7 +2360,6 @@
DABFB86D1CBE9A0F00D62B32 /* MGLAnnotationImage.h in Headers */,
DABFB8721CBE9A0F00D62B32 /* MGLUserLocation.h in Headers */,
92FC0AED207CEE16007B6B54 /* MGLShapeOfflineRegion_Private.h in Headers */,
1FCCEC35222605C400302E3B /* MGLSDKMetricsManager.h in Headers */,
927FBD001F4DB05500F8BF1F /* MGLMapSnapshotter.h in Headers */,
3566C7721D4A9198008152BC /* MGLSource_Private.h in Headers */,
353933FF1D3FB7DD003F57D7 /* MGLSymbolStyleLayer.h in Headers */,
@@ -2462,7 +2371,6 @@
96E516E92000560B00A02306 /* MGLAnnotationImage_Private.h in Headers */,
96E516E52000560B00A02306 /* MGLOfflinePack_Private.h in Headers */,
DD9BE4F91EB263D20079A3AF /* UIViewController+MGLAdditions.h in Headers */,
9680274022653B84006BA4A1 /* MBXSKUToken.h in Headers */,
DAF2571C201901E200367EF5 /* MGLHillshadeStyleLayer.h in Headers */,
74CB5EC4219B282500102936 /* MGLCircleStyleLayer_Private.h in Headers */,
DABFB8621CBE99E500D62B32 /* MGLOfflinePack.h in Headers */,
@@ -2477,7 +2385,6 @@
DABFB86C1CBE99E500D62B32 /* MGLTypes.h in Headers */,
96E516F720005A2700A02306 /* MGLAnnotationContainerView.h in Headers */,
DABFB8691CBE99E500D62B32 /* MGLShape.h in Headers */,
9620BB391E69FE1700705A1D /* MGLSDKUpdateChecker.h in Headers */,
3510FFEB1D6D9C7A00F413B2 /* NSComparisonPredicate+MGLAdditions.h in Headers */,
35E1A4D91D74336F007AA97F /* MGLValueEvaluator.h in Headers */,
DABFB8701CBE9A0F00D62B32 /* MGLMapView+IBAdditions.h in Headers */,
@@ -2502,7 +2409,6 @@
DABFB8671CBE99E500D62B32 /* MGLPolygon.h in Headers */,
404C26E81D89C55D000AA13D /* MGLTileSource_Private.h in Headers */,
74CB5EBC219B280400102936 /* MGLFillExtrusionStyleLayer_Private.h in Headers */,
9C6E282F22A9824B0056B7BE /* MGLTelemetryConfig.h in Headers */,
1F7454931ECBB43F00021D39 /* MGLLight.h in Headers */,
DAAF722C1DA903C700312FA4 /* MGLStyleValue.h in Headers */,
DABFB8651CBE99E500D62B32 /* MGLOverlay.h in Headers */,
@@ -2510,7 +2416,6 @@
350098DD1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.h in Headers */,
74CB5EBE219B280400102936 /* MGLFillStyleLayer_Private.h in Headers */,
DABFB8681CBE99E500D62B32 /* MGLPolyline.h in Headers */,
9C6E283022A9824F0056B7BE /* MGLMapboxEvents.h in Headers */,
96E516DF200054FB00A02306 /* MGLShape_Private.h in Headers */,
DABFB86F1CBE9A0F00D62B32 /* MGLMapView.h in Headers */,
DA6408DC1DA4E7D300908C90 /* MGLVectorStyleLayer.h in Headers */,
@@ -2551,7 +2456,6 @@
353933F91D3FB79F003F57D7 /* MGLLineStyleLayer.h in Headers */,
96E516EB2000560B00A02306 /* MGLUserLocation_Private.h in Headers */,
35D13AB81D3D15E300AFB4E0 /* MGLStyleLayer.h in Headers */,
1FCCEC3B222607A500302E3B /* MGLSDKMetricsManager_Private.h in Headers */,
35136D4D1D4277FC00C20EFD /* MGLSource.h in Headers */,
DA35A2BC1CCA9A6900E826B2 /* MGLClockDirectionFormatter.h in Headers */,
96E516E82000560B00A02306 /* MGLAnnotationContainerView_Private.h in Headers */,
@@ -3084,7 +2988,6 @@
35136D391D42271A00C20EFD /* MGLBackgroundStyleLayer.mm in Sources */,
3510FFEC1D6D9C7A00F413B2 /* NSComparisonPredicate+MGLAdditions.mm in Sources */,
DAED38651D62D0FC00D7640F /* NSURL+MGLAdditions.m in Sources */,
9620BB3A1E69FE1700705A1D /* MGLSDKUpdateChecker.mm in Sources */,
354B83981D2E873E005D9406 /* MGLUserLocationAnnotationView.m in Sources */,
DA88485D1CBAFB9800AB86E3 /* MGLFaux3DUserLocationAnnotationView.m in Sources */,
DAD165701CF41981001FF4B9 /* MGLFeature.mm in Sources */,
@@ -3125,8 +3028,6 @@
DA8848211CBAFA6200AB86E3 /* MGLOfflinePack.mm in Sources */,
0778DD441F67556C00A73B34 /* MGLComputedShapeSource.mm in Sources */,
3557F7B21E1D27D300CCA5E6 /* MGLDistanceFormatter.m in Sources */,
9C6E282B22A981570056B7BE /* MGLMapboxEvents.m in Sources */,
1FCCEC36222605C400302E3B /* MGLSDKMetricsManager.m in Sources */,
96E6145B22CC169000109F14 /* MGLCompassButton.mm in Sources */,
DA8848591CBAFB9800AB86E3 /* MGLMapView.mm in Sources */,
DA8848501CBAFB9800AB86E3 /* MGLAnnotationImage.m in Sources */,
@@ -3170,7 +3071,6 @@
DA72620D1DEEE3480043BB89 /* MGLOpenGLStyleLayer.mm in Sources */,
DA88481A1CBAFA6200AB86E3 /* MGLAccountManager.m in Sources */,
3510FFFB1D6DCC4700F413B2 /* NSCompoundPredicate+MGLAdditions.mm in Sources */,
AC518E03201BB56000EBC820 /* MGLTelemetryConfig.m in Sources */,
DA8848271CBAFA6200AB86E3 /* MGLPolyline.mm in Sources */,
35CE61841D4165D9004F2359 /* UIColor+MGLAdditions.mm in Sources */,
3EA93369F61CF70AFA50465D /* MGLRendererConfiguration.m in Sources */,
@@ -3184,7 +3084,6 @@
35136D3A1D42271A00C20EFD /* MGLBackgroundStyleLayer.mm in Sources */,
3510FFED1D6D9C7A00F413B2 /* NSComparisonPredicate+MGLAdditions.mm in Sources */,
354B83991D2E873E005D9406 /* MGLUserLocationAnnotationView.m in Sources */,
9620BB3B1E69FE1700705A1D /* MGLSDKUpdateChecker.mm in Sources */,
DAA4E4221CBB730400178DFB /* MGLPointAnnotation.mm in Sources */,
DAED38661D62D0FC00D7640F /* NSURL+MGLAdditions.m in Sources */,
DAD165711CF41981001FF4B9 /* MGLFeature.mm in Sources */,
@@ -3224,8 +3123,6 @@
CF75A91622D85E860058A5C4 /* MGLLoggingConfiguration.mm in Sources */,
DAA32CC31E4C6B65006F8D24 /* MGLDistanceFormatter.m in Sources */,
DAA4E41D1CBB730400178DFB /* MGLGeometry.mm in Sources */,
1FCCEC37222605C400302E3B /* MGLSDKMetricsManager.m in Sources */,
9C6E282C22A981580056B7BE /* MGLMapboxEvents.m in Sources */,
DAA4E41F1CBB730400178DFB /* MGLMultiPoint.mm in Sources */,
96E6145C22CC169000109F14 /* MGLCompassButton.mm in Sources */,
DD0902AA1DB1929D00C5BDCE /* MGLNetworkConfiguration.m in Sources */,
@@ -3268,7 +3165,6 @@
DA72620E1DEEE3480043BB89 /* MGLOpenGLStyleLayer.mm in Sources */,
DAA4E42F1CBB730400178DFB /* MGLCompactCalloutView.m in Sources */,
3510FFFC1D6DCC4700F413B2 /* NSCompoundPredicate+MGLAdditions.mm in Sources */,
AC518E04201BB56100EBC820 /* MGLTelemetryConfig.m in Sources */,
DAA4E4271CBB730400178DFB /* MGLTilePyramidOfflineRegion.mm in Sources */,
DAA4E41C1CBB730400178DFB /* MGLAccountManager.m in Sources */,
35CE61851D4165D9004F2359 /* UIColor+MGLAdditions.mm in Sources */,

View File

@@ -4,10 +4,4 @@
<FileRef
location = "group:ios.xcodeproj">
</FileRef>
<FileRef
location = "group:vendor/mapbox-events-ios/MapboxMobileEvents.xcodeproj">
</FileRef>
<FileRef
location = "group:../../build/ios/Mapbox GL Native.xcodeproj">
</FileRef>
</Workspace>

View File

@@ -104,16 +104,11 @@ make xcframework
step "Zipping xcframeworks…"
MAPBOX_ZIP_FILE="Mapbox-${PUBLISH_VERSION}.zip"
(cd ${BINARY_DIRECTORY} && rm -f ${MAPBOX_ZIP_FILE} && zip -yr ${MAPBOX_ZIP_FILE} Mapbox.xcframework)
MAPBOX_EVENTS_ZIP_FILE="MapboxMobileEvents-${PUBLISH_VERSION}.zip"
(cd ${BINARY_DIRECTORY} && rm -f ${MAPBOX_EVENTS_ZIP_FILE} && zip -yr ${MAPBOX_EVENTS_ZIP_FILE} MapboxMobileEvents.xcframework)
if [[ ${S3_DISTRIBUTION} == true ]]; then
step "Uploading ${BINARY_DIRECTORY}/${MAPBOX_ZIP_FILE} to s3"
uploadToS3 "${BINARY_DIRECTORY}/${MAPBOX_ZIP_FILE}" false
MAPBOX_ZIP_FILE_URL=$EXT_TARGET_S3_URL
step "Uploading ${BINARY_DIRECTORY}/${MAPBOX_EVENTS_ZIP_FILE} to s3"
uploadToS3 "${BINARY_DIRECTORY}/${MAPBOX_EVENTS_ZIP_FILE}" false
MAPBOX_EVENTS_ZIP_FILE_URL=$EXT_TARGET_S3_URL
fi
step "Create GitHub release…"
@@ -132,9 +127,6 @@ github-release release \
step "Uploading ${BINARY_DIRECTORY}/${MAPBOX_ZIP_FILE} to github release [${VERSION_TAG}]"
uploadToGithub "${BINARY_DIRECTORY}/${MAPBOX_ZIP_FILE}" "${VERSION_TAG}"
MAPBOX_ZIP_FILE_URL=$EXT_TARGET_GITHUB_URL
step "Uploading ${BINARY_DIRECTORY}/${MAPBOX_EVENTS_ZIP_FILE} to github releases"
uploadToGithub "${BINARY_DIRECTORY}/${MAPBOX_EVENTS_ZIP_FILE}" "${VERSION_TAG}"
MAPBOX_EVENTS_ZIP_FILE_URL=$EXT_TARGET_GITHUB_URL
step "Creating Swift package…"
@@ -156,7 +148,6 @@ setTarget() {
}
setTarget "MAPBOX" "${BINARY_DIRECTORY}/${MAPBOX_ZIP_FILE}" "${MAPBOX_ZIP_FILE_URL}"
setTarget "MAPBOX_EVENTS" "${BINARY_DIRECTORY}/${MAPBOX_EVENTS_ZIP_FILE}" "${MAPBOX_EVENTS_ZIP_FILE_URL}"
step "Publishing Swift package…"

View File

@@ -6,10 +6,7 @@ let package = Package(
products: [
.library(
name: "Mapbox",
targets: ["Mapbox"]),
.library(
name: "MapboxMobileEvents",
targets: ["MapboxMobileEvents"])
targets: ["Mapbox"])
],
dependencies: [
],
@@ -17,10 +14,6 @@ let package = Package(
.binaryTarget(
name: "Mapbox",
url: "MAPBOX_PACKAGE_URL",
checksum: "MAPBOX_PACKAGE_CHECKSUM"),
.binaryTarget(
name: "MapboxMobileEvents",
url: "MAPBOX_EVENTS_PACKAGE_URL",
checksum: "MAPBOX_EVENTS_PACKAGE_CHECKSUM")
checksum: "MAPBOX_PACKAGE_CHECKSUM")
]
)

View File

@@ -110,10 +110,8 @@ function addFramework {
fi
}
step "Creating ${NAME} xcframework"
EVENTS_NAME=MapboxMobileEvents
INCLUDE_DEBUG_SYMBOLS=false
if [[ $BUILDTYPE='RelWithDebInfo' || $BUILDTYPE='Debug' ]]; then
INCLUDE_DEBUG_SYMBOLS=true
@@ -129,15 +127,6 @@ echo "Creating ${NAME}.xcframework with args: $BUILD_ARGS"
xcodebuild -create-xcframework $BUILD_ARGS
echo "${NAME}.xcframework created"
# Mapbox mobile events
BUILD_ARGS=""
BUILD_ARGS="$BUILD_ARGS -output ${BINOUT}/${EVENTS_NAME}.xcframework"
addFramework "${BINOUT}/${NAME}-iphoneos.xcarchive" ${EVENTS_NAME} ${INCLUDE_DEBUG_SYMBOLS}
addFramework "${BINOUT}/${NAME}-iphonesimulator.xcarchive" ${EVENTS_NAME} ${INCLUDE_DEBUG_SYMBOLS}
echo "Creating ${EVENTS_NAME}.xcframework with args: $BUILD_ARGS"
xcodebuild -create-xcframework $BUILD_ARGS
echo "${EVENTS_NAME}.xcframework created"
step "Copying library resources…"
cp -pv LICENSE.md ${OUTPUT}
sed -n -e '/^## /,$p' platform/ios/CHANGELOG.md > "${OUTPUT}/CHANGELOG.md"

View File

@@ -3,10 +3,6 @@
#import "MGLStyle_Private.h"
#import "NSBundle+MGLAdditions.h"
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
#import <MapboxMobileEvents/MapboxMobileEvents.h>
#endif
std::unique_ptr<MGLMapViewImpl> MGLMapViewImpl::Create(MGLMapView* nativeView) {
return std::make_unique<MGLMapViewOpenGLImpl>(nativeView);
}
@@ -65,9 +61,7 @@ void MGLMapViewImpl::onDidFailLoadingMap(mbgl::MapLoadError mapError, const std:
NSLocalizedFailureReasonErrorKey: @(what.c_str()),
};
NSError *error = [NSError errorWithDomain:MGLErrorDomain code:code userInfo:userInfo];
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
[[MMEEventsManager sharedManager] reportError:error];
#endif
[mapView mapViewDidFailLoadingMapWithError:error];
}

View File

@@ -2,10 +2,6 @@
#import "MGLLoggingConfiguration_Private.h"
#import "MGLMapView+OpenGL.h"
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
#import <MapboxMobileEvents/MapboxMobileEvents.h>
#endif
#include <mbgl/gl/renderable_resource.hpp>
#import <GLKit/GLKit.h>
@@ -114,15 +110,6 @@ void MGLMapViewOpenGLImpl::display() {
dispatch_async(dispatch_get_main_queue(), ^{
emergencyRecreateGL();
});
#else
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSError *error = [NSError errorWithDomain:MGLErrorDomain
code:MGLErrorCodeRenderingError
userInfo:@{ NSLocalizedFailureReasonErrorKey :
@"https://github.com/mapbox/mapbox-gl-native/issues/14232" }];
[[MMEEventsManager sharedManager] reportError:error];
});
#endif
}
} else {

View File

@@ -377,7 +377,7 @@ MGL_EXPORT
/**
A view showing legally required copyright notices and telemetry settings,
A view showing legally required copyright notices,
positioned at the bottom-right of the map view.
If you choose to reimplement this view, assign the `-showAttribution:` method
@@ -391,13 +391,6 @@ MGL_EXPORT
data. If that applies to this map view, do not hide this view or remove
any notices from it.
@note You are additionally
<a href="https://www.mapbox.com/tos/#[FamaFama]">required</a>
to provide users with the option to disable anonymous usage and location
sharing (telemetry). If this view is hidden, you must implement this
setting elsewhere in your app or via `Settings.bundle`. See our
<a href="https://docs.mapbox.com/help/how-mapbox-works/attribution/#mapbox-maps-sdk-for-ios">website</a> for
implementation help.
*/
@property (nonatomic, readonly) UIButton *attributionButton;
@@ -412,7 +405,7 @@ MGL_EXPORT
@property (nonatomic, assign) CGPoint attributionButtonMargins;
/**
Show the attribution and telemetry action sheet.
Show the attribution action sheet.
This action is performed when the user taps on the attribution button provided
by default via the `attributionButton` property. If you implement a custom

View File

@@ -58,8 +58,6 @@
#import "MGLScaleBar.h"
#import "MGLStyle_Private.h"
#import "MGLStyleLayer_Private.h"
#import "MGLMapboxEvents.h"
#import "MGLSDKUpdateChecker.h"
#import "MGLCompactCalloutView.h"
#import "MGLAnnotationContainerView.h"
#import "MGLAnnotationContainerView_Private.h"
@@ -69,7 +67,6 @@
#import "MGLLoggingConfiguration_Private.h"
#import "MGLNetworkConfiguration_Private.h"
#import "MGLReachability.h"
#import <MapboxMobileEvents/MapboxMobileEvents.h>
#include <algorithm>
#include <cstdlib>
@@ -379,14 +376,6 @@ public:
return self;
}
+ (void)initialize
{
if (self == [MGLMapView class])
{
[MGLSDKUpdateChecker checkForUpdates];
}
}
+ (NSSet<NSString *> *)keyPathsForValuesAffectingStyle
{
return [NSSet setWithObject:@"styleURL"];
@@ -676,12 +665,6 @@ public:
_pendingLatitude = NAN;
_pendingLongitude = NAN;
_targetCoordinate = kCLLocationCoordinate2DInvalid;
if ([UIApplication sharedApplication].applicationState != UIApplicationStateBackground) {
[MGLMapboxEvents pushTurnstileEvent];
[MGLMapboxEvents pushEvent:MMEEventTypeMapLoad withAttributes:@{}];
}
}
- (mbgl::Size)size
@@ -1566,8 +1549,6 @@ public:
[self validateLocationServices];
[MGLMapboxEvents flush];
_displayLink.paused = YES;
[self processPendingBlocks];
@@ -1612,9 +1593,6 @@ public:
_displayLink.paused = NO;
[self validateLocationServices];
[MGLMapboxEvents pushTurnstileEvent];
[MGLMapboxEvents pushEvent:MMEEventTypeMapLoad withAttributes:@{}];
}
}
@@ -2511,14 +2489,6 @@ public:
[attributionController addAction:action];
}
NSString *telemetryTitle = NSLocalizedStringWithDefaultValue(@"TELEMETRY_NAME", nil, nil, @"Mapbox Telemetry", @"Action in attribution sheet");
UIAlertAction *telemetryAction = [UIAlertAction actionWithTitle:telemetryTitle
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * _Nonnull action) {
[self presentTelemetryAlertController];
}];
[attributionController addAction:telemetryAction];
NSString *cancelTitle = NSLocalizedStringWithDefaultValue(@"CANCEL", nil, nil, @"Cancel", @"Title of button for dismissing attribution action sheet");
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelTitle
style:UIAlertActionStyleCancel
@@ -2533,69 +2503,11 @@ public:
self.attributionController = attributionController;
}
- (void)presentTelemetryAlertController
{
NSString *title = NSLocalizedStringWithDefaultValue(@"TELEMETRY_TITLE", nil, nil, @"Make Mapbox Maps Better", @"Telemetry prompt title");
NSString *message;
NSString *participateTitle;
NSString *declineTitle;
if ([[NSUserDefaults standardUserDefaults] boolForKey:MGLMapboxMetricsEnabledKey])
{
message = NSLocalizedStringWithDefaultValue(@"TELEMETRY_ENABLED_MSG", nil, nil, @"You are helping to make OpenStreetMap and Mapbox maps better by contributing anonymous usage data.", @"Telemetry prompt message");
participateTitle = NSLocalizedStringWithDefaultValue(@"TELEMETRY_ENABLED_ON", nil, nil, @"Keep Participating", @"Telemetry prompt button");
declineTitle = NSLocalizedStringWithDefaultValue(@"TELEMETRY_ENABLED_OFF", nil, nil, @"Stop Participating", @"Telemetry prompt button");
}
else
{
message = NSLocalizedStringWithDefaultValue(@"TELEMETRY_DISABLED_MSG", nil, nil, @"You can help make OpenStreetMap and Mapbox maps better by contributing anonymous usage data.", @"Telemetry prompt message");
participateTitle = NSLocalizedStringWithDefaultValue(@"TELEMETRY_DISABLED_ON", nil, nil, @"Participate", @"Telemetry prompt button");
declineTitle = NSLocalizedStringWithDefaultValue(@"TELEMETRY_DISABLED_OFF", nil, nil, @"Don’t Participate", @"Telemetry prompt button");
}
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title
message:message
preferredStyle:UIAlertControllerStyleAlert];
NSString *moreTitle = NSLocalizedStringWithDefaultValue(@"TELEMETRY_MORE", nil, nil, @"Tell Me More", @"Telemetry prompt button");
UIAlertAction *moreAction = [UIAlertAction actionWithTitle:moreTitle
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * _Nonnull action) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://www.mapbox.com/telemetry/"]];
}];
[alertController addAction:moreAction];
UIAlertAction *declineAction = [UIAlertAction actionWithTitle:declineTitle
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * _Nonnull action) {
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:MGLMapboxMetricsEnabledKey];
}];
[alertController addAction:declineAction];
UIAlertAction *participateAction = [UIAlertAction actionWithTitle:participateTitle
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * _Nonnull action) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:MGLMapboxMetricsEnabledKey];
}];
[alertController addAction:participateAction];
UIViewController *viewController = [self.window.rootViewController mgl_topMostViewController];
[viewController presentViewController:alertController animated:YES completion:NULL];
}
#pragma mark - Properties -
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
if ([keyPath isEqualToString:@"hidden"] && object == _attributionButton)
{
NSNumber *hiddenNumber = change[NSKeyValueChangeNewKey];
BOOL attributionButtonWasHidden = [hiddenNumber boolValue];
if (attributionButtonWasHidden)
{
[MGLMapboxEvents ensureMetricsOptoutExists];
}
}
else if ([keyPath isEqualToString:@"coordinate"] && [object conformsToProtocol:@protocol(MGLAnnotation)] && ![object isKindOfClass:[MGLMultiPoint class]])
if ([keyPath isEqualToString:@"coordinate"] && [object conformsToProtocol:@protocol(MGLAnnotation)] && ![object isKindOfClass:[MGLMultiPoint class]])
{
id <MGLAnnotation> annotation = object;
MGLAnnotationTag annotationTag = (MGLAnnotationTag)(NSUInteger)context;

View File

@@ -1,21 +0,0 @@
#import <Foundation/Foundation.h>
#import <MapboxMobileEvents/MapboxMobileEvents.h>
NS_ASSUME_NONNULL_BEGIN
/// NSUserDefaults key that controls telemetry user opt-out status
FOUNDATION_EXTERN NSString * const MGLMapboxMetricsEnabledKey;
@interface MGLMapboxEvents : NSObject
+ (nullable instancetype)sharedInstance;
+ (void)setupWithAccessToken:(NSString *)accessToken;
+ (void)pushTurnstileEvent;
+ (void)pushEvent:(NSString *)event withAttributes:(MMEMapboxEventAttributes *)attributeDictionary;
+ (void)flush;
+ (void)ensureMetricsOptoutExists;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,216 +0,0 @@
@import Foundation;
#import "MGLMapboxEvents.h"
#import "MBXSKUToken.h"
#import "NSBundle+MGLAdditions.h"
#import "MGLAccountManager_Private.h"
// NSUserDefaults and Info.plist keys
NSString * const MGLMapboxMetricsEnabledKey = @"MGLMapboxMetricsEnabled";
static NSString * const MGLMapboxMetricsDebugLoggingEnabledKey = @"MGLMapboxMetricsDebugLoggingEnabled";
static NSString * const MGLMapboxMetricsEnabledSettingShownInAppKey = @"MGLMapboxMetricsEnabledSettingShownInApp";
static NSString * const MGLTelemetryAccessTokenKey = @"MGLTelemetryAccessToken";
static NSString * const MGLTelemetryBaseURLKey = @"MGLTelemetryBaseURL";
static NSString * const MGLAPIClientUserAgentBase = @"mapbox-maps-ios";
static void * MGLMapboxMetricsEnabledKeyContext = &MGLMapboxMetricsEnabledKeyContext;
static void * MGLMapboxMetricsDebugLoggingEnabledKeyContext = &MGLMapboxMetricsDebugLoggingEnabledKeyContext;
static void * MGLTelemetryAccessTokenKeyContext = &MGLTelemetryAccessTokenKeyContext;
@interface MGLMapboxEvents ()
@property (nonatomic) MMEEventsManager *eventsManager;
@property (nonatomic) NSURL *baseURL;
@property (nonatomic, copy) NSString *accessToken;
@end
// TODO: Move to private/public header
@interface MMEEventsManager (TODO)
@property (nonatomic, getter=isDebugLoggingEnabled) BOOL debugLoggingEnabled;
@end
@implementation MGLMapboxEvents
+ (void)initialize {
if (self == [MGLMapboxEvents class]) {
NSBundle *bundle = [NSBundle mainBundle];
NSNumber *accountTypeNumber = [bundle objectForInfoDictionaryKey:MGLMapboxAccountTypeKey];
[[NSUserDefaults standardUserDefaults] registerDefaults:@{MGLMapboxAccountTypeKey: accountTypeNumber ?: @0,
MGLMapboxMetricsEnabledKey: @YES,
MGLMapboxMetricsDebugLoggingEnabledKey: @NO}];
}
}
+ (nullable instancetype)sharedInstance {
static dispatch_once_t onceToken;
static MGLMapboxEvents *_sharedInstance;
dispatch_once(&onceToken, ^{
_sharedInstance = [[self alloc] init];
});
return _sharedInstance;
}
- (instancetype)init {
self = [super init];
if (self) {
_eventsManager = MMEEventsManager.sharedManager;
_eventsManager.debugLoggingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:MGLMapboxMetricsDebugLoggingEnabledKey];
BOOL collectionEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:MGLMapboxMetricsEnabledKey];
NSUserDefaults.mme_configuration.mme_isCollectionEnabled = collectionEnabled;
// It is possible for the shared instance of this class to be created because of a call to
// +[MGLAccountManager load] early on in the app lifecycle of the host application.
// If user default values for access token and base URL are available, they are stored here
// on local properties so that they can be applied later once MMEEventsManager is fully initialized
// (once -[MMEEventsManager initializeWithAccessToken:userAgentBase:hostSDKVersion:] is called.
// Normally, the telem access token and base URL are not set this way. However, overriding these values
// with user defaults can be useful for testing with an alternative (test) backend system.
if ([[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation] allKeys] containsObject:MGLTelemetryAccessTokenKey]) {
self.accessToken = [[NSUserDefaults standardUserDefaults] objectForKey:MGLTelemetryAccessTokenKey];
}
if ([[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation] allKeys] containsObject:MGLTelemetryBaseURLKey]) {
self.baseURL = [NSURL URLWithString:[[NSUserDefaults standardUserDefaults] objectForKey:MGLTelemetryBaseURLKey]];
}
// Guard against over calling pause / resume if the values this implementation actually
// cares about have not changed. We guard because the pause and resume method checks CoreLocation's
// authorization status and that can drag on the main thread if done too many times (e.g. if the host
// app heavily uses the user defaults API and this method is called very frequently)
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults addObserver:self
forKeyPath:MGLMapboxMetricsEnabledKey
options:NSKeyValueObservingOptionNew
context:MGLMapboxMetricsEnabledKeyContext];
[defaults addObserver:self
forKeyPath:MGLMapboxMetricsDebugLoggingEnabledKey
options:NSKeyValueObservingOptionNew
context:MGLMapboxMetricsDebugLoggingEnabledKeyContext];
[defaults addObserver:self
forKeyPath:MGLTelemetryAccessTokenKey
options:NSKeyValueObservingOptionNew
context:MGLTelemetryAccessTokenKeyContext];
}
return self;
}
- (void)dealloc {
@try {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults removeObserver:self forKeyPath:MGLMapboxMetricsEnabledKey];
[defaults removeObserver:self forKeyPath:MGLMapboxMetricsDebugLoggingEnabledKey];
[defaults removeObserver:self forKeyPath:MGLTelemetryAccessTokenKey];
}
@catch (NSException *exception) {
[self.eventsManager reportException:exception];
} //If the observer is removed by a superclass this may fail since we are removing it twice.
}
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context {
//KVO callback can happen on any thread. Even two threads concurrently for the same key.
if (context == MGLMapboxMetricsEnabledKeyContext) {
dispatch_async(dispatch_get_main_queue(), ^{
[self updateDisablingConfigurationValues];
});
} else if (context == MGLMapboxMetricsDebugLoggingEnabledKeyContext) {
dispatch_async(dispatch_get_main_queue(), ^{
self.eventsManager.debugLoggingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:MGLMapboxMetricsDebugLoggingEnabledKey];
});
} else if (context == MGLTelemetryAccessTokenKeyContext) {
dispatch_async(dispatch_get_main_queue(), ^{
[self updateNonDisablingConfigurationValues];
});
} else {
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
}
}
- (void)updateNonDisablingConfigurationValues {
if ([[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation] allKeys] containsObject:MGLTelemetryAccessTokenKey]) {
NSString *telemetryAccessToken = [[NSUserDefaults standardUserDefaults] objectForKey:MGLTelemetryAccessTokenKey];
NSUserDefaults.mme_configuration.mme_accessToken = telemetryAccessToken;
}
}
- (void)updateDisablingConfigurationValues {
BOOL collectionEnabled = [NSUserDefaults.standardUserDefaults boolForKey:MGLMapboxMetricsEnabledKey];
NSUserDefaults.mme_configuration.mme_isCollectionEnabled = collectionEnabled;
[self.eventsManager pauseOrResumeMetricsCollectionIfRequired];
}
+ (void)setupWithAccessToken:(NSString *)accessToken {
MGLMapboxEvents *events = [MGLMapboxEvents sharedInstance];
// From https://github.com/mapbox/mapbox-events-ios
NSString *semanticVersion = [NSBundle mgl_frameworkInfoDictionary][@"MGLSemanticVersionString"];
NSString *shortVersion = [NSBundle mgl_frameworkInfoDictionary][@"CFBundleShortVersionString"];
NSString *sdkVersion = semanticVersion ?: shortVersion;
MMEEventsManager *eventsManager = MMEEventsManager.sharedManager;
// It is possible that an alternative access token was already set on this instance when the class was loaded
// Use it if it exists
NSString *resolvedAccessToken = [MGLMapboxEvents sharedInstance].accessToken ?: accessToken;
[eventsManager initializeWithAccessToken:resolvedAccessToken
userAgentBase:MGLAPIClientUserAgentBase
hostSDKVersion:sdkVersion];
eventsManager.skuId = MBXAccountsSKUIDMapsUser;
eventsManager.debugLoggingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey :MGLMapboxMetricsDebugLoggingEnabledKey];
events.eventsManager = eventsManager;
}
+ (void)pushTurnstileEvent {
[[[self sharedInstance] eventsManager] sendTurnstileEvent];
}
+ (void)pushEvent:(NSString *)event withAttributes:(MMEMapboxEventAttributes *)attributeDictionary {
[[[self sharedInstance] eventsManager] enqueueEventWithName:event attributes:attributeDictionary];
}
+ (void)flush {
[[[self sharedInstance] eventsManager] flush];
}
+ (void)ensureMetricsOptoutExists {
NSNumber *shownInAppNumber = [[NSBundle mainBundle] objectForInfoDictionaryKey:MGLMapboxMetricsEnabledSettingShownInAppKey];
BOOL metricsEnabledSettingShownInAppFlag = [shownInAppNumber boolValue];
if (!metricsEnabledSettingShownInAppFlag &&
[[NSUserDefaults mme_configuration] integerForKey:MGLMapboxAccountTypeKey] == 0) {
// Opt-out is not configured in UI, so check for Settings.bundle
BOOL defaultEnabledValue = NO;
NSString *appSettingsBundle = [[NSBundle mainBundle] pathForResource:@"Settings" ofType:@"bundle"];
if (appSettingsBundle) {
// Dynamic Settings.bundle loading based on http://stackoverflow.com/a/510329/2094275
NSDictionary *settings = [NSDictionary dictionaryWithContentsOfFile:[appSettingsBundle stringByAppendingPathComponent:@"Root.plist"]];
NSArray *preferences = settings[@"PreferenceSpecifiers"];
for (NSDictionary *prefSpecification in preferences) {
if ([prefSpecification[@"Key"] isEqualToString:MGLMapboxMetricsEnabledKey]) {
NSNumber *defaultValue = prefSpecification[@"DefaultValue"];
defaultEnabledValue = [defaultValue boolValue];
}
}
}
if (!defaultEnabledValue) {
[NSException raise:@"Telemetry opt-out missing" format:
@"End users must be able to opt out of Mapbox Telemetry in your app, either inside Settings (via Settings.bundle) or inside this app. "
@"By default, this opt-out control is included as a menu item in the attribution action sheet. "
@"If you reimplement the opt-out control inside this app, disable this assertion by setting MGLMapboxMetricsEnabledSettingShownInApp to YES in Info.plist."
@"\n\nSee https://docs.mapbox.com/help/how-mapbox-works/attribution/#mapbox-maps-sdk-for-ios for more information."
@"\n\nAdditionally, by hiding this attribution control you agree to display the required attribution elsewhere in this app."];
}
}
}
@end

View File

@@ -1,13 +0,0 @@
#import <Foundation/Foundation.h>
#import "MGLFoundation.h"
NS_ASSUME_NONNULL_BEGIN
@interface MGLSDKUpdateChecker : NSObject
+ (void)checkForUpdates;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,37 +0,0 @@
#import "MGLSDKUpdateChecker.h"
#import "NSBundle+MGLAdditions.h"
@implementation MGLSDKUpdateChecker
+ (void)checkForUpdates {
#if TARGET_IPHONE_SIMULATOR
// Abort if running in a playground.
if ([[NSBundle mainBundle].bundleIdentifier hasPrefix:@"com.apple.dt.playground."]) {
return;
}
NSString *currentVersion = [NSBundle mgl_frameworkInfoDictionary][@"MGLSemanticVersionString"];
// Skip version check if weʼre doing gl-native development, as the framework
// version is `1` until built for packaging.
if ([currentVersion isEqualToString:@"1.0.0"]) {
return;
}
NSURL *url = [NSURL URLWithString:@"https://docs.mapbox.com/ios/maps/latest_version.txt"];
[[NSURLSession.sharedSession dataTaskWithURL:url completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error || ((NSHTTPURLResponse *)response).statusCode != 200) {
return;
}
NSString *latestVersion = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
latestVersion = [latestVersion stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
if (![currentVersion isEqualToString:latestVersion]) {
NSString *updateAvailable = [NSString stringWithFormat:NSLocalizedStringWithDefaultValue(@"SDK_UPDATE_AVAILABLE", nil, nil, @"Mapbox Maps SDK for iOS version %@ is now available:", @"Developer-only SDK update notification; {latest version, in format x.x.x}"), latestVersion];
NSLog(@"%@ https://github.com/mapbox/mapbox-gl-native-ios/releases/tag/ios-v%@", updateAvailable, latestVersion);
}
}] resume];
#endif
}
@end

View File

@@ -1,18 +0,0 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
NS_ASSUME_NONNULL_BEGIN
@interface MGLTelemetryConfig : NSObject
@property (nonatomic) CLLocationDistance MGLLocationManagerHibernationRadius;
extern NSString *const MGLMapboxMetricsProfile;
@property (class, nullable, nonatomic, readonly) MGLTelemetryConfig *sharedConfig;
- (void)configurationFromKey:(NSString *)key;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,35 +0,0 @@
#import "MGLTelemetryConfig.h"
static const CLLocationDistance MGLConfigHibernationRadiusDefault = 300.0;
static const CLLocationDistance MGLConfigHibernationRadiusWide = 600.0;
NSString *const MGLMapboxMetricsProfile = @"MGLMapboxMetricsProfile";
static NSString *const MGLConfigHibernationRadiusWideKey = @"WideGeoFence";
@implementation MGLTelemetryConfig
- (instancetype) init {
self = [super init];
if (self) {
_MGLLocationManagerHibernationRadius = MGLConfigHibernationRadiusDefault;
}
return self;
}
+ (nullable instancetype)sharedConfig {
static dispatch_once_t onceToken;
static MGLTelemetryConfig *_sharedConfig;
dispatch_once(&onceToken, ^{
_sharedConfig = [[self alloc] init];
});
return _sharedConfig;
}
- (void)configurationFromKey:(NSString *)key {
if ([key isEqualToString:MGLConfigHibernationRadiusWideKey]) {
_MGLLocationManagerHibernationRadius = MGLConfigHibernationRadiusWide;
}
}
@end

View File

@@ -74,4 +74,3 @@ FOUNDATION_EXPORT MGL_EXPORT const unsigned char MapboxVersionString[];
#import "MGLLoggingConfiguration.h"
#import "MGLNetworkConfiguration.h"
#import "MGLAttributedExpression.h"
#import "MGLSDKMetricsManager.h"

View File

@@ -1,25 +0,0 @@
#import <XCTest/XCTest.h>
#import <Mapbox/Mapbox.h>
@interface MBXAccounts: NSObject
@property (class, nonatomic, readonly) NSString *skuToken;
@end
@implementation MBXAccounts
+ (NSString *)skuToken {
return @"foo";
}
@end
@interface MGLAccountManagerTests : XCTestCase
@end
@implementation MGLAccountManagerTests
- (void)testSKU {
XCTAssertTrue([[MGLAccountManager valueForKeyPath:@"skuToken"] isEqualToString:@"foo"]);
}
@end

View File

@@ -1,36 +0,0 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef NSString *MBXAccountsSKUID NS_TYPED_ENUM;
FOUNDATION_EXTERN const MBXAccountsSKUID MBXAccountsSKUIDMapsUser;
FOUNDATION_EXTERN const MBXAccountsSKUID MBXAccountsSKUIDNavigationUser;
FOUNDATION_EXTERN const MBXAccountsSKUID MBXAccountsSKUIDNavigationSession;
@interface MBXSKUToken : NSObject
/**
Activates a specific SKU identifier.
Defaults to `MBXAccountsSKUIDMapsUser`.
See https://www.mapbox.com/pricing/ for more information
*/
+ (void)activateSKUID:(MBXAccountsSKUID)skuId;
/**
Resets the current session. Calling this method has no effect unless the type
of the SKU id is of kind session.
*/
+ (void)resetSession;
/**
Returns the current SKU token. `+[MBXSKUToken activateSKUID:]` must be called
before accessing this property unless an `MBXAccountsSKUIDMapsUser` token is preferred.
*/
@property (class, nonatomic, readonly) NSString *skuToken;
@end
NS_ASSUME_NONNULL_END

View File

@@ -68,4 +68,3 @@ FOUNDATION_EXPORT MGL_EXPORT const unsigned char MapboxVersionString[];
#import "MGLLoggingConfiguration.h"
#import "MGLNetworkConfiguration.h"
#import "MGLAttributedExpression.h"
#import "MGLSDKMetricsManager.h"