From fba64447bfdcd2a89efb42bc3eff0838eb72d0cb Mon Sep 17 00:00:00 2001 From: Byeong Gwan Date: Mon, 10 Nov 2025 22:44:44 +0900 Subject: [PATCH] [iOS][swift] move `SpineiOS` target behind `SpineiOSWrapper` which gates platform condition, so that the library user won't get compiler crash on non iOS target (macOS) (#2970) --- Package.swift | 9 ++++++++- spine-ios/Sources/SpineiOSWrapper/stub.swift | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 spine-ios/Sources/SpineiOSWrapper/stub.swift diff --git a/Package.swift b/Package.swift index f8c1fb7f9..6d561f8cf 100644 --- a/Package.swift +++ b/Package.swift @@ -25,10 +25,17 @@ let package = Package( ), .library( name: "SpineiOS", - targets: ["SpineiOS"] + targets: ["SpineiOSWrapper"] ), ], targets: [ + .target( + name: "SpineiOSWrapper", + dependencies: [ + .target(name: "SpineiOS", condition: .when(platforms: [.iOS, .visionOS, .tvOS, .macCatalyst ])) + ], + path: "spine-ios/Sources/SpineiOSWrapper" + ), .target( name: "SpineiOS", dependencies: [ diff --git a/spine-ios/Sources/SpineiOSWrapper/stub.swift b/spine-ios/Sources/SpineiOSWrapper/stub.swift new file mode 100644 index 000000000..555cc2c46 --- /dev/null +++ b/spine-ios/Sources/SpineiOSWrapper/stub.swift @@ -0,0 +1,7 @@ +// +// stub.swift +// spine-ios +// +// Created by pbk20191 on 11/7/25. +// +