1
![Stack Overflow](http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png)
If you're running your own "main loop" in a background thread, you're going to run into trouble. (For example, locationManager.heading.magneticHeading might not be safe to access from a background thread in the code above.) I think you'd be much better off just putting everything you've shown abo...