Wkwebview with location services

I was experimenting with swift and wanted to try wkwebview. Ive built the app and everything is working correctly, but the problem is that the web page loaded in my wkwebview uses google maps and requires location services, so the javascript should ask for a message saying "this app requires your information about location ". The swift wkwebview app doesn't display any message that my google maps doesn't display. If I am in the url with the safari browser it asks for a location message and also in uiwebview on ios 7 it sends this message. Does anyone else come close to this and know a solution?

+3


source to share


1 answer


In iOS 8, you need to have a key in Info.plist

, which the system can use to request location usage. In your case, you want to add a key / value pair with a key NSLocationWhenInUseUsageDescription

. The value of this pair will be shown in the first pop-up from the system, asking if your application can access location services. Then Google Maps will receive a pop-up warning.



Info.plist

+7


source







All Articles