# Guideline 5.1.1 - Privacy: Background Location Without Proper Configuration

**Guideline:** 5.1.1 · **Store:** Apple App Store · **Risk:** low · **Difficulty:** easy

Canonical URL: https://appstorereject.com/rejections/apple/5/guideline-511-privacy-background-location-without-proper-configuration

## Description

Your app declares background location capability but is missing required configuration. Apple scrutinizes background location heavily — apps must demonstrate clear user-facing value and have all required purpose strings.

## Resolution steps

1. **Verify you need background location** — Background location is only appropriate for navigation, fitness tracking, ride-sharing, or similar apps where continuous location is the core feature. If your app only needs location while in the foreground, remove `location` from `UIBackgroundModes` and use `requestWhenInUseAuthorization` only.

2. **Add all required purpose strings** — You need BOTH of these in Info.plist:
   - `NSLocationWhenInUseUsageDescription` — explain why you need location while the app is visible
   - `NSLocationAlwaysAndWhenInUseUsageDescription` — explain why you need location in the background. Be specific: "Chain tracks your ride route in the background so you can see your complete path and distance even when your phone is locked."

3. **Implement proper location authorization flow** — Request `requestWhenInUseAuthorization` first. Only escalate to `requestAlwaysAuthorization` when the user triggers a feature that needs it. Never request Always on first launch.

4. **Enable background location updates in code** — Set `locationManager.allowsBackgroundLocationUpdates = true` and `locationManager.showsBackgroundLocationIndicator = true` (shows the blue bar).

5. **Prepare your review notes** — In App Store Connect → App Review Information, explain exactly why your app needs background location. Example: "Our app tracks cycling rides. Background location is required so the route is recorded accurately when the screen is locked during a ride."

**Prevention:**
- Start with WhenInUse authorization and only add Always when the feature demands it
- Always include review notes explaining background location usage
- Test that the blue location indicator appears during background tracking

---
*Machine-readable source: https://api.appstorereject.com/api/rejections/detail?slug=guideline-511-privacy-background-location-without-proper-configuration*