From 01611e6a17e6dd55cbd98a596c23d27b8145128e Mon Sep 17 00:00:00 2001 From: pbk Date: Fri, 7 Nov 2025 12:08:15 +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) --- 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. +// +