Xcode 11 Beta 3, Build Error "Unknown Attribute 'State'", "Use of Undeclared Type 'View'" etc

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

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.

SwiftUI project builds successfully for simulators but Product Archive fails with errors in a Swift package

Please add supported platforms to your Package.swift.

This could look like this:

platforms: [
.iOS(.v13)
]

Bernhard

Xcode build failure Undefined symbols for architecture x86_64

It looks like you are missing including the IOBluetooth.framework in your project. You can add it by:

  • Clicking on your project in the upper left of the left pane (the blue icon).

  • In the middle pane, click on the Build Phases tab.

  • Under "Link Binary With Libraries", click on the plus button.

  • Find the IOBluetooth.framework from the list and hit Add.

Sample Image

Sample Image

This will make sure that the IOBluetooth.framework definitions are found by the linker. You can see that the framework is a member of your target by clicking on the framework in the left pane and seeing the framework's target membership in the right pane (note I've moved the framework under the Frameworks group for organization purposes):

Sample Image

Use of unresolved identifier error in an extension file?

NSDocumentTypeDocumentAttribute, NSCharacterEncodingDocumentAttribute, NSHTMLTextDocumentType and
other keys and values for document attribute dictionaries
are defined in
the AppKit framework (macOS) or in the UIKit framework (iOS):

#if os(macOS)
import AppKit
#elseif os(iOS)
import UIKit
#endif


Related Topics



Leave a reply



Submit