From c7975e6a18b397df9918687ef8c8d0f76d00be76 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Mon, 20 Feb 2017 16:32:54 -0500 Subject: [ios] Clean-up conditionals for iOS <8 --- platform/default/sqlite3.cpp | 4 ++-- platform/ios/src/MGLMapView.h | 8 ++++---- platform/ios/src/MGLMapView.mm | 4 +--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/platform/default/sqlite3.cpp b/platform/default/sqlite3.cpp index 18dd75966e..498ac02b2e 100644 --- a/platform/default/sqlite3.cpp +++ b/platform/default/sqlite3.cpp @@ -224,10 +224,10 @@ template <> void Statement::bind(int offset, const char *value) { // We currently cannot use sqlite3_bind_blob64 / sqlite3_bind_text64 because they // was introduced in SQLite 3.8.7, and we need to support earlier versions: -// iOS 7.0: 3.7.13 +// iOS 8.0: 3.7.13 // iOS 8.2: 3.8.5 // According to http://stackoverflow.com/questions/14288128/what-version-of-sqlite-does-ios-provide, -// the first iOS version with 3.8.7+ was 9.0, with 3.8.10.2. +// the first iOS version with 3.8.7+ was 9.0, with 3.8.8. void Statement::bind(int offset, const char * value, std::size_t length, bool retain) { assert(impl); diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h index f1670ec49f..a46aaac463 100644 --- a/platform/ios/src/MGLMapView.h +++ b/platform/ios/src/MGLMapView.h @@ -252,10 +252,10 @@ IB_DESIGNABLE whether the user’s position is visible, use the `userLocationVisible` property. The default value of this property is `NO`. - On iOS 8 and above, your app must specify a value for - `NSLocationWhenInUseUsageDescription` or `NSLocationAlwaysUsageDescription` in - its `Info.plist` to satisfy the requirements of the underlying Core Location - framework when enabling this property. + Your app must specify a value for `NSLocationWhenInUseUsageDescription` or + `NSLocationAlwaysUsageDescription` in its `Info.plist` to satisfy the + requirements of the underlying Core Location framework when enabling this + property. */ @property (nonatomic, assign) BOOL showsUserLocation; diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 7ff327c237..bb329ccda7 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -4014,14 +4014,13 @@ public: { self.locationManager = [[CLLocationManager alloc] init]; -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 if ([CLLocationManager instancesRespondToSelector:@selector(requestWhenInUseAuthorization)] && [CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined) { BOOL hasLocationDescription = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationAlwaysUsageDescription"] || [[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationWhenInUseUsageDescription"]; if (!hasLocationDescription) { [NSException raise:@"Missing Location Services usage description" format: - @"In iOS 8 and above, this app must have a value for NSLocationAlwaysUsageDescription or NSLocationWhenInUseUsageDescription in its Info.plist."]; + @"This app must have a value for NSLocationAlwaysUsageDescription or NSLocationWhenInUseUsageDescription in its Info.plist."]; } if ([[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationAlwaysUsageDescription"]) @@ -4033,7 +4032,6 @@ public: [self.locationManager requestWhenInUseAuthorization]; } } -#endif self.locationManager.headingFilter = 5.0; self.locationManager.delegate = self; -- cgit v1.2.1