SPM "Bundle format unrecognized, invalid, or unsuitable"

156 views Asked by At

I'm preparing the SPM package, with resources folder. When I compile it for device, it work ok and I got successful. But when I try to build to simulator, I got error: ... bundle format unrecognized, invalid, or unsuitable

What can be wrong?

  1. Tried to make Resource folder empty - no result. Package.swift
  2. defaults variants with delete DerivenData - no result.
let package = Package(
    name: "GPUVideo",
    platforms: [
           .macOS(.v10_13), .iOS(.v13),
    ],
    products: [
        .library(
            name: "GPUVideo",
            targets: ["GPUVideo"]),
    ],
    dependencies: [
    ],
    targets: [
        .target(
            name: "GPUVideo",
            dependencies: [],
            exclude: ["Metal"],
            resources: [
                .copy("Resources")
            ])
    ]
)
1

There are 1 answers

3
Bimawa On

Solved by change: .copy on .process

resources: [
                .process("Resources")
            ])

It is unclear to me why its helps