Search code examples
iosiphoneios8ibeacon

In iOS 8 Beacon not detecting


iBeacon suddenly stopped working in iOS8. Before it was working fine in previous iOS 8 versions. Anybody help me to come out from this problem?

What is the problem, Thanks


Solution

  • What you need to do is to add request permission for accessing location services in the code, like the following:

    if([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) {
        [self.locationManager requestAlwaysAuthorization];
    }
    

    Also, in your app info.plist(AppName-info.plist), add the key "NSLocationAlwaysUsageDescription" by clicking on the '+' sign besides "Information Property List". Select its type as 'String', and add any string value that can be displayed in the alert to access location permission. I hope this solves your issue.


    *Note: If you are building your own beacon sdk and integrating in the app, then please add key value pair in the info.plist of the app, and not that of the sdk. David Young's link also point in the right direction, but the problem was that you were adding key value pairs in the sdk's info.plist