Skip to content

Commit 00f750a

Browse files
committed
docs: document Apple API 2-year minimum range constraint
- Added critical limitation: age thresholds must create 2+ year ranges - Explained why 10, 13, 16 works (creates valid 2-year ranges) - Provided valid examples: 10,13,16 and 13,17,21 - Provided invalid example: 13,14,21 (1-year range rejected) - Added to both iOS Setup and API Reference sections
1 parent f6129ce commit 00f750a

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ yarn add react-native-store-age-signals-native-modules
9090
- Go to **Project Target** -> **Signing & Capabilities** -> **+ Capability** -> **Declared Age Range**.
9191
- *Note: This capability typically requires a paid Apple Developer Program membership. "Personal Team" profiles may not support it.*
9292

93+
4. **⚠️ Apple API Limitations**:
94+
- **Minimum Range Duration**: Age thresholds must create ranges of **at least 2 years**.
95+
- **Example**: Thresholds `10, 13, 16` work because they create: Under 10, 10-12 (2 yrs), 13-15 (2 yrs), 16+.
96+
- **Invalid Example**: `13, 14, 21` would fail because 13-14 is only 1 year.
97+
- Common working combinations: `10, 13, 16` or `13, 16, 18` or `13, 17, 21`.
98+
9399
### 🤖 Android Setup
94100

95101
No manual configuration required. The package automatically bundles `com.google.android.play:age-signals`.
@@ -174,7 +180,18 @@ Request iOS Age Signal.
174180
175181
| Parameter | Type | Description |
176182
|---|---|---|
177-
| `threshold[1-3]` | `number` | Age thresholds to verify (e.g. 13, 18, 21). |
183+
| `threshold[1-3]` | `number` | Age thresholds to verify. **Must create 2+ year ranges**. |
184+
185+
**⚠️ Apple API Constraint**: Thresholds must result in age ranges of at least 2 years duration.
186+
- ✅ **Valid**: `10, 13, 16` → Creates ranges: <10, 10-12, 13-15, 16+
187+
- ✅ **Valid**: `13, 17, 21` → Creates ranges: <13, 13-16, 17-20, 21+
188+
- ❌ **Invalid**: `13, 14, 21` → 13-14 is only 1 year (API will reject)
189+
190+
**Returns**: `Promise<DeclaredAgeRangeResult>`
191+
- `status`: `'sharing' | 'declined' | null`
192+
- `lowerBound`: `number | null` - Lower age of user's range
193+
- `upperBound`: `number | null` - Upper age of user's range
194+
- `parentControls`: `string | null` - Parental control status
178195
179196
## 🚨 Troubleshooting
180197

0 commit comments

Comments
 (0)