Post

Replies

Boosts

Views

Activity

Reply to How to solve "Publishing changes from background threads is not allowed; make sure to publish values from the main thread (via operators like receive(on:)) on model updates." error?
I am getting the same message when setting up UserDefaults with combine. The code is simple enough     var twitterOauthTokenSecret: String {         willSet{             objectWillChange.send(self)         }     }     init() {         notificationSubscription = NotificationCenter.default.publisher(for: UserDefaults.didChangeNotification).sink { _ in                    self.objectWillChange.send(self)         }     } Not sure I understand the recommended solution above by @gandhi_ms. Can you clarify how I would use this in a this case?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’20
Reply to Apple Watch App - Invalid Swift entry point data
I am also getting this same error message - Invalid Swift 2020-09-25 19:35:46.281502-0400 XXXX WatchKit Extension[1012:18958] [default] lookupMainFuncAddressInMachHeader:71: Invalid Swift entry point data 2020-09-25 19:35:46.282071-0400 XXXX WatchKit Extension[1012:18958] [default] lookupMainFuncAddressInMachHeader:77: Swift entry point addres could not be determined. And when the program then tries to access the WatchKit ExtensionDelegate I get nil
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’20
Reply to WKExtension and ExtensionDelegate
Well, I tired to get some help on StackOverflow and they didn't get the issue... https://stackoverflow.com/questions/64082376/couldnt-cast-swiftui-extensiondelegate-to-extensiondelegate/64085463#64085463 - Just to be clear, it is not a problem with @environmentObjects - that is working well - passing between the various views... the issue is with passing to a class.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’20