Skip to content

Commit 7796a8f

Browse files
authored
fix(cli): adapt Package.swift to work on older Swift versions (#10687)
I noticed the plugin build fails on older Swift (tested on macOS 12) because the default minimum required macOS version (10.10 in my case) is older than `v10_13` which is set by the Tauri iOS package (and also swift-rs). So the plugins must explicitly define a minimum macOS version too.
1 parent 8d148a9 commit 7796a8f

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'tauri-cli': 'patch:bug'
3+
'@tauri-apps/cli': 'patch:bug'
4+
---
5+
6+
Fix Swift plugin compilation on older versions.

examples/api/src-tauri/tauri-plugin-sample/ios/Package.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import PackageDescription
88
let package = Package(
99
name: "tauri-plugin-sample",
1010
platforms: [
11+
.macOS(.v10_13),
1112
.iOS(.v13),
1213
],
1314
products: [

tooling/cli/templates/plugin/ios-spm/Package.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import PackageDescription
66
let package = Package(
77
name: "tauri-plugin-{{ plugin_name }}",
88
platforms: [
9+
.macOS(.v10_13),
910
.iOS(.v13),
1011
],
1112
products: [

0 commit comments

Comments
 (0)