Xcode 15.0 Beta 5, Symbol not found: _$s9SwiftData014DefaultBackingB0C3forACyxGxm_tcfC

When running a macOS app on Xcode 15 Beta 5 (15A5209g), I get a Symbol Not Found error.

  • Problem: App will not run. Error received. Symbol Not Found: SwiftData Default Backing For AC
  • Environment: Version 15.0 beta 5 (15A5209g), macOS 14.0 Beta (23A5257q)
  • App: macOS

SwiftData Model

@Model class Audit {

init() { }

}

Error: dyld[875]: Symbol not found: _$s9SwiftData014DefaultBackingB0C3forACyxGxm_tcfC Referenced from: <75DF3350-4DD5-3AF4-80DA-B17B0EDD26C2> /Users/dking/Library/Developer/Xcode/DerivedData/{redacted}-bigzojxvffztaaaepdczriowvoie/Build/Products/Debug/{redacted}.app/Contents/MacOS/{redacted} Expected in: <CC32CD58-C2DD-3D49-B2BB-9199DDD32D12> /System/Library/Frameworks/SwiftData.framework/Versions/A/SwiftData

I personally would try cleaning the build folder and then rebuilding to see if that fixes the problem. If that does not work, could you provide more context about where the provided code is used?

Thanks for the reply, cleaning the derived data folder did not help. I'm providing the code from 2 files that you can just copy and paste to get the error. Let me know if I can provide any other info. Thanks for the help!

File 1:

@Model class Audit {

init() { }

}

@main struct MarketProbeApp: App {

let container = try! ModelContainer(for: Audit.self)

var body: some Scene {
    WindowGroup {
        ContentView()
    }
    .modelContainer(container)
}

}

File 2:

import SwiftUI import SwiftData

struct ContentView: View {

var body: some View {
    Text("Hello, World")
}

}

struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }

While on macOS beta (23A5257q) I was able to get my app to run on Xcode Version 15.0 beta (15A5160n) but I have now updated to macOS beta (23A5301h) and I get a similar error stating Symbol Not Found while on the same Xcode version (15A5160n). See here:

dyld[9265]: Symbol not found: _$s011_SwiftData_A2UI5QueryV6filter4sort11transactionACyxSayxGG10Foundation9PredicateVyxGSg_SayAI14SortDescriptorVyxGG0aC011TransactionVSgtcAGRs_rlufC Referenced from: <A2E5C6C5-391C-3BAE-9A0D-3451D8123CFC> /Users/{redacted}/Library/Developer/Xcode/DerivedData/MarketProbe-cqnacjmztpbzypbbvdreasnhtmbu/Build/Products/Debug/MarketProbe.app/Contents/MacOS/MarketProbe Expected in: <4A72DA74-BDCA-37CE-9A19-B4AD02FD483D> /System/Library/Frameworks/_SwiftData_SwiftUI.framework/Versions/A/_SwiftData_SwiftUI

Having the same issue with the exact same missing symbol for SwiftData on an app that had no changes, but started crashing on the ios was updated to 17.0 (21A5303d) and macOS to 14.0 Beta (23A5312d). Apple crashes on launch in both versions.

I have the same issue using a fresh MacOS app with sample SwiftData code.

Xcode Version 15.0 beta 6 (15A5219j)

MacOS 14.0 Beta (23A5301g)

import SwiftUI
import SwiftData

struct ContentView: View {
    @Environment(\.modelContext) private var modelContext
    @Query private var items: [Item]

    var body: some View {
        NavigationSplitView {
            List {
                ForEach(items) { item in
                    NavigationLink {
                        Text("Item at \(item.timestamp, format: Date.FormatStyle(date: .numeric, time: .standard))")
                    } label: {
                        Text(item.timestamp, format: Date.FormatStyle(date: .numeric, time: .standard))
                    }
                }
                .onDelete(perform: deleteItems)
            }
            .toolbar {
                ToolbarItem {
                    Button(action: addItem) {
                        Label("Add Item", systemImage: "plus")
                    }
                }
            }
        } detail: {
            Text("Select an item")
        }
    }

    private func addItem() {
        withAnimation {
            let newItem = Item(timestamp: Date())
            modelContext.insert(newItem)
        }
    }

    private func deleteItems(offsets: IndexSet) {
        withAnimation {
            for index in offsets {
                modelContext.delete(items[index])
            }
        }
    }
}

@Model
final class Item {
    var timestamp: Date
    
    init(timestamp: Date) {
        self.timestamp = timestamp
    }
}

I'm having the same issue, so I'm replying to subscribe to this thread :)

I am still having this issue with Xcode 15 beta 6 and macOS 14.0 beta 23A5312d

I'm also seeing this issue... uninstall Xcode beta and reinstall had no effect on the error. If I navigate in finder I can see there is no swiftdata.frameworks/ installed on the machine.

Same issue here with no change to my code from yesterday to today. Only difference is I upgraded to iOS 17 beta 6. Apps work fine on other devices and simulators.

I'm having the same issue.

Same here. I've tried even with a blank boiler plate project and it still has the same issue. I'm on Version 15.0 beta 6 (15A5219j)

eagerly awaiting Xcode beta 7 at this point... I'd really like to keep working on my app.

Same issue here. Xcode beta 6 is a bit buggy it seems

Experiencing the same issue. I'm on Xcode 15 beta 6.

The same issue happened to me on beta 5. Upgrading to beta 6 worked a few days ago.

However, I recently updated to the latest iOS 17 beta and now it's crashing again with the 'Symbol not found' error.

Hope this gets fixed soon.

Having the same issue :~(

Same issue Xcode 15 Beta 6. App works in simulator but crashes on real device

I'm also having the same issue on Xcode 15 beta 6 on macOS Ventura on an iOS 17 device running beta 6.

From the release notes:

Known Issues: Apps using SwiftData that are built with Xcode 15 beta 6 have known issues when running on iOS 17 beta 6. (113915428): Workaround: Use iOS 17 Beta 5 with Xcode Beta 6.

Correct me if I am wrong, but I dont think we can easily downgrade in IOS, so I will be waiting for Beta 7 of Xcode.

This issue is fixed for me on beta 7 of iOS 17 and Xcode 15.

I'm getting same issue on Beta 5 and Beta 7

dyld[2154]: Symbol not found: _$s9SwiftData6SchemaC16PropertyMetadataVMa Referenced from: <63D43BAC-0413-3988-80E5-4FA0F5F6F46D> /Users/XXXX/Library/Developer/Xcode/DerivedData/APPNAME-fgavhbuultkkgvatnbksrrvzqdgr/Build/Products/Debug/APPNAME.app/Contents/MacOS/ThaiGF Expected in: <324ADC23-74A0-38CA-A9F5-F58F94784E31> /System/Library/Frameworks/SwiftData.framework/Versions/A/SwiftData

If you upgrade to Sonomo 14.0 Beta (23A5328b) it fixes the problem

Hi,

I'm getting the same issue:

dyld[927]: Symbol not found: _$sSo24OS_dispatch_queue_serialC8DispatchE5label3qos10attributes20autoreleaseFrequency6targetABSS_AC0E3QoSVAbCE10AttributesVSo0a1_b1_C0CACE011AutoreleaseJ0OANSgtcfC
  Referenced from: <D5B497B4-6F51-387D-827C-85E82B1A6C68> /private/var/containers/Bundle/Application/56AAEC63-6AD9-4812-ABAB-CF945F502593/PanzerPower.app/PanzerPower
  Expected in:     <5D28AD50-9087-35F4-B443-436779FBCC38> /usr/lib/swift/libswiftDispatch.dylib

I'm running Sonoma 14.0 Beta (23A5312d), and Xcode 15.0 beta 8.

I wondered if this is because of some of my libraries I'm using, but I've re-added all my deps using spm again, and still experiencing this.

This is my bt dump:

* thread #1, stop reason = signal SIGABRT
  * frame #0: 0x00000001cfcecee4 dyld`__abort_with_payload + 8
    frame #1: 0x00000001cfcf6bcc dyld`abort_with_payload_wrapper_internal + 100
    frame #2: 0x00000001cfcf6bfc dyld`abort_with_payload + 12
    frame #3: 0x00000001cfc9ff1c dyld`dyld4::halt(char const*) + 324
    frame #4: 0x00000001cfc9e468 dyld`dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3540
    frame #5: 0x00000001cfc9c2e0 dyld`start + 1760

Thought to provide it here just in case it's of any help to someone.

Xcode 15.0 Beta 5, Symbol not found: _$s9SwiftData014DefaultBackingB0C3forACyxGxm_tcfC
 
 
Q