From 425a3ade9ebbd874fc7172afdbfa91d861b49f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Tue, 20 Jun 2017 21:40:42 -0700 Subject: [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. --- platform/darwin/src/MGLLoggingConfiguration.m | 8 ++++---- platform/darwin/test/MGLAttributionInfoTests.m | 11 ++--------- platform/ios/CHANGELOG.md | 1 + platform/ios/ios.xcodeproj/project.pbxproj | 8 ++++---- platform/macos/CHANGELOG.md | 1 + platform/macos/macos.xcodeproj/project.pbxproj | 4 ++-- platform/macos/src/MGLMapView.mm | 5 ++--- 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]; -- cgit v1.2.1