#Swift 6 Compatibility
9 messages · Page 1 of 1 (latest)
i am doing it. did not find any problem there. can you share a little more details.
Hmm, maybe its not AppWrites incompatibility and I have structured my project incorrectly.
In swift 5, I was able to make all my DataStores singletons.
class Singleton: ObservableObject{ static let shared = Singleton() private init(){ } }
Now in Swift 6, global singletons are prone to cause data-races. I have stripped them of what makes them singletons and added them as environmentObjects.
If you have some time I would like to hop on a call or chat and discuss details further if you'd be willing?
you are working with swiftUI?
Yes I am
ok. singleton in itself does not cause race condition, depends on how you use it. just like even if you remove singleton it could still produce data-race.
it's a broad spectrum and purely depends on your use.
Yes, even after I remove singleton it still produces data races warning/error....
Any time I make an appwrite request there is data race warning/error. Maybe I have implemented my appwrite service incorrectly. Could you share the structure of your appwrite implementation>?
i don't use swiftui much but if you share your code i can check for it.