Skip to content

Commit

Permalink
fix(cli): adapt Package.swift to work on older Swift versions (#10687)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lucasfernog authored Aug 19, 2024
1 parent 8d148a9 commit 7796a8f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changes/fix-ios-build-older-swift.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'tauri-cli': 'patch:bug'
'@tauri-apps/cli': 'patch:bug'
---

Fix Swift plugin compilation on older versions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import PackageDescription
let package = Package(
name: "tauri-plugin-sample",
platforms: [
.macOS(.v10_13),
.iOS(.v13),
],
products: [
Expand Down
1 change: 1 addition & 0 deletions tooling/cli/templates/plugin/ios-spm/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import PackageDescription
let package = Package(
name: "tauri-plugin-{{ plugin_name }}",
platforms: [
.macOS(.v10_13),
.iOS(.v13),
],
products: [
Expand Down

0 comments on commit 7796a8f

Please sign in to comment.