cordova-plugin-request-location-accuracy icon indicating copy to clipboard operation
cordova-plugin-request-location-accuracy copied to clipboard

Update Cordova plugin "Request location accuracy" to match current compatibility

Open SJDSNL opened this issue 5 months ago • 0 comments

I'm submitting a ... (check one with "x"):

  • [x] bug report
  • [ ] feature request
  • [ ] documentation issue

Bug report

**Current behavior: Within RequestLocationAccuracy.m

The code:

- (BOOL)isLocationServicesEnabled
{
    BOOL locationServicesEnabledInstancePropertyAvailable = [self.locationManager respondsToSelector:@selector(locationServicesEnabled)]; // iOS 3.x
    BOOL locationServicesEnabledClassPropertyAvailable = [CLLocationManager respondsToSelector:@selector(locationServicesEnabled)]; // iOS 4.x

    if (locationServicesEnabledClassPropertyAvailable) { // iOS 4.x
        return [CLLocationManager locationServicesEnabled];
    } else if (locationServicesEnabledInstancePropertyAvailable) { // iOS 2.x, iOS 3.x
        return [(id)self.locationManager locationServicesEnabled];
    } else {
        return NO;
    }
}

Gives an Xcode error 'locationServicesEnabled' is deprecated: first deprecated in iOS 4.0. (Xcode 15.2)

I created a clean Cordova project and reinstalled the plugin, to no avail.

Expected behavior: It would be great if the plugin would be updated to match iOS's current compatibility requirements.

Steps to reproduce: When opening the plugin code in Xcode, it gives the error on compiling

Environment information

  • Cordova CLI version
    • v12.0.1
  • Cordova platform version
    • ios 7.0.1
  • Plugins & versions installed in project (including this plugin)
    • cordova-plugin-geolocation 5.0.0 "Geolocation"
    • cordova-plugin-request-location-accuracy 2.3.0 "Request Location Accuracy"
    • cordova-plugin-whitelist 1.3.4 "Whitelist"
  • Dev machine OS and version, e.g.
    • OSX
      • 14.2.1

Runtime issue

  • Device details
    • iPhone 12 mini
  • OS details
    • iOS 17.2.1

iOS build issue:

  • Node JS version
    • v20.10.0
  • XCode version
    • 15.2

Feature request

Update Cordova plugin "Request location accuracy" to match current compatibility It would be great if the plugin would be updated to match iOS's current compatibility requirements.

Documentation issue

Current version causes errors on modern iOS. In my case, when using an iFrame that uses user's location.

SJDSNL avatar Jan 13 '24 21:01 SJDSNL