Skip to content

Commit f5dfc02

Browse files
authored
fix(core/cli): Add custom default implementation for ios config (#10533)
* fix(cli): Add custom `default` implementation for ios config * fix change
1 parent 5f56cb0 commit f5dfc02

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

.changes/ios-default-minversion.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'tauri-utils': 'patch:bug'
3+
'tauri-cli': 'patch:bug'
4+
'@tauri-apps/cli': 'patch:bug'
5+
---
6+
7+
Fixed an issue causing `tauri ios init` to fail if `iOS.minimumSystemVersion` was not configured explicitly.

core/tauri-config-schema/schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
},
7676
"createUpdaterArtifacts": false,
7777
"iOS": {
78-
"minimumSystemVersion": ""
78+
"minimumSystemVersion": "13.0"
7979
},
8080
"icon": [],
8181
"linux": {
@@ -1715,7 +1715,7 @@
17151715
"iOS": {
17161716
"description": "iOS configuration.",
17171717
"default": {
1718-
"minimumSystemVersion": ""
1718+
"minimumSystemVersion": "13.0"
17191719
},
17201720
"allOf": [
17211721
{

core/tauri-utils/src/config.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ pub struct TrayIconConfig {
18891889

18901890
/// General configuration for the iOS target.
18911891
#[skip_serializing_none]
1892-
#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)]
1892+
#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
18931893
#[cfg_attr(feature = "schema", derive(JsonSchema))]
18941894
#[serde(rename_all = "camelCase", deny_unknown_fields)]
18951895
pub struct IosConfig {
@@ -1915,6 +1915,17 @@ pub struct IosConfig {
19151915
pub minimum_system_version: String,
19161916
}
19171917

1918+
impl Default for IosConfig {
1919+
fn default() -> Self {
1920+
Self {
1921+
template: None,
1922+
frameworks: None,
1923+
development_team: None,
1924+
minimum_system_version: ios_minimum_system_version(),
1925+
}
1926+
}
1927+
}
1928+
19181929
/// General configuration for the iOS target.
19191930
#[skip_serializing_none]
19201931
#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]

tooling/cli/schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
},
7676
"createUpdaterArtifacts": false,
7777
"iOS": {
78-
"minimumSystemVersion": ""
78+
"minimumSystemVersion": "13.0"
7979
},
8080
"icon": [],
8181
"linux": {
@@ -1715,7 +1715,7 @@
17151715
"iOS": {
17161716
"description": "iOS configuration.",
17171717
"default": {
1718-
"minimumSystemVersion": ""
1718+
"minimumSystemVersion": "13.0"
17191719
},
17201720
"allOf": [
17211721
{

0 commit comments

Comments
 (0)