ios – Swift Bundle Supervisor failing after updating to Xcode 14

[ad_1]

I’ve a operate referred to as .readSize that, in SwiftUI, permits a baby View to report its dimension to its guardian View. The operate is included in an extension to the View struct. Earlier than upgrading to Xcode 14 this package deal was working. Now, at Xcode 14.0.1, it doesn’t work. Xcode merely tells me that Textual content has no member .readSize. Once I verify, the Challenge Navigator is displaying the package deal and I can open the module containing .readSize.

(The logic for reporting little one dimension is taken from the 5 Stars weblog).

Once I click on on the undertaking within the Challenge Navigator, click on on the Challenge discipline and click on the “Bundle Dependencies” tab then the “packages” part is empty. If I faucet on the “+” image then Xcode presents a popover with an “Add Native” button. Clicking that can enable me to seek out the package deal and add it. That course of, nonetheless, merely duplicates the package deal within the Challenge Navigator. Within the Bundle Dependencies tab the “packages” part remains to be empty.

I’ve tried a number of the normal cleanup approaches, similar to eradicating the package deal, performing a clear, restarting Xcode, after which re-introducing the package deal with File -> Add Packages. I get the identical error.

At a guess, it might be that my package deal is now not outlined property. The manifest reads as follows:

// swift-tools-version:5.5
// The swift-tools-version declares the minimal model of Swift required to construct this package deal.

import PackageDescription

let package deal = Bundle(
    identify: "ViewExtensions",
    platforms: [.iOS("13.0")],
    merchandise: [
        // Products define the executables and libraries a package produces, and make them visible to other packages.
        .library(
            name: "ViewExtensions",
            targets: ["ViewExtensions"]),
    ],
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        // .package(url: /* package url */, from: "1.0.0"),
    ],
    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages this package depends on.
        .target(
            name: "ViewExtensions",
            dependencies: []),
        .testTarget(
            identify: "ViewExtensionsTests",
            dependencies: ["ViewExtensions"]),
    ]
)

I am at a standstill. Is there some solution to debug why Xcode won’t enable me so as to add my package deal beneath Bundle Dependencies?

[ad_2]

Leave a Reply