danielemm
(Daniele Margutti)
1
Hi guys!
I need to add the following build settings option:
EXCLUDED_ARCHS[sdk=iphonesimulator*]=arm64
I tried using the following option:
// swift-tools-version:5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "IndomioCore",
platforms: [
.iOS(.v14)
],
products: [
.library(
name: "IndomioCore",
targets: ["IndomioCore"])
],
dependencies: [
.package(name: "IndomioCommons", path: "../IndomioCommons"),
],
targets: [
.target(
name: "IndomioCore",
dependencies: [
.product(name: "IndomioCommons", package: "IndomioCommons"),
],
swiftSettings: [
.define("EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64")
]
)
]
)
but it does not work, it does not appear. What I'm missing?
Thanks
NeoNacho
(Boris Buegling)
2
EXCLUDED_ARCHS is an Xcode-specific build setting, SwiftPM has no support for setting it. In contrast, the defines API is a way for passing a -D flag to the Swift compiler.
If you pass overriding build settings to xcodebuild, those will apply to packages as well, so that might be a way to do what you're trying to do, but I am not sure if that supports conditionals and also it won't apply to builds in the Xcode IDE.