No problem - just do nothing. When the user switches away from your app (to another app, or locking the screen) your app will be suspended.
However, to make absolutely sure you don't do any location in the background, use the applicationDidEnterBackground
and applicationWillEnterForeground
notifications (or the corresponding app delegate methods) to stop and restart location updating.