Post

Replies

Boosts

Views

Activity

Reply to Widgets not working with TestFlight since Xcode 12.4
You can change the build config in your scheme target to release and get behavior that should match test-flight in most cases. I found that the reason mine was not working was the entitlements were not the same across debug and release and snapshots were actually crashing. https://developer.apple.com/library/archive/documentation/ToolsLanguages/Conceptual/Xcode_Overview/ManagingSchemes.html
Apr ’21
Reply to Using actors in a SwiftUI .task
The problem is that someone can mutate a1 before, and during the tasks runtime. One way to fix this is to make ContentView run all its accesses on the main thread by making it a @MainActor like so: @MainActor struct ContentView: View { If having all interactions run on the main thread is not ideal you could also make ContentView an actor like so: actor ContentView: View { ...   nonisolated var body: some View { The nonisolated tells the compiler to not implicitly make it isolated, which would make that function no longer able to comply with the protocol View. For a Swift View id recommend going the @MainActor annotation.
Feb ’22