ios - Can't get user location with swift using GoogleMaps -


i trying user's location using googlemaps api, reason, when run simulator, alert user location won't come , won't show current location either.

class uimapsviewcontroller: uiviewcontroller, cllocationmanagerdelegate {

@iboutlet weak var mapview: gmsmapview! let locationmanager = cllocationmanager()  override func viewdidload() {     super.viewdidload()      locationmanager.delegate = self     locationmanager.requestwheninuseauthorization()  } 

the info.plist targeted app, isn't issue. assume issue in key in info.plist file. i've tried both "nslocationwheninuseusagedescription" , "nslocationalwaysusagedescription" interestingly neither of keys come suggestions in list. there different key use now, or not issue?

thanks!

the problem you've run code , you've granted or denied authorization. once happens, you'll never see authorization alert again app. need reset simulator forgets previous answer.

as other part of question: don't see expect far user location concerned. not asking user location why app tell you? example don't see setting mylocationenabled property of google map view. , don't see asking cllocationmanager tell location. far actual location concerned, don't see why expect happen.


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -