Foundation Models / Playgrounds Hello World - Help!

I am using Foundation Models for the first time and no response is being provided to me.

Code

import Playgrounds
import FoundationModels

#Playground {
    let session = LanguageModelSession()
    let result = try await session.respond(to: "List all the states in the USA")
    
    print(result.content)
}

Canvas Output

What I did

  • New file
  • Code
  • Canvas refreshes but nothing happens

Am I missing a step or setup here? Please help. Something so basic is not working I do not know what to do.

Running 40GPU, 16CPU MacBook Pro.. IOS26/Xcodebeta2/Tahoe allocated 8CPU, 48GB memory in Parallels VM.

Settings for Playgrounds in Xcode


Thank you for your help in advance.

Updated Code

#Playground {
    Task {
        do {
            let session = LanguageModelSession()
            let prompt = "List all the states in the USA"
            let response = try await session.respond(to: prompt)
            print(response)
        } catch {
            print("Error: \(error)")
        }
    }
}

ERROR I GET

Error: Asset com.apple.gm.safety_deny.input.foundation_models_framework.api not found in Model Catalog

What's the proper way to get this simple prompt working?

  • What's the run destination of your playground? You can find it on the lower left corner of the playground canvas. Is it your Mac or iPhone?
  • On the run destination device, is Apple Intelligence turned on in Settings?

@Frameworks Engineer

  • Run destination is iPhone 16 Pro

I am running the latest MacOS Beta -- Version 26.0 Beta (25A5295e) I am running Xcode Version 26.0 beta 2 (17A5241o)

  • There is no option to turn on Apple Intelligence in Xcode its asking me to select a model provider... Also in MacOS Settings here is what I see

Xcode Settings


MacOS Beta -- when I Search Settings for Apple Intelligence

It only pulls up Siri

-- Possible issue with** signing**

There is a problem with the request entity

A device with number 'LONG ALPHANUMERIC STRING' already exists on this team.

Provisioning profile "iOS Team Provisioning Profile: *" doesn't include the currently selected device "MY NAME’s Virtual Machine" (identifier SAME LONG ALPHA NUMERIC STRING).

Signed in with my developer account pulls up team, but this part is failing.


MacOS 26 Beta VM I am not signed in with my Apple ID, but I am signed in within Xcode it pulls in my team id/name. Do I need to Sign in with Apple ID on VM machine for Apple Intelligence to work? I am on Parallels if that helps.

My colleague is probably swamped and so I'm chiming in to see if I can be of any help.

Based on your description, it seems that:

  • You ran your app on an iOS simulator (16 Pro), and not a physical device.
  • Your macOS 26 ran on a VM.

An iOS simulator uses the models on macOS 26, and yet, Apple Intelligence currently isn't available on macOS running on a VM, as discussed in this post. That explains why your app doesn't work.

If your macOS is well set up, you'd see "Apple Intelligence & Siri" in Settings.app, and be able to turn on Apple Intelligence from there. Your screenshot shows only the "Siri" setting, which indicates that Apple Intelligence is unavailable, and I believe that's because it runs on a VM.

To move forward, you can try to run your app on an iOS 26 device with Apple Intelligence on, or set up a macOS 26 without using a VM, with Apple Intelligence on as well.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

I need 100% assurance my main $7K Mac Pro will not be corrupted if I partition the drive to run Foundation Models OS26 beta.

Since I cannot run it in VM, does that mean I need to buy another machine to run this?

Foundation Models / Playgrounds Hello World - Help!
 
 
Q