App crashes because of SwiftData

I was implementing SwiftData on my app and everything works on emulator (both iOS and iPadOS). But when I try to run it on my device, it threw an error

dyld[548]: Symbol not found: _$s9SwiftData15PropertyOptionsC6uniqueACvgZ
  Referenced from: <5E19B2FA-C3D5-353E-AEE7-7B31B7BE56B4> /private/var/containers/Bundle/Application/F7269758-C6E1-46DA-A6E2-8AD5EBB54CFF/MyApp.app/MyApp
  Expected in:     <8B52C2B3-931A-3736-B357-ECF87A41F3EB> /System/Library/Frameworks/SwiftData.framework/SwiftData

My devices are on iOS 17 Beta 6 and Xcode 15 beta 6.

Post not yet marked as solved Up vote post of lawgimenez Down vote post of lawgimenez
1.4k views
  • same issue here

Add a Comment

Replies

Almost the same for me, but I am getting this when trying to init context

dyld[1113]: Symbol not found: _$s9SwiftData18ModelConfigurationV14GroupContainerO9automaticyA2EmFWC Referenced from: <E40699B0-73FD-3456-902C-B9D9CC94023C> /private/var/containers/Bundle/Application/971211AD-1D50-4BDE-9F03-018649DD7263/daybright.app/daybright Expected in: <8B52C2B3-931A-3736-B357-ECF87A41F3EB> /System/Library/Frameworks/SwiftData.framework/SwiftData

We have no Simulator for iOS 17 beta 6 and that's why it works. But on device with iOS 17 beta 6 it crashes. Seems something changed with SwiftData and I don't understand what exactly

My guess is, that Xcode and the iOS beta are out of sync. We need to wait for the next Xcode beta to have it working again. (Ran into the same issue after upgrading to iOS 17 Beta 6 - Beta 5 was fine)

Same issue here! :(

Same issue here...

For me its "Symbol not found: _$s9SwiftData14ModelContainerC3for_AcA010PersistentC0_pXp_AA0C13ConfigurationVdtKcfC"

Same issue here... downgrade to iOS/iPadOS 17.0 Beta 5 is OK.

Same issue here. Assuming it will be fixed once the new xcode beta comes out.

the same issue, looking forward the next xCode version

I am having the same issue, the app only works in the emulator.

Yeah, same here. I figured it's a iOS vs. Xcode beta version sync issue like everyone else... Hopefully there'll be a new Xcode beta soon, since I'm betting we're just a few weeks away from GM...

According to the iOS & iPadOS 17 Beta 7 Release Notes:

SwiftData

Resolved Issues

  • Fixed in beta 7: Apps using SwiftData that are built with Xcode 15 beta 6 have known issues when running on iOS 17 beta 6. (113915428)

New builds with the new Xcode beta should not run into those issues.