From 8236b86685a4ebf273ec17430691ac9817f3a0b7 Mon Sep 17 00:00:00 2001 From: Julian Rex Date: Tue, 26 Mar 2019 21:28:20 -0400 Subject: [ios, macos] Tweak SDK check for earlier versions. Doh --- platform/darwin/src/NSBundle+MGLAdditions.m | 4 ++-- platform/darwin/test/MGLAttributionInfoTests.m | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/darwin/src/NSBundle+MGLAdditions.m b/platform/darwin/src/NSBundle+MGLAdditions.m index 08b68d2f1f..da70a95373 100644 --- a/platform/darwin/src/NSBundle+MGLAdditions.m +++ b/platform/darwin/src/NSBundle+MGLAdditions.m @@ -36,8 +36,8 @@ const MGLExceptionName MGLBundleNotFoundException = @"MGLBundleNotFoundException + (nullable NSString *)mgl_applicationBundleIdentifier { NSString *bundleIdentifier = [NSBundle mainBundle].bundleIdentifier; -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_12_2) || \ - (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED < __MAC_10_14_4) +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && (__IPHONE_OS_VERSION_MAX_ALLOWED < 120200)) || \ + (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED < 101404)) // Before SDK 12.2 (bundled with Xcode 10.2): There’s no main bundle identifier when running in a unit test bundle. // 12.2 and after: the above bundle identifier is: com.apple.dt.xctest.tool if (!bundleIdentifier) { diff --git a/platform/darwin/test/MGLAttributionInfoTests.m b/platform/darwin/test/MGLAttributionInfoTests.m index 5405d05f33..b6f053a8af 100644 --- a/platform/darwin/test/MGLAttributionInfoTests.m +++ b/platform/darwin/test/MGLAttributionInfoTests.m @@ -55,9 +55,9 @@ XCTAssertEqualObjects(infos[3].URL, [NSURL URLWithString:@"https://apps.mapbox.com/feedback/"]); XCTAssertTrue(infos[3].feedbackLink); NSURL *styleURL = [MGLStyle satelliteStreetsStyleURLWithVersion:99]; - -#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_12_2) || \ - (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_14_4) + +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 120200) || \ + (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101404) NSString *bundleId = @"com.apple.dt.xctest.tool"; #else NSString *bundleId = @"com.mapbox.Mapbox"; -- cgit v1.2.1