After upgrade to iOS13 beta 6/Xcode 11 beta 5: iss

2020-02-28 03:35发布

问题:

After upgrading to iOS13 beta 6 using Xcode 11 beta 5 I receive this message when running on an iPhone SE device.

dyld: Symbol not found: _$s7SwiftUI7BindingVyxGAA0C11ConvertibleAAMc
  Referenced from: /var/containers/Bundle/Application/3B128240-B05E-4C1C-A0E1-55D22683B49E/BleAdvApp.app/BleAdvApp
  Expected in: /System/Library/Frameworks/SwiftUI.framework/SwiftUI
 in /var/containers/Bundle/Application/3B128240-B05E-4C1C-A0E1-55D22683B49E/BleAdvApp.app/BleAdvApp

Using the simulator there's no such message, and it has been ok with iOS13 beta 5 on the device, tool Compiling is fine, the message is shown at startup of the application on the iPhone with an

Thread 1: signal SIGABRT

Since there is no Xcode 11 beta 6, the Xcode is still running on beta 5 on MacOS Mojave 10.14.5 (18F132).

I created a simple SwiftUI example from scratch, that's working without any issue on the actual phone and the simulator.

What me also wonders is that there's no path /var/containers on my Mac at all?

Any idea on how to proceed?

回答1:

With the update to Xcode 11 beta 6 and using iOS 13 beta 7 the issue does not appear anymore. I used the code posted in the links above.



回答2:

SwiftUI APIs deprecated in previous betas are now removed. (52587863)

Several extensions to the Binding structure are removed. (51624798)

The Binding structure’s conditional conformance to the Collection protocol is removed. (51624798)

I believe the answer is this section of release notes. Binding’s removal from conforming to collection.

In a new project utilizing CoreData, crash does not occur. Any other project with dynamic data that is not CoreData, like a set or array crashes with this error.

I followed the migration guide from the notes to account for this removal, but crash still occurs on device. Simulator, previews, etc are all fine.