Xcode 11 Beta 3, build error “Unknown attribute 'State'”, “Use of undeclared type 'View'” etc

后端 未结 4 730
孤城傲影
孤城傲影 2020-12-21 04:43

I build an app with the 2nd beta of Xcode 11, using SwiftUI, and everything worked completely fine, but now, with the 3rd beta, the app isn\'t even build. I get errors like

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-21 05:34

    This is from the Xcode 11 Beta 3 Release Notes.

    Known Issues

    • Xcode 11 doesn’t support working with SwiftUI in an iPad app brought to macOS. (41416222, 51201699)

    I downloaded the Xcode 11 Beta 3 myself just to confirm the errors you mentioned, and I had the same issues when trying to build a SwiftUI project for Mac.

    I would suggest going back to using Xcode Beta 2 if possible. Unfortunately, Apple doesn't provide download links to previous betas, so hopefully you have a Time Machine backup or Beta 2 still installed on your computer. Otherwise, you might be out of luck until the next beta is released.

提交回复
热议问题