.backgroundTask in SwiftUI cannot compile

Error Code: error build: Command CompileSwift failed with a nonzero exit code

My Code:

.backgroundTask(.appRefresh("checkValidity")) {
//   scheduleAppRefresh()
//   checkRecords()
}
Add a Comment

Replies

.backgroundTask in SwiftUI cannot compile

If you create a new test project from one of the built-in templates, does that exhibit the same behaviour?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • I did that. It seems like in a blank project, it works. But I have modified the sample code, which is called ComposingCustomLayoutsWithSwiftUI, and it has the same error behavior!!!!😔

Add a Comment