Hi all,
I noticed on Friday that on the new Beta 5 using FoundationModels on a simulator LanguageModelSession.respond()
neither resolves nor throws most of the time. The SwiftUI test app below was working perfectly in Xcode 16 Beta 4 and iOS 26 Beta 4 (simulator).
import SwiftUI
import FoundationModels
struct ContentView: View {
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
}
.padding()
.onAppear {
Task {
do {
let session = LanguageModelSession()
let response = try await session.respond(to: "are cats better than dogs ???")
print(response.content)
} catch {
print("error")
}
}
}
}
}
After updating to Xcode 16 Beta 5 and iOS 26 Beta 5 (simulator), the code now often hangs.
Occasionally it will work if I toggle Apple Intelligence on and off in Settings, but it’s unreliable.