首页 > 解决方案 > Swift Package Manager and IBDesignable Error

问题描述

I'm working on adding Swift Package Manager support to an existing iOS library that I have that already supports CocoaPods and Carthage. I was able to able to setup the Package.swift file and create the package and push those changes to the repo. It compiles fine in Xcode and builds fine on the command line.

The issue I'm having is when I add it as a dependency to a test application, the IBDesignable stuff won't compile, and errors with a Build Failed flag. The message states:

The built product "" does not exist in the file system. Make sure your built products contains either an application or a framework product.

I have tried cleaning, deleting derived data, and removing/re-adding the package to the project.

My Package.swift file is as follows:

// swift-tools-version:5.3

import PackageDescription

let package = Package(
    name: "package_name",
    platforms: [
        .iOS(.v11)
    ],
    products: [
        .library(
            name: "package_name",
            targets: ["target_name"])
    ],
    targets: [
        .target(
            name: "target_name"
        )
    ])

Is there something I'm missing or a setting that needs to be set in order for it to function properly?

Thanks in advance for all the help.

标签: iosswiftxcodeswift-package-manager

解决方案


推荐阅读