Unable to use FoundationModels in older app?

You’re now watching this thread. If you’ve opted in to email or web notifications, you’ll be notified when there’s activity. Click again to stop watching or visit your profile to manage watched threads and notifications.
You’ve stopped watching this thread and will no longer receive emails or web notifications when there’s activity. Click again to start watching.
Created 1w
Replies 1
Boosts 0
Views 147
Participants 2

Hi, I'm trying to add FoundationModels to an older project but always get the following error:

"Unable to resolve 'dependency' 'FoundationModels' import FoundationModels"

The error comes and goes while its compiling and then doesn't run the app.

I have my target set to 26.0 (and can't go any higher) and am using Xcode 26 (17E192).

Is anyone else having this issue?

Thanks, Dan Uff

Answered by DTS Engineer in 882309022

The error comes and goes while its compiling and then doesn't run the app.

This typically happens when the code is shared across multiple targets, and one of them has minimal deployment target lower than version 26. Also, if your project has a watchOS app, the FoundationModels framework isn't currently available in watchOS.

If that is not your case, I'll be interested in looking into your project, or the build log that contains the error.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Share this post
Copied to Clipboard
Replies  1
Boosts  0
Views  147
Participants  2
DTS Engineer OP
Apple
1w
Accepted Answer

The error comes and goes while its compiling and then doesn't run the app.

This typically happens when the code is shared across multiple targets, and one of them has minimal deployment target lower than version 26. Also, if your project has a watchOS app, the FoundationModels framework isn't currently available in watchOS.

If that is not your case, I'll be interested in looking into your project, or the build log that contains the error.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

1
Share this post
Copied to Clipboard
Unable to use FoundationModels in older app?
First post date Last post date
Q