summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-06-20 21:40:42 -0700
committerMinh Nguyễn <mxn@1ec5.org>2018-11-15 22:00:30 -0800
commit425a3ade9ebbd874fc7172afdbfa91d861b49f92 (patch)
treed545aafb79216b004853b75114811955493ec00e
parent8961768eb0b8580f0670ed5f977009e8461a0fac (diff)
downloadqtlocation-mapboxgl-425a3ade9ebbd874fc7172afdbfa91d861b49f92.tar.gz
[ios, macos] Harmonize bundle identifiers
For consistency with each other and with their product name and module name, the iOS and macOS map SDKs now have a bundle identifier of com.mapbox.Mapbox, whether in the form of a static or dynamic framework. The logging subsystem identifier has also been changed to match.
-rw-r--r--platform/darwin/src/MGLLoggingConfiguration.m8
-rw-r--r--platform/darwin/test/MGLAttributionInfoTests.m11
-rw-r--r--platform/ios/CHANGELOG.md1
-rw-r--r--platform/ios/ios.xcodeproj/project.pbxproj8
-rw-r--r--platform/macos/CHANGELOG.md1
-rw-r--r--platform/macos/macos.xcodeproj/project.pbxproj4
-rw-r--r--platform/macos/src/MGLMapView.mm5
7 files changed, 16 insertions, 22 deletions
diff --git a/platform/darwin/src/MGLLoggingConfiguration.m b/platform/darwin/src/MGLLoggingConfiguration.m
index fb760b7392..4dfe3f7901 100644
--- a/platform/darwin/src/MGLLoggingConfiguration.m
+++ b/platform/darwin/src/MGLLoggingConfiguration.m
@@ -57,12 +57,12 @@
OS_LOG_TYPE_ERROR,
OS_LOG_TYPE_FAULT };
dispatch_once(&once, ^ {
- info_log = os_log_create("com.mapbox.maps", "INFO");
+ info_log = os_log_create("com.mapbox.Mapbox", "INFO");
#if MGL_LOGGING_ENABLE_DEBUG
- debug_log = os_log_create("com.mapbox.maps", "DEBUG");
+ debug_log = os_log_create("com.mapbox.Mapbox", "DEBUG");
#endif
- error_log = os_log_create("com.mapbox.maps", "ERROR");
- fault_log = os_log_create("com.mapbox.maps", "FAULT");
+ error_log = os_log_create("com.mapbox.Mapbox", "ERROR");
+ fault_log = os_log_create("com.mapbox.Mapbox", "FAULT");
});
os_log_t mapbox_log;
diff --git a/platform/darwin/test/MGLAttributionInfoTests.m b/platform/darwin/test/MGLAttributionInfoTests.m
index 5961b61133..415b040516 100644
--- a/platform/darwin/test/MGLAttributionInfoTests.m
+++ b/platform/darwin/test/MGLAttributionInfoTests.m
@@ -47,17 +47,10 @@
XCTAssertEqualObjects(infos[3].URL, [NSURL URLWithString:@"https://www.mapbox.com/map-feedback/"]);
XCTAssertTrue(infos[3].feedbackLink);
NSURL *styleURL = [MGLStyle satelliteStreetsStyleURLWithVersion:99];
-#if TARGET_OS_IPHONE
XCTAssertEqualObjects([infos[3] feedbackURLAtCenterCoordinate:mapbox zoomLevel:14],
- [NSURL URLWithString:@"https://www.mapbox.com/feedback/?referrer=com.mapbox.sdk.ios#/77.63680/12.98108/14.00/0.0/0"]);
+ [NSURL URLWithString:@"https://www.mapbox.com/feedback/?referrer=com.mapbox.Mapbox#/77.63680/12.98108/14.00/0.0/0"]);
XCTAssertEqualObjects([infos[3] feedbackURLForStyleURL:styleURL atCenterCoordinate:mapbox zoomLevel:3.14159 direction:90.9 pitch:12.5],
- [NSURL URLWithString:@"https://www.mapbox.com/feedback/?referrer=com.mapbox.sdk.ios&owner=mapbox&id=satellite-streets-v99&access_token&map_sdk_version=1.0.0#/77.63680/12.98108/3.14/90.9/13"]);
-#else
- XCTAssertEqualObjects([infos[3] feedbackURLAtCenterCoordinate:mapbox zoomLevel:14],
- [NSURL URLWithString:@"https://www.mapbox.com/feedback/?referrer=com.mapbox.MapboxGL#/77.63680/12.98108/14.00/0.0/0"]);
- XCTAssertEqualObjects([infos[3] feedbackURLForStyleURL:styleURL atCenterCoordinate:mapbox zoomLevel:3.14159 direction:90.9 pitch:12.5],
- [NSURL URLWithString:@"https://www.mapbox.com/feedback/?referrer=com.mapbox.MapboxGL&owner=mapbox&id=satellite-streets-v99&access_token&map_sdk_version=1.0.0#/77.63680/12.98108/3.14/90.9/13"]);
-#endif
+ [NSURL URLWithString:@"https://www.mapbox.com/feedback/?referrer=com.mapbox.Mapbox&owner=mapbox&id=satellite-streets-v99&access_token&map_sdk_version=1.0.0#/77.63680/12.98108/3.14/90.9/13"]);
}
- (void)testStyle {
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index a27b5b9c87..72ac9bdffd 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -7,6 +7,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
* Renamed `-[MGLOfflineStorage putResourceWithUrl:data:modified:expires:etag:mustRevalidate:]` to `-[MGLOfflineStorage preloadData:forURL:modificationDate:expirationDate:eTag:mustRevalidate:]`. ([#13318](https://github.com/mapbox/mapbox-gl-native/pull/13318))
* Fixed sporadic crash when using `MGLMapSnapshotter`. ([#13300](https://github.com/mapbox/mapbox-gl-native/pull/13300))
* Added `MGLLoggingConfiguration` and `MGLLoggingBlockHandler` that handle error and fault events produced by the SDK. ([#13235](https://github.com/mapbox/mapbox-gl-native/pull/13235))
+* This SDK’s dynamic framework now has a bundle identifier of `com.mapbox.Mapbox`. ([#12857](https://github.com/mapbox/mapbox-gl-native/pull/12857))
## 4.6.0 - November 7, 2018
diff --git a/platform/ios/ios.xcodeproj/project.pbxproj b/platform/ios/ios.xcodeproj/project.pbxproj
index 78acfb46ec..dbb135f885 100644
--- a/platform/ios/ios.xcodeproj/project.pbxproj
+++ b/platform/ios/ios.xcodeproj/project.pbxproj
@@ -3750,7 +3750,7 @@
"$(mbgl_core_LINK_LIBRARIES)",
"$(mbgl_filesource_LINK_LIBRARIES)",
);
- PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.sdk.ios;
+ PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.Mapbox;
PRODUCT_NAME = Mapbox;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
@@ -3793,7 +3793,7 @@
"$(mbgl_core_LINK_LIBRARIES)",
"$(mbgl_filesource_LINK_LIBRARIES)",
);
- PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.sdk.ios;
+ PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.Mapbox;
PRODUCT_NAME = Mapbox;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
@@ -3806,7 +3806,7 @@
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = "framework/Info-static.plist";
- PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.sdk.ios;
+ PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.Mapbox;
PRODUCT_NAME = Mapbox;
SKIP_INSTALL = YES;
WRAPPER_EXTENSION = bundle;
@@ -3817,7 +3817,7 @@
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = "framework/Info-static.plist";
- PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.sdk.ios;
+ PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.Mapbox;
PRODUCT_NAME = Mapbox;
SKIP_INSTALL = YES;
WRAPPER_EXTENSION = bundle;
diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md
index b9ddc42fb8..597f97d31c 100644
--- a/platform/macos/CHANGELOG.md
+++ b/platform/macos/CHANGELOG.md
@@ -3,6 +3,7 @@
## 0.12.0 - November 8, 2018
* Renamed `-[MGLOfflineStorage putResourceWithUrl:data:modified:expires:etag:mustRevalidate:]` to `-[MGLOfflineStorage preloadData:forURL:modificationDate:expirationDate:eTag:mustRevalidate:]`. ([#13318](https://github.com/mapbox/mapbox-gl-native/pull/13318))
+* This SDK’s dynamic framework now has a bundle identifier of `com.mapbox.Mapbox`. ([#12857](https://github.com/mapbox/mapbox-gl-native/pull/12857))
## master
diff --git a/platform/macos/macos.xcodeproj/project.pbxproj b/platform/macos/macos.xcodeproj/project.pbxproj
index 4728d21bf7..bdfeb00009 100644
--- a/platform/macos/macos.xcodeproj/project.pbxproj
+++ b/platform/macos/macos.xcodeproj/project.pbxproj
@@ -2014,7 +2014,7 @@
"$(mbgl_core_LINK_LIBRARIES)",
"$(mbgl_filesource_LINK_LIBRARIES)",
);
- PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.MapboxGL;
+ PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.Mapbox;
PRODUCT_NAME = Mapbox;
SKIP_INSTALL = YES;
VERSIONING_SYSTEM = "apple-generic";
@@ -2048,7 +2048,7 @@
"$(mbgl_core_LINK_LIBRARIES)",
"$(mbgl_filesource_LINK_LIBRARIES)",
);
- PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.MapboxGL;
+ PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.Mapbox;
PRODUCT_NAME = Mapbox;
SKIP_INSTALL = YES;
STRIP_STYLE = "non-global";
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm
index 486870f51c..2f379ab406 100644
--- a/platform/macos/src/MGLMapView.mm
+++ b/platform/macos/src/MGLMapView.mm
@@ -272,14 +272,13 @@ public:
_mbglView = new MGLMapViewImpl(self);
// Delete the pre-offline ambient cache at
- // ~/Library/Caches/com.mapbox.sdk.ios/cache.db.
+ // ~/Library/Caches/com.mapbox.MapboxGL/cache.db.
NSURL *cachesDirectoryURL = [[NSFileManager defaultManager] URLForDirectory:NSCachesDirectory
inDomain:NSUserDomainMask
appropriateForURL:nil
create:NO
error:nil];
- cachesDirectoryURL = [cachesDirectoryURL URLByAppendingPathComponent:
- [NSBundle mgl_frameworkBundle].bundleIdentifier];
+ cachesDirectoryURL = [cachesDirectoryURL URLByAppendingPathComponent:@"com.mapbox.MapboxGL"];
NSURL *legacyCacheURL = [cachesDirectoryURL URLByAppendingPathComponent:@"cache.db"];
[[NSFileManager defaultManager] removeItemAtURL:legacyCacheURL error:NULL];