SwiftUI | 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.の対処方法
SwiftUIのPublishing changes from background threads is not allowedの対処方法を説明する。■結論 DispatchQueue.main.async { }を使う。