Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 3 tasks
SJDSNL opened this issue Jan 13, 2024 · 0 comments
Open
1 of 3 tasks

Comments

@SJDSNL
Copy link

SJDSNL commented Jan 13, 2024

I'm submitting a ... (check one with "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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant