You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Xcode 15.1 Playground中SwiftData无法运行,遇LLDB符号查找错误求助

关于Xcode 15.1 Playground中SwiftData的LLDB符号查找问题

我想在Xcode 15.1的Swift Playground里测试SwiftData,但遇到了LLDB底层问题导致无法继续。

我的测试代码如下:

// Xcode 15.1 Playground, iOS idiom.

import Foundation
import SwiftData

// Trivial Model
@Model
final class OneModel {
    let name: String
    let age: Int

    init(name: String, age: Int) {
        (self.name, self.age) = (name, age)
    }
}

// In-memory store; I figure getting files involved
// is one more complication than I need.
let configuration = ModelConfiguration(isStoredInMemoryOnly: true)

// Create a container for OneModel, in-memory.
let container = ModelContainer(for: OneModel.self,
                               configurations: configuration)

运行后控制台出现大量如下错误:

Couldn't lookup symbols: self.unsafeMutableAddressor : _lldb_expr*.OneModel

我尝试过在@MainActor修饰的函数中初始化configuration和container,但问题依旧。请问是我的操作有误,还是Playground本身不支持SwiftData功能?

内容的提问来源于stack exchange,提问作者Fritz Anderson

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.04 10:09:53