Cannot enable compass

Hello, I’m having trouble getting the compass to work. I have tried the suggested steps in the scripting docs. Here is some sample javascript code I have:

Input.location.Start();
Input.compass.enabled = true;
Debug.Log("Compass enabled = " + Input.compass.enabled);
Debug.Log("Compass heading = " + Input.compass.magneticHeading);

This outputs FALSE for the first debug statement and 0 for the second.

I’m using an iPhone 5c with iOS 7.1.2 and the latest version of Unity. Can anyone help?!

I will answer my own question in case anyone else runs into the same issue…

The compass has a slight delay from when you set Input.compass.enabled = true. Trying to get the heading immediately returns 0 as the compass hasn’t “warmed up” yet. I fixed this by setting a loop which keeps testing the status after a second has passed until it is ready.