ivanvorobei/SPConfetti

Failed to archive build with latest SwiftUI code

gongzhang opened this issue · 2 comments

Describe the bug
Hi, Ivan, I just noticed the latest SwiftUI code break the SPM build. (-。-;

To Reproduce

  1. In Xcode, select the "iOS SwiftUI Example" target and build for "Any iOS Device"
  2. Product menu > run Archive
  3. The compiler will report errors related to SwiftUI symbols.

image

I found that you can fix it by simply change the deployment target from v10 to v11 in Package.swift:

// swift-tools-version:5.3

import PackageDescription

let package = Package(
    name: "SPConfetti",
    platforms: [
        .iOS(.v10), .tvOS(.v10) // <== ✅ .iOS(.v11) , .tvOS(.v10)
    ],
    ...

Maybe helpful:
https://forums.swift.org/t/platform-per-target/29253

You right, I changed target for cocoapods before, but forgot about SPM. In version 1.3.3 it has been fixed, please, update.