El Howell
El Howell

Reputation: 11

Requesting user location in Swift

I am trying to get the pop up to appear for the user to allow location to be used and just cannot get it to work. I have gone into info.plist to add it to the "privacy - location always and when in use usage" and added the line '''CLLocationManager().requestWhenInUseAuthorization()''' return true" in my ViewController which as far as I can find is all I need but it doesn't give the pop up. Anyone able to help?!

Upvotes: 1

Views: 118

Answers (1)

saurabh tripathi
saurabh tripathi

Reputation: 138

in info.plist use these .It may help

Privacy - Location Always and When In Use Usage Description Privacy - Location Always Usage Description Privacy - Location When In Use Usage Description

Upvotes: 1

Related Questions