Location Services not working in iOS 8

前端 未结 26 2488
滥情空心
滥情空心 2020-11-21 10:23

My app that worked fine on iOS 7 doesn\'t work with the iOS 8 SDK.

CLLocationManager doesn\'t return a location, and I don\'t see my app under

26条回答
  •  萌比男神i
    2020-11-21 10:31

    This is issue with ios 8 Add this to your code

    if (IS_OS_8_OR_LATER)
    {
        [locationmanager requestWhenInUseAuthorization];
    
        [locationmanager requestAlwaysAuthorization];
    }
    

    and to info.plist:

     NSLocationUsageDescription
     I need location
     NSLocationAlwaysUsageDescription
     I need location
     NSLocationWhenInUseUsageDescription
     I need location
    

提交回复
热议问题