Skip to content

Commit fce344b

Browse files
authored
feat(core): set default value for minimum_system_version to 10.13 (#3497)
1 parent 4bacea5 commit fce344b

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

.changes/minimum-mac-version.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"tauri-utils": patch
3+
"tauri": patch
4+
---
5+
6+
Changed the default value for `tauri > bundle > macOS > minimumSystemVersion` to `10.13`.

core/tauri-utils/src/config.rs

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,18 @@ pub struct DebConfig {
9696

9797
/// Configuration for the macOS bundles.
9898
#[skip_serializing_none]
99-
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)]
99+
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
100100
#[cfg_attr(feature = "schema", derive(JsonSchema))]
101101
#[serde(rename_all = "camelCase", deny_unknown_fields)]
102102
pub struct MacConfig {
103103
/// A list of strings indicating any macOS X frameworks that need to be bundled with the application.
104104
///
105105
/// If a name is used, ".framework" must be omitted and it will look for standard install locations. You may also use a path to a specific framework.
106106
pub frameworks: Option<Vec<String>>,
107-
/// A version string indicating the minimum macOS X version that the bundled application supports.
107+
/// A version string indicating the minimum macOS X version that the bundled application supports. Defaults to `10.13`.
108+
/// Setting it to `null` completely removes the `LSMinimumSystemVersion` field on the bundle's `Info.plist`
109+
/// and the `MACOSX_DEPLOYMENT_TARGET` environment variable.
110+
#[serde(default = "minimum_system_version")]
108111
pub minimum_system_version: Option<String>,
109112
/// Allows your application to communicate with the outside world.
110113
/// It should be a lowercase, without port and protocol domain name.
@@ -122,6 +125,25 @@ pub struct MacConfig {
122125
pub entitlements: Option<String>,
123126
}
124127

128+
impl Default for MacConfig {
129+
fn default() -> Self {
130+
Self {
131+
frameworks: None,
132+
minimum_system_version: minimum_system_version(),
133+
exception_domain: None,
134+
license: None,
135+
use_bootstrapper: false,
136+
signing_identity: None,
137+
provider_short_name: None,
138+
entitlements: None,
139+
}
140+
}
141+
}
142+
143+
fn minimum_system_version() -> Option<String> {
144+
Some("10.13".into())
145+
}
146+
125147
/// Configuration for a target language for the WiX build.
126148
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
127149
#[cfg_attr(feature = "schema", derive(JsonSchema))]

tooling/cli/schema.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@
140140
"icon": [],
141141
"identifier": "",
142142
"macOS": {
143+
"minimumSystemVersion": "10.13",
143144
"useBootstrapper": false
144145
},
145146
"windows": {
@@ -519,6 +520,7 @@
519520
"macOS": {
520521
"description": "Configuration for the macOS bundles.",
521522
"default": {
523+
"minimumSystemVersion": "10.13",
522524
"useBootstrapper": false
523525
},
524526
"allOf": [
@@ -1082,7 +1084,8 @@
10821084
]
10831085
},
10841086
"minimumSystemVersion": {
1085-
"description": "A version string indicating the minimum macOS X version that the bundled application supports.",
1087+
"description": "A version string indicating the minimum macOS X version that the bundled application supports. Defaults to `10.13`. Setting it to `null` completely removes the `LSMinimumSystemVersion` field on the bundle's `Info.plist` and the `MACOSX_DEPLOYMENT_TARGET` environment variable.",
1088+
"default": "10.13",
10861089
"type": [
10871090
"string",
10881091
"null"
@@ -1563,6 +1566,7 @@
15631566
"icon": [],
15641567
"identifier": "",
15651568
"macOS": {
1569+
"minimumSystemVersion": "10.13",
15661570
"useBootstrapper": false
15671571
},
15681572
"windows": {

0 commit comments

Comments
 (0)