When the phone is upgraded to iOS 13, you will find many strange problems, such as: the original normal project is now reporting an error, the original Wi-Fi information that can be obtained is gone, the positioning box automatically disappears and so on.
After the positioning permission pop-up box pops up without any operation, it automatically disappears, the code is as follows:
CLLocationManager *locationManagerSystem = [[CLLocationManager alloc]init];
[locationManagerSystem requestWhenInUseAuthorization];
After modification, define locationManagerSystem as a global variable
{
CLLocationManager *locationManagerSystem;
}
locationManagerSystem = [[CLLocationManager alloc]init];
[locationManagerSystem requestWhenInUseAuthorization];