当手机升级到iOS 13的时候,你会发现很多奇葩问题,比如:原来正常的项目现在报错了,原来可以获取到的Wi-Fi信息没有了,定位弹框自动消失等等。
定位权限弹框弹出后没有做任何操作自动消失了,代码如下:
CLLocationManager *locationManagerSystem = [[CLLocationManager alloc]init];
[locationManagerSystem requestWhenInUseAuthorization];
修改后,将locationManagerSystem定义为全局变量
{
CLLocationManager *locationManagerSystem;
}
locationManagerSystem = [[CLLocationManager alloc]init];
[locationManagerSystem requestWhenInUseAuthorization];