From 19b86f750dd829a1122a1df928709c70e62cbeeb Mon Sep 17 00:00:00 2001 From: "RobLabs.com" Date: Wed, 21 Jul 2021 19:23:23 -0700 Subject: [PATCH] Fix build for Xcode 12.5 & 13-beta. See https://github.com/maplibre/maplibre-gl-native/issues/14 --- platform/ios/platform/darwin/src/MGLReachability.m | 4 ++-- platform/ios/platform/darwin/src/NSExpression+MGLAdditions.mm | 2 +- platform/ios/platform/ios/app/MBXViewController.m | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/ios/platform/darwin/src/MGLReachability.m b/platform/ios/platform/darwin/src/MGLReachability.m index 45e21165a..a3c8a57aa 100644 --- a/platform/ios/platform/darwin/src/MGLReachability.m +++ b/platform/ios/platform/darwin/src/MGLReachability.m @@ -465,8 +465,8 @@ static void TMReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkRea - (NSString *) description { - NSString *description = [NSString stringWithFormat:@"<%@: %#x (%@)>", - NSStringFromClass([self class]), (unsigned int) self, [self currentReachabilityFlags]]; + NSString *description = [NSString stringWithFormat:@"<%@: %p (%@)>", + NSStringFromClass([self class]), (void *) self, [self currentReachabilityFlags]]; return description; } diff --git a/platform/ios/platform/darwin/src/NSExpression+MGLAdditions.mm b/platform/ios/platform/darwin/src/NSExpression+MGLAdditions.mm index 85dabfa2c..6f963de4a 100644 --- a/platform/ios/platform/darwin/src/NSExpression+MGLAdditions.mm +++ b/platform/ios/platform/darwin/src/NSExpression+MGLAdditions.mm @@ -1269,7 +1269,7 @@ NSArray *MGLSubexpressionsWithJSONObjects(NSArray *objects) { } return self.arguments.mgl_jsonExpressionObject; - } else if (op == [MGLColor class] && [function isEqualToString:@"colorWithRed:green:blue:alpha:"]) { + } else if (op == (NSString *) [MGLColor class] && [function isEqualToString:@"colorWithRed:green:blue:alpha:"]) { NSArray *arguments = self.arguments.mgl_jsonExpressionObject; return [@[@"rgba"] arrayByAddingObjectsFromArray:arguments]; } else if ([function isEqualToString:@"median:"] || diff --git a/platform/ios/platform/ios/app/MBXViewController.m b/platform/ios/platform/ios/app/MBXViewController.m index 877448e06..0e264c055 100644 --- a/platform/ios/platform/ios/app/MBXViewController.m +++ b/platform/ios/platform/ios/app/MBXViewController.m @@ -137,7 +137,7 @@ CLLocationCoordinate2D coordinateCentered(CLLocationCoordinate2D origin, CLLocat return result; } -CLLocationCoordinate2D randomWorldCoordinate() { +CLLocationCoordinate2D randomWorldCoordinate(void) { static const struct { CLLocationCoordinate2D coordinate;