Change naming in some platform files (#2452)
This commit is contained in:
@@ -77,7 +77,7 @@ public:
|
||||
}
|
||||
|
||||
- (MLNLoggingBlockHandler)defaultBlockHandler {
|
||||
MLNLoggingBlockHandler mapboxHandler = ^(MLNLoggingLevel level, NSString *fileName, NSUInteger line, NSString *message) {
|
||||
MLNLoggingBlockHandler maplibreHandler = ^(MLNLoggingLevel level, NSString *fileName, NSUInteger line, NSString *message) {
|
||||
|
||||
if (@available(iOS 10.0, macOS 10.12.0, *)) {
|
||||
static dispatch_once_t once;
|
||||
@@ -94,31 +94,32 @@ public:
|
||||
#endif
|
||||
OS_LOG_TYPE_ERROR,
|
||||
OS_LOG_TYPE_FAULT };
|
||||
constexpr const char* const subsystem = "org.maplibre.Native";
|
||||
dispatch_once(&once, ^ {
|
||||
info_log = os_log_create("com.mapbox.Mapbox", "INFO");
|
||||
info_log = os_log_create(subsystem, "INFO");
|
||||
#if MLN_LOGGING_ENABLE_DEBUG
|
||||
debug_log = os_log_create("com.mapbox.Mapbox", "DEBUG");
|
||||
debug_log = os_log_create(subsystem, "DEBUG");
|
||||
#endif
|
||||
error_log = os_log_create("com.mapbox.Mapbox", "ERROR");
|
||||
fault_log = os_log_create("com.mapbox.Mapbox", "FAULT");
|
||||
error_log = os_log_create(subsystem, "ERROR");
|
||||
fault_log = os_log_create(subsystem, "FAULT");
|
||||
});
|
||||
|
||||
os_log_t mapbox_log;
|
||||
os_log_t maplibre_log;
|
||||
switch (level) {
|
||||
case MLNLoggingLevelInfo:
|
||||
case MLNLoggingLevelWarning:
|
||||
mapbox_log = info_log;
|
||||
maplibre_log = info_log;
|
||||
break;
|
||||
#if MLN_LOGGING_ENABLE_DEBUG
|
||||
case MLNLoggingLevelDebug:
|
||||
mapbox_log = debug_log;
|
||||
maplibre_log = debug_log;
|
||||
break;
|
||||
#endif
|
||||
case MLNLoggingLevelError:
|
||||
mapbox_log = error_log;
|
||||
maplibre_log = error_log;
|
||||
break;
|
||||
case MLNLoggingLevelFault:
|
||||
mapbox_log = fault_log;
|
||||
maplibre_log = fault_log;
|
||||
break;
|
||||
case MLNLoggingLevelNone:
|
||||
default:
|
||||
@@ -126,7 +127,7 @@ public:
|
||||
}
|
||||
|
||||
os_log_type_t logType = log_types[level];
|
||||
os_log_with_type(mapbox_log, logType, "%@ - %lu: %@", fileName, (unsigned long)line, message);
|
||||
os_log_with_type(maplibre_log, logType, "%@ - %lu: %@", fileName, (unsigned long)line, message);
|
||||
} else {
|
||||
NSString *category;
|
||||
switch (level) {
|
||||
@@ -154,7 +155,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
return mapboxHandler;
|
||||
return maplibreHandler;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -27,7 +27,7 @@ NSString * const kMLNDownloadPerformanceEvent = @"mobile.performance_trace";
|
||||
if (self = [super init]) {
|
||||
self.sessionConfiguration = nil;
|
||||
_events = [NSMutableDictionary dictionary];
|
||||
_eventsQueue = dispatch_queue_create("com.mapbox.network-configuration", DISPATCH_QUEUE_CONCURRENT);
|
||||
_eventsQueue = dispatch_queue_create("org.maplibre.network-configuration", DISPATCH_QUEUE_CONCURRENT);
|
||||
}
|
||||
|
||||
return self;
|
||||
|
||||
@@ -17,7 +17,7 @@ std::string getCurrentThreadName() {
|
||||
}
|
||||
|
||||
void setCurrentThreadName(const std::string& name) {
|
||||
std::string qualifiedName = "com.mapbox.mbgl." + name;
|
||||
std::string qualifiedName = "org.maplibre.mbgl." + name;
|
||||
pthread_setname_np(qualifiedName.c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
- (void)testSources {
|
||||
NSSet<MLNSource *> *initialSources = self.style.sources;
|
||||
if ([initialSources.anyObject.identifier isEqualToString:@"com.mapbox.annotations"]) {
|
||||
if ([initialSources.anyObject.identifier isEqualToString:@"org.maplibre.annotations"]) {
|
||||
XCTAssertEqual(self.style.sources.count, 1UL);
|
||||
} else {
|
||||
XCTAssertEqual(self.style.sources.count, 0UL);
|
||||
@@ -175,7 +175,7 @@
|
||||
|
||||
- (void)testLayers {
|
||||
NSArray<MLNStyleLayer *> *initialLayers = self.style.layers;
|
||||
if ([initialLayers.firstObject.identifier isEqualToString:@"com.mapbox.annotations.points"]) {
|
||||
if ([initialLayers.firstObject.identifier isEqualToString:@"org.maplibre.annotations.points"]) {
|
||||
XCTAssertEqual(self.style.layers.count, 1UL);
|
||||
} else {
|
||||
XCTAssertEqual(self.style.layers.count, 0UL);
|
||||
@@ -346,7 +346,7 @@
|
||||
|
||||
NSArray<MLNStyleLayer *> *layers = [self.style layers];
|
||||
NSUInteger startIndex = 0;
|
||||
if ([layers.firstObject.identifier isEqualToString:@"com.mapbox.annotations.points"]) {
|
||||
if ([layers.firstObject.identifier isEqualToString:@"org.maplibre.annotations.points"]) {
|
||||
startIndex++;
|
||||
}
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@ static NSString * const MLNInvisibleStyleMarkerSymbolName = @"invisible_marker";
|
||||
|
||||
/// Prefix that denotes a sprite installed by MLNMapView, to avoid collisions
|
||||
/// with style-defined sprites.
|
||||
NSString * const MLNAnnotationSpritePrefix = @"com.mapbox.sprites.";
|
||||
NSString * const MLNAnnotationSpritePrefix = @"org.maplibre.sprites.";
|
||||
|
||||
/// Slop area around the hit testing point, allowing for imprecise annotation selection.
|
||||
const CGFloat MLNAnnotationImagePaddingForHitTest = 5;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
MLNNetworkConfiguration *configuration = [[MLNNetworkConfiguration alloc] init];
|
||||
|
||||
// Concurrent
|
||||
dispatch_queue_t queue = dispatch_queue_create("com.mapbox.testAccessingEventsFromMultipleThreads", DISPATCH_QUEUE_CONCURRENT);
|
||||
dispatch_queue_t queue = dispatch_queue_create("org.maplibre.testAccessingEventsFromMultipleThreads", DISPATCH_QUEUE_CONCURRENT);
|
||||
|
||||
NSUInteger numberOfConcurrentBlocks = 20;
|
||||
|
||||
|
||||
@@ -2,55 +2,55 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>UnitTestsApp</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>com.mapbox.UnitTestsApp</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>MBGL</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>7877</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>© 2014–2020 Mapbox</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>fetch</string>
|
||||
<string>remote-notification</string>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>UnitTestsApp</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>org.maplibre.UnitTestsApp</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>MBGL</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>7877</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>© 2014–2020 Mapbox</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>fetch</string>
|
||||
<string>remote-notification</string>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
</plist>
|
||||
|
||||
Reference in New Issue
Block a user