Closed stefprogovac closed 11 months ago
You posted ZIPFoundation's package manifest. But how does yours look like? Did you add the library using Xcode's "Add Package" UI?
Yes, see screenshot
Did you add ZIPFoundation to the "Frameworks and Libraries" list in the "General" tab of your target?
Yes, you can see it right at the bottom:
Are you using any custom Swift toolchains?
Another thought: Your issue title says
Could not find module 'ZipFoundation' for target 'x86_64_apple-ios-simulator'
Why are you building for an x86_64 Simulator on a Apple Silicon Mac?
Summary
Using SPM with Xcode 15 and Apple M2 chip. SPM is as follows:
// swift-tools-version:5.0 import PackageDescription
if canImport(Compression)
let targets: [Target] = [ .target(name: "ZIPFoundation"), .testTarget(name: "ZIPFoundationTests", dependencies: ["ZIPFoundation"]) ]
else
let targets: [Target] = [ .systemLibrary(name: "CZLib", pkgConfig: "zlib", providers: [.brew(["zlib"]), .apt(["zlib"])]), .target(name: "ZIPFoundation", dependencies: ["CZLib"], cSettings: [.define("_GNU_SOURCE", to: "1")]), .testTarget(name: "ZIPFoundationTests", dependencies: ["ZIPFoundation"]) ]
endif
let package = Package( name: "ZIPFoundation", platforms: [ .macOS(.v10_11), .iOS(.v9), .tvOS(.v9), .watchOS(.v2) ], products: [ .library(name: "ZIPFoundation", targets: ["ZIPFoundation"]) ], targets: targets, swiftLanguageVersions: [.v4, .v4_2, .v5] )
Steps to Reproduce
Expected Results
Be able to find Module
Actual Results
Now need to use Rosetta when building, while using Rosetta everything works fine.
Regression & Version
Not sure
Related Link