Core Data error switch to using NSSecureUnarchiveFromData or a subclass of NSSecureUnarchiveFromDataTransformer instead
I found I did something wrong when I used my own code instead of removeFromAddresses(_ value: Address) to remove an address from Route.addresses. When I fixed my code by using removeFromAddresses(_ value: Address) instead of my own code, the error messages in question went away.
After upgrade to iOS13 beta 6/Xcode 11 beta 5: issue dyld: Symbol not found: _$s7SwiftUI7BindingVyxGAA0C11ConvertibleAAMc
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.
SwiftUI / CoreData / Master / Detail (with editing) / Xcode 11 - Beta 5
As promised, here is a link to sample SwiftUI program that uses CoreData. The current version compiles and runs on the GM release. It does not use the new @FetchRequest property wrapper because it does not suit all of my needs. I wrote a CoreDataDataSource class that does basically the same thing plus a lot more.
https://github.com/Whiffer/SwiftUI-Core-Data-Test
Can't use @ObservedObject on real iPhone
This isn't a problem with not conforming to ObservableObject
. The code you provided works in the canvas and in the simulator, and should also work on the device. I have already come across this issue with iOS 13 Beta 6 in my own project and have spent a lot of time troubleshooting.
Other things (such as calling self.presentationMode.value.dismiss()
to dismiss a modal view) are also currently broken when running projects built with Xcode Beta 5 on devices running iOS 13 Beta 6. There have been issues with previous betas of Xcode not working on newer betas of iOS, and this may be the same issue.
I would suggest that you wait until Xcode Beta 6 is released to make any significant structural changes to your code, as iOS 13 Beta 6 may have been developed in anticipation of handling changes that will be made in Xcode Beta 6.
That being said, if you absolutely must make changes to workaround this issue in the meantime, I've found that using @EnvironmentObject
instead of @ObservedObject
fixes this issue. In your example, that would mean declaring your property like this:
@EnvironmentObject private var networkManager: NetworkManager
Then, when you create your view, you can pass a NetworkManager
as an environment object like this:
ContentView()
.environmentObject(NetworkManager())
Related Topics
How to Create a Packed Data Structure in Swift
Is Self Captured Within a Nested Function
Using Foreach with a an Array of Bindings (Swiftui)
Enumerateobjectsusingblock in Swift
How to Set Inputview for Textfield in Swiftui
How to Convert a Float Value to Byte Array in Swift
Adding Nscoding as an Extension
React Native Sending Events to JavaScript in Swift
Convert Int to Uint32 in Swift
How Does Optional Covariance Work in Swift
How to Alloc/Dealloc Unsafe Pointers in Swift
Add Placeholder to Uitextfield, How to Set the Placeholder Text Programmatically in Swift
Combining Two Conditions in Nspredicate
What Is Import Func, Struct, Class, and @_Exported in Swift
iOS 9 iPad Keyboard Get Rid of "Undo View"
Can't Able to Get Video Tracks from Avurlasset for Hls Videos(.M3U8 Format) for Avplayer