OneShotLocationManager icon indicating copy to clipboard operation
OneShotLocationManager copied to clipboard

Not working on NSLocationAlwaysUsageDescription of plist

Open jamesweb1 opened this issue 9 years ago • 2 comments

I simply put the following in my viewWillAppear, and it prints nothing

        manager = OneShotLocationManager()
        manager!.fetchWithCompletion {location, error in

            // fetch location or an error
            if let loc = location {
                println(location)
            } else if let err = error {
                println(err.localizedDescription)
            }
            self.manager = nil
        }

BTW, I do it in simulator and give a virtual location, anything wrong with it?

jamesweb1 avatar Jun 16 '15 06:06 jamesweb1

I found I should set NSLocationWhenInUseUsageDescription in plist. If only NSLocationAlwaysUsageDescription, it doesn't work.

jamesweb1 avatar Jun 16 '15 07:06 jamesweb1

I just created a pull request for this issue

https://github.com/icanzilb/OneShotLocationManager/pull/6

daquinons avatar Jul 15 '15 22:07 daquinons