I want to check if the app is running in the background.
In:
locationManagerDidUpdateLocation { if(app is runing in background){ do this
Swift 3
let state = UIApplication.shared.applicationState if state == .background { print("App in Background") }