# Check this app against App Store Review Guideline 2.5.1: Public APIs and intended use

Use only public APIs on the current OS, drop deprecated technology, and use frameworks like HealthKit for their purpose and say so in the description.

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.

## undefined link private frameworks: undefined

Usually a rejection.

**What Apple wants:** Apps may use public APIs only (Guideline 2.5.1). Apple's upload scan refuses a build whose binaries link a framework outside the public SDK (ITMS-90338: Non-public API usage), usually through an old or unofficial SDK.

**How to fix it:** Remove the private framework: update or replace the SDK that links it.

Steps:

1. Find the dependency the binary named here comes from: a framework is its own SDK; the app's own binary holds its static libraries and your code.
2. Update it to a version that uses only public APIs, or replace it. In your own code, use the public API instead.
3. Build again: the next test run or build check reads the binaries.

## The app may use private or removed Apple APIs

Usually a rejection.

**What Apple wants:** Only Apple's public, supported APIs are allowed (Guideline 2.5.1). Private API use is caught at upload or in review, and removed calls simply stop working.

**How to fix it:** Replace private or removed calls with their public, current equivalents.

Steps:

1. Find calls built from strings, made on private classes, or to deprecated methods.
2. Switch to the documented public API (for example UIApplication.open(_:options:)), or drop the feature.

## The description may not mention Apple Health or Home

Usually a rejection.

**What Apple wants:** HealthKit and HomeKit must serve the purpose they exist for, and the description should say the app uses them (Guideline 2.5.1). Reviewers reject HealthKit apps whose listing never mentions Apple Health.

**How to fix it:** Say in the description what the app reads or writes in Apple Health (or controls in Home).

Steps:

1. Add a sentence to the description saying what the app reads or writes in Apple Health (or controls in Home), and why.

## The app may not show that it uses Apple Health

Often a rejection.

**What Apple wants:** Reviewers expect HealthKit apps to make the Apple Health connection clear in the interface (Guideline 2.5.1). Health access with no visible Apple Health feature is a common rejection.

**How to fix it:** Show clearly where the app uses Apple Health, for example a "Connect Apple Health" step.

Steps:

1. Add a screen or settings row that names Apple Health and explains what the app reads or writes.
2. Ask for Health access from that screen, not at launch.

## The app may open Settings through a private URL scheme

Usually a rejection.

**What Apple wants:** 'App-Prefs:' and 'prefs:root=' are private URL schemes, and apps may only use public APIs (Guideline 2.5.1). Apple finds them in the binary and rejects the app.

**How to fix it:** Open the app's own settings page with the public settings URL.

Steps:

1. Replace App-Prefs: and prefs:root= URLs with UIApplication.openSettingsURLString (Linking.openSettings() in React Native).
2. If people need a different settings page, tell them in words where to find it.

## HealthKit or HomeKit may be used for the wrong purpose

Often a rejection.

**What Apple wants:** Apple's frameworks must be used for what they're meant for: HealthKit for health and fitness, HomeKit for home automation (Guideline 2.5.1). Reviewers reject apps that use them for something else.

**How to fix it:** Use the framework only for features it was made for, or remove it.

Steps:

1. Remove HealthKit or HomeKit access that no health or home feature needs.
2. Ask for profile details like a birth date directly instead of reading them from Health.

## The app may call Apple Health by the wrong name

Often a rejection.

**What Apple wants:** Reviewers expect apps that use HealthKit to call it Apple Health in what people see. 'Health', 'HealthKit' or Android names like Health Connect have been rejected under Guideline 2.5.1.

**How to fix it:** Call the integration 'Apple Health' everywhere people see it.

Steps:

1. Replace 'Health', 'HealthKit' and Android terms in iOS text and screenshots with 'Apple Health'.
2. Keep platform-specific wording per platform in shared code.

---

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/2-5-1
