mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-01-31 00:35:19 +01:00
fix(cli): synchronize version with iOS Info.plist (#10944)
This commit is contained in:
committed by
GitHub
parent
fafceec309
commit
a5848af65b
6
.changes/sync-ios-version.md
Normal file
6
.changes/sync-ios-version.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri-cli": patch:bug
|
||||
"@tauri-apps/cli": patch:bug
|
||||
---
|
||||
|
||||
Synchronize app version (`tauri.conf.json > version` or `Cargo.toml > package > version`) with the `CFBundleVersion` and `CFBundleShortVersionString` Info.plist values.
|
||||
@@ -174,6 +174,11 @@ pub fn command(options: Options, noise_level: NoiseLevel) -> Result<()> {
|
||||
)?;
|
||||
inject_resources(&config, tauri_config.lock().unwrap().as_ref().unwrap())?;
|
||||
|
||||
let mut plist = plist::Dictionary::new();
|
||||
let version = interface.app_settings().get_package_settings().version;
|
||||
plist.insert("CFBundleShortVersionString".into(), version.clone().into());
|
||||
plist.insert("CFBundleVersion".into(), version.into());
|
||||
|
||||
let info_plist_path = config
|
||||
.project_dir()
|
||||
.join(config.scheme())
|
||||
@@ -182,6 +187,7 @@ pub fn command(options: Options, noise_level: NoiseLevel) -> Result<()> {
|
||||
info_plist_path.clone().into(),
|
||||
tauri_path.join("Info.plist").into(),
|
||||
tauri_path.join("Info.ios.plist").into(),
|
||||
plist::Value::Dictionary(plist).into(),
|
||||
])?;
|
||||
merged_info_plist.to_file_xml(&info_plist_path)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user