Following is an error I encounter when trying to run a foundation model function in simulator.
Error Domain=FoundationModels.LanguageModelSession.GenerationError Code=-1 "(null)" UserInfo={NSMultipleUnderlyingErrorsKey=( "Error Domain=ModelManagerServices.ModelManagerError Code=1026 "(null)" UserInfo={NSMultipleUnderlyingErrorsKey=(\n)}" )}
Its a swift playground I'm building in xcode and works fine in the preview and on a real device too but since it's my submission for the swift student challenge I need it to run on the simulator. I have updated my macOS to latest version of Tahoe(26.3) and Xcode is also on latest version. The simulator I run the playground is also on ios and iPadOS 26. I have set my region to US and have turned on Apple Intelligence on my mac too. Any suggestions on how to fix the issue?👾
Thanks for this very interesting.
I would check about the multiple returns the error is complaining about:
NSMultipleUnderlyingErrorsKey=(\n)
I have 2 recommendations, first can you read this thread:
https://developer.apple.com/forums/thread/815397?page=1#875810022
Second, I would like you to try to run this on the simulator to see if makes any difference.
On the terminal:
xcrun simctl status_bar clear
I am sure you already went through the clearing and build and restarting the simulator. Open the Console app on your Mac and filter logs for your simulator. Look for any additional error messages or warnings that might provide more context about what's going wrong and post it here. Occasionally, beta versions of macOS and iOS/iPadOS simulators may contain bugs that have been fixed in later beta releases. So please provide me all the versions you are using. As a last resort, consider reinstalling Xcode and the simulators to ensure there aren’t any corrupted files causing the issue. Otherwise we can go ahead and file a bug.
Hopefully other developers have seen this and can jump into this thread.
Albert Pascual Worldwide Developer Relations.