Hello,
I’m developing an app for both iOS and macOS using Mac Catalyst. On the iOS target, the DeclaredAgeRange framework works fine: I enabled the capability, set the entitlement, and can call the APIs successfully.
However, when I build the Mac Catalyst target, I get compile-time errors because DeclaredAgeRange cannot be imported.
Environment
- Xcode 26.0.1
- Deployment Target (iOS): 13.0
- Mac Catalyst target enabled (same bundle ID, same source code base as iOS version)
- iOS build works well with DeclaredAgeRange
What I tried
- Added the Declared Age Range capability in Signing & Capabilities for iOS target → works fine.
- Tried setting Mac Catalyst Deployment Target to macOS 15.0+ and rebuilding → still failed to import.
- Because it didn’t help, I reverted and removed the separate macOS target setting.
- On Catalyst, the module simply isn’t available (import DeclaredAgeRange fails).
From Apple’s documentation, my understanding is that DeclaredAgeRange should also be supported on Mac Catalyst (SDK 26+). But in practice I cannot import it in my Catalyst build.
Questions
- Is DeclaredAgeRange actually supported on Mac Catalyst right now?
- If so, are there additional setup steps (capabilities, entitlements, provisioning, etc.) specific to Catalyst?
- Has anyone successfully imported and used DeclaredAgeRange in a Catalyst project?
Any guidance or confirmation would be greatly appreciated.
Thanks in advance.
This is clearly a bug. We either need to fix the SDK or fix the docs. I encourage you to file a bug to that effect. Please post your bug number, just for the record.
You’ll be able to get your code building by conditionalising it like so:
#if canImport(DeclaredAgeRange)
import DeclaredAgeRange
#endif
And likewise for the places you use the API.
Still, that leaves you without this functionality )-:
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"