DeclaredAgeRange import error in Mac Catalyst app

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

  1. Added the Declared Age Range capability in Signing & Capabilities for iOS target → works fine.
  2. Tried setting Mac Catalyst Deployment Target to macOS 15.0+ and rebuilding → still failed to import.
  3. Because it didn’t help, I reverted and removed the separate macOS target setting.
  4. 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

  1. Is DeclaredAgeRange actually supported on Mac Catalyst right now?
  2. If so, are there additional setup steps (capabilities, entitlements, provisioning, etc.) specific to Catalyst?
  3. Has anyone successfully imported and used DeclaredAgeRange in a Catalyst project?

Any guidance or confirmation would be greatly appreciated.

Thanks in advance.

Answered by DTS Engineer in 860841022

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"

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"

These are the two cases I’ve tested (with screenshots attached): • First screenshot: Building for iPhone — import DeclaredAgeRange works fine. • Second screenshot: Building for Mac (Catalyst) — import DeclaredAgeRange fails with a module import error.

I’m not sure what you’re trying to convey with your latest reply. I’ve already:

  • Explained that this is a bug.
  • Recommend that you file a bug about it.
  • Suggested a workaround that will at least allow your code to build.

What else are you looking for?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks for the guidance. I added screenshots just to show the situation more clearly:

  • On iOS devices the app builds and runs fine with import DeclaredAgeRange.
  • On Mac (Catalyst) the same code fails with an import error.

I also looked into filing a Feedback report, but honestly the procedure felt quite complex, and I stopped midway. I understand that Apple wants to filter out low-quality reports, but from the perspective of a busy app developer it’s hard to dedicate that much time to reporting SDK issues. So please consider this thread as a reference.

For now, I’ll conditionally compile the feature with #if canImport(DeclaredAgeRange) and ship the app that way.

I have the same issue trying to import the DeclaredAgeRange headers into an Objective-C Project. It looks like there is no such header available in the Xcode 26.0.1

I created a Feedback with the number FB20617833

DeclaredAgeRange import error in Mac Catalyst app
 
 
Q