Post

Replies

Boosts

Views

Activity

Does CKSyncEngine have to be re-initialized after an account change event?
According to this comment in the sample project on GitHub and this answer by Apple Staff, CKSyncEngine should be re-initialized after signing out or switching accounts so that "CKSyncEngine schedules a new fetch on init." But according to my tests, CKSyncEngine will schedule a fetch after having a signed out and signed in again, without me ever having to reset the serialized sync state. The documentation doesn't mentioned anywhere that CKSyncEngine should be re-initialized after an account change. In fact, it states that CKSyncEngine will reset its state internally on account changes. So if that's the case, then I'm very confused as to why the "official" recommendation is to re-initialize CKSyncEngine after receiving .signOut or .accountSwitch. Can someone please clarify the correct approach here?
1
0
247
3w
Unable to use hardware keyboard in Xcode 12 live previews
I am unable to use the hardware keyboard to enter text in text fields when using Xcode 12 live previews. Same issue with all preview devices. Running on macOS 10.15.5. Is there an option I am missing or a workaround for this? import SwiftUI struct ContentView: View { @State private var text = "" var body: some View { Form { TextField("Write something", text: $text) } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
7
0
3.8k
Jan ’22
Does CKSyncEngine have to be re-initialized after an account change event?
According to this comment in the sample project on GitHub and this answer by Apple Staff, CKSyncEngine should be re-initialized after signing out or switching accounts so that "CKSyncEngine schedules a new fetch on init." But according to my tests, CKSyncEngine will schedule a fetch after having a signed out and signed in again, without me ever having to reset the serialized sync state. The documentation doesn't mentioned anywhere that CKSyncEngine should be re-initialized after an account change. In fact, it states that CKSyncEngine will reset its state internally on account changes. So if that's the case, then I'm very confused as to why the "official" recommendation is to re-initialize CKSyncEngine after receiving .signOut or .accountSwitch. Can someone please clarify the correct approach here?
Replies
1
Boosts
0
Views
247
Activity
3w
Unable to use hardware keyboard in Xcode 12 live previews
I am unable to use the hardware keyboard to enter text in text fields when using Xcode 12 live previews. Same issue with all preview devices. Running on macOS 10.15.5. Is there an option I am missing or a workaround for this? import SwiftUI struct ContentView: View { @State private var text = "" var body: some View { Form { TextField("Write something", text: $text) } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
Replies
7
Boosts
0
Views
3.8k
Activity
Jan ’22