diff --git a/.changes/minimum-mac-version.md b/.changes/minimum-mac-version.md new file mode 100644 index 000000000..85008ca87 --- /dev/null +++ b/.changes/minimum-mac-version.md @@ -0,0 +1,6 @@ +--- +"tauri-utils": patch +"tauri": patch +--- + +Changed the default value for `tauri > bundle > macOS > minimumSystemVersion` to `10.13`. diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index 2e2f18c91..070256c03 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -96,7 +96,7 @@ pub struct DebConfig { /// Configuration for the macOS bundles. #[skip_serializing_none] -#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)] +#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] #[cfg_attr(feature = "schema", derive(JsonSchema))] #[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct MacConfig { @@ -104,7 +104,10 @@ pub struct MacConfig { /// /// 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. pub frameworks: Option>, - /// A version string indicating the minimum macOS X version that the bundled application supports. + /// 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. + #[serde(default = "minimum_system_version")] pub minimum_system_version: Option, /// Allows your application to communicate with the outside world. /// It should be a lowercase, without port and protocol domain name. @@ -122,6 +125,25 @@ pub struct MacConfig { pub entitlements: Option, } +impl Default for MacConfig { + fn default() -> Self { + Self { + frameworks: None, + minimum_system_version: minimum_system_version(), + exception_domain: None, + license: None, + use_bootstrapper: false, + signing_identity: None, + provider_short_name: None, + entitlements: None, + } + } +} + +fn minimum_system_version() -> Option { + Some("10.13".into()) +} + /// Configuration for a target language for the WiX build. #[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] #[cfg_attr(feature = "schema", derive(JsonSchema))] diff --git a/tooling/cli/schema.json b/tooling/cli/schema.json index 29b99a9fb..3c01e8de5 100644 --- a/tooling/cli/schema.json +++ b/tooling/cli/schema.json @@ -140,6 +140,7 @@ "icon": [], "identifier": "", "macOS": { + "minimumSystemVersion": "10.13", "useBootstrapper": false }, "windows": { @@ -519,6 +520,7 @@ "macOS": { "description": "Configuration for the macOS bundles.", "default": { + "minimumSystemVersion": "10.13", "useBootstrapper": false }, "allOf": [ @@ -1082,7 +1084,8 @@ ] }, "minimumSystemVersion": { - "description": "A version string indicating the minimum macOS X version that the bundled application supports.", + "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.", + "default": "10.13", "type": [ "string", "null" @@ -1563,6 +1566,7 @@ "icon": [], "identifier": "", "macOS": { + "minimumSystemVersion": "10.13", "useBootstrapper": false }, "windows": {