Coder Social home page Coder Social logo

Comments (9)

TimHoogstrate avatar TimHoogstrate commented on June 2, 2024

Dear @prasad-rawas-volofleet,

It looks like this happens when the used has denied app access. Please take a look at: (https://stackoverflow.com/questions/29350245/the-operation-couldn-t-be-completed-kclerrordomain-error-1)

Kind regards,

from flutter-geolocator.

namvt8 avatar namvt8 commented on June 2, 2024

@TimHoogstrate I still got this error in read device . When i change permission from never to while using the app.

from flutter-geolocator.

mvanbeusekom avatar mvanbeusekom commented on June 2, 2024

Hi @namvt8,

The error indicates that the location services are disabled and is not related to the permissions provided. Can you please verify this in the settings of the iOS device: Settings > Privacy > Location Services > Your App

Location services should be enabled.

from flutter-geolocator.

namvt8 avatar namvt8 commented on June 2, 2024

@mvanbeusekom

I encountered the same problem here. https://forums.developer.apple.com/forums/thread/735929

Is there any way to solve this problem?

from flutter-geolocator.

namvt8 avatar namvt8 commented on June 2, 2024

@mvanbeusekom

Please see the error below.

Screenshot 2024-03-18 at 20 13 25

from flutter-geolocator.

mvanbeusekom avatar mvanbeusekom commented on June 2, 2024

Hi @namvt8,

The screenshot only shows that the application has permission to access the device's location. However the error indicates that the "Location Services" of the device are disabled. Since these settings are device wide, the error will occur in all apps that use location services (as mentioned in the post you linked).

Can you please verify these are enabled? You can do this in iOS by going to:

"Settings" > "Privacy & Security" > "Location Services" and then make sure the switch turned on (see attached screenshot).

Image

The geolocator plugin also supports validating if the location services are enables or not, to do so simply call the Geolocator.isLocationServiceEnabled() method:

  // Test if location services are enabled.
  bool serviceEnabled = await Geolocator.isLocationServiceEnabled();
  if (!serviceEnabled) {
    // Location services are not enabled don't continue
    // accessing the position and request users of the 
    // App to enable the location services.
    return Future.error('Location services are disabled.');
  }

  // Location services are enabled, it is safe to request the location.
  ...

A more complete example can be found in the plugins README.md file.

from flutter-geolocator.

namvt8 avatar namvt8 commented on June 2, 2024

@mvanbeusekom

Thank you very much. This problem seems of Apple. I tried the native code but still get the same error.

from flutter-geolocator.

mvanbeusekom avatar mvanbeusekom commented on June 2, 2024

Did you try another iOS device?

I have several iPhones and no problems at all. It is possible that there is some hardware problem on this particular device.

I will go ahead and close this issue for now. If you have any questions feel free to leave a comment.

from flutter-geolocator.

namvt8 avatar namvt8 commented on June 2, 2024

I tried it on iPhone 7, 8, 13, 14. All are the same.

Thank you. Now, I have no questions.

from flutter-geolocator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.