[ios] Clean-up conditionals for iOS <8
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user