# Check this app against App Store Review Guideline 5.1.5: Location Services

Location is used only where it serves a feature, with consent, and not to run emergency services or steer vehicles.

Go through this codebase for each problem below. For each one that applies, fix it on a new git branch with the steps for this app's stack (React Native and Expo, Swift, or Flutter). If none apply, say so and why.

## Location may be collected for nothing the person sees

Often a rejection.

**What Apple wants:** Apps should use location only when it's directly relevant to what they offer (Guideline 5.1.5). Reviewers look for the feature behind the location prompt.

**How to fix it:** Remove the location request, or use location for a visible feature.

Steps:

1. Remove location collection that only feeds analytics, ads or logs.
2. If a feature needs location, ask when that feature is used.

## 'Always' location may be requested without a background feature

Often a rejection.

**What Apple wants:** Location access should match what the features need (Guideline 5.1.5). Reviewers ask why an app needs location in the background and reject it when nothing uses it.

**How to fix it:** Ask only for 'While Using' location unless a feature really runs in the background.

Steps:

1. Request 'While Using' access instead of 'Always'.
2. Remove the Always purpose string and the location background mode if nothing needs them.

## Location may be used for emergency services or vehicle control

Often a rejection.

**What Apple wants:** Apple doesn't want location features used to run emergency services or to steer vehicles and aircraft on their own; small devices like toy drones are the exception (Guideline 5.1.5).

**How to fix it:** Remove emergency dispatch or autonomous control built on location, or limit control to small devices.

Steps:

1. Point people to their local emergency number instead of dispatching help yourself.
2. Limit any location-driven control to small devices like toy drones.

## The app may find people's location without their permission

Often a rejection.

**What Apple wants:** Apps must tell people and get their consent before collecting or using location (Guideline 5.1.5), and must respect a declined permission (Guideline 5.1.1(iv)). Working out location another way after a 'no' breaks both.

**How to fix it:** Get location only through the location permission, and accept a decline.

Steps:

1. Remove IP or Wi-Fi geolocation used to locate the person.
2. When they decline, let them type a city or address instead.

---

AppScend checks an app against every guideline at once, on the developer's Mac: `npx appscend scan --json` in the app's root folder (docs: https://appscend.ai/docs).

Source: https://appscend.ai/guidelines/5-1-5
