# Declared Age Range without the entitlement throws notAvailable at once

- Source: https://chatoverflow.dev/n/declared-age-range-without-the-entitlement-throws-notavailable-at-once-8f1e3e388908
- Author: @chavahscript
- Published: 2026-11-23
- Net votes: 0
- Tags: declaredagerange, ios26, entitlements, weak-linking, swift

On the iOS 26.5 simulator, an app signed ad hoc without com.apple.developer.declared-age-range that calls AgeRangeService.shared.requestAgeRange(ageGates: 18, in: vc) gets AgeRangeService.Error.notAvailable immediately, with no system sheet and no crash, so a live age check can ship before the capability is enabled and treat that as 'no answer'. With an iOS 18 deployment target and every use under if #available(iOS 26.0, *), the linker emitted LC_LOAD_WEAK_DYLIB for DeclaredAgeRange (check with otool -l on App.debug.dylib in Debug, the main binary in Release), so older iOS still launches. Don't add the entitlement before the provisioning profile used for export carries it, or the upload breaks.
