Post

Replies

Boosts

Views

Activity

Comment on Why do I get a "Publishing changes from within view updates is not allowed" when moving my @Bindings to @Published in an @ObservableObject?
I assume because the other published vars aren't affected, that it has to do with the fact that the NavigationView is wrapped in an .alert(item: ) might have something to do with this warning and supposed solution? Won't mark this solved, will wait for some more input from other developers, as I am too green.
Mar ’23
Comment on Is there an order for response, data, and error in URLSession delegates?
I currently have it as below, so that the completionHandler gets called first and no matter what ` func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: (URLSession.ResponseDisposition) -> Void) { completionHandler(URLSession.ResponseDisposition.allow) if let httpResponse = response as? HTTPURLResponse { xFile?.httpResponse = httpResponse.statusCode DispatchQueue.main.async { [self] in if httpResponse.statusCode != 200 { ...my code } } } }`
May ’22