iBeacon Not Working in iOS 8

If you are unsuccessful in getting one of the many iBeacon examples working in iOS 8 here is why.

Apple has changed the Core Location Manager and it will fail silently now in iOS 8. Hard to believe a public API would fail silently and not notify the developer but it is true. I lost a couple of hours and gained some grey hairs trying to figure this one out.

The first thing you will need to do is add the key NSLocationAlwaysUsageDescription to your Info.plist. Make sure it is a String and give it a value. The value can be whatever you want to be displayed to inform the user when they are prompted for location permssions.

Next add the following code. You will want to add it in the same method where your init the Location Manager like I have below.

self.locationManager = [[CLLocationManager alloc] init];
self.locationManager.delegate = self;

// Check for iOS 8. If you don't have this check the app will crash with "unknown selector" in iOS 7.
if ([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)])
  [self.locationManager requestAlwaysAuthorization];

That is it. You iBeacon code should now work.


Checking out what’s new in JSF 2

Here is a great article written by Andy Schwartz that lists the new features of JSF 2. It is a few years old but he does a great job explaining the features. The other articles I looked at were either too brief or had way too much detail.

What’s New In JSF 2

How to fix a Corrupted Time Machine Backup

Recently my Time Machine backup got corrupted. I could mount the Time Machine volume but the backup would never complete. After some digging around I found a great article that explains how the fix the corrupted sparsebundle file. If you are having problems with Time Machine be sure and check it out.

How to fix a Corrupted Time Machine Backup.