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
相关产品推荐
相关产品推荐

