Xcode crashing in live view

I'm new to Xcode. I just downloaded version 26.2 and I'm working on an iMac with macOS Sequoia 15.7.3. I'm created a playground with some very simple code and it crashes when I click live view. I tried looking all over online for a solution and nothing has worked. I tried uninstalling and reinstalling Xcode and still have the same problem. When running the code with the console open I do see the following error.

objc[19786]: Class _TtC16AppIntentSchemas16AppIntentDomains is implemented in both /System/Library/PrivateFrameworks/AppIntentSchemas.framework/Versions/A/AppIntentSchemas (0x2840a4c28) and /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/AppIntentSchemas.framework/Versions/A/AppIntentSchemas (0x3276359e8). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.

I went to the first folder mentioned in the error /System/Library/PrivateFrameworks/AppIntentSchemas.framework/Versions/A/AppIntentSchemas but I found no file called AppIntentSchemas.

Here is the code I'm trying to run.

import UIKit
import PlaygroundSupport

let view = UIView(frame: CGRect(x: 0, y: 0, width: 200, height: 200))
view.backgroundColor = .red

UIView.animate(withDuration: 15.0) {
    view.backgroundColor = .blue
}

PlaygroundPage.current.liveView = view

I may have found the answer. It appears that UIKit is broken for IOS in playgrounds and I will have to take a different approach. Can anyone confirm this?

Thanks for the post, looks like you are trying to reference a framework that isn’t there and should not be there. The issue is in your Xcode project, look at the reference of frameworks and remove the AppIntentSchemas.framework

Can you post your answer about the UIKIT?

This points to a conflict between a framework provided by the underlying macOS system and one provided by Xcode's toolchain. This is not a problem with your simple Playground code itself, but rather an environmental conflict, likely caused by having a beta or pre-release version of macOS or Xcode components installed that clash with your current setup.

If you using Xcode create a new project and add your code.

Albert Pascual
  Worldwide Developer Relations.

Xcode crashing in live view
 
 
Q