NSLocationWhenInUseUsageDescription warning, but I have already added it

前端 未结 5 1184
孤街浪徒
孤街浪徒 2021-02-05 03:29

While I have already added:

NSLocationWhenInUseUsageDescription

I keep receiving this warning:

This app has attempte

5条回答
  •  说谎
    说谎 (楼主)
    2021-02-05 04:03

    I was requesting authorisation in

    viewDidLoad

    as follows:

    self.locationManager.requestWhenInUseAuthorization()
    

    when I removed this line the error disappeared.

提交回复
热议问题