diff options
author | Julian Rex <julian.rex@mapbox.com> | 2019-03-26 21:28:20 -0400 |
---|---|---|
committer | Julian Rex <julian.rex@mapbox.com> | 2019-03-27 09:18:46 -0400 |
commit | 8236b86685a4ebf273ec17430691ac9817f3a0b7 (patch) | |
tree | d785dccc56729a28d602cb613bd69e4388906364 | |
parent | 3a6e4dbddf0e5c292b65c0468968da9bfa755b10 (diff) | |
download | qtlocation-mapboxgl-8236b86685a4ebf273ec17430691ac9817f3a0b7.tar.gz |
[ios, macos] Tweak SDK check for earlier versions. Dohupstream/jrex/optional
-rw-r--r-- | platform/darwin/src/NSBundle+MGLAdditions.m | 4 | ||||
-rw-r--r-- | 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"; |