rubymotion-community / BubbleWrap

Cocoa wrappers and helpers for RubyMotion (Ruby for iOS and OS X) - Making Cocoa APIs more Ruby like, one API at a time. Fork away and send your pull requests
Other
1.18k stars 208 forks source link

BW::Location.enabled? returns true when it shouldn't #379

Closed markrickert closed 10 years ago

markrickert commented 10 years ago

If location services are on but turned off for the particular app, BW::Location.enabled? still returns true.

Here's the solution: http://stackoverflow.com/questions/4700987/how-to-check-if-location-services-are-enabled-for-a-particular-app-prior-to-ios#comment21140860_4702430

Call [CLLocationManager authorizationStatus] instead of [CLLocationManager locationServicesEnabled]

Will submit a PR to address this shortly.

markrickert commented 10 years ago

FYI, looking at the comments in the source code, I get that it's intended that BW::Location.enabled returns true even if turned off for the app. My PR makes an easy interface to see if it's turned on for the app or not.