Skip to content

Commit

Permalink
feat(ios): use app.stylized_name for product name (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored Aug 5, 2023
1 parent 43b2a3b commit 6b8cf77
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changes/stylized-name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri-mobile": patch
---

Use stylized_name config for iOS product name.
4 changes: 2 additions & 2 deletions src/apple/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ impl Config {
let path = |tail: &str| self.export_dir().join(format!("{}.ipa", tail));
let old = path(&self.scheme());
// It seems like the format changed recently?
let new = path(self.app.name());
let new = path(self.app.stylized_name());
std::iter::once(&old)
.chain(std::iter::once(&new))
.find(|path| path.is_file())
Expand All @@ -412,7 +412,7 @@ impl Config {

pub fn app_path(&self) -> PathBuf {
self.export_dir()
.join(format!("Payload/{}.app", self.app.name()))
.join(format!("Payload/{}.app", self.app.stylized_name()))
}

pub fn scheme(&self) -> String {
Expand Down
2 changes: 1 addition & 1 deletion src/apple/simctl/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn run(
.export_dir()
.join(format!("{}_iOS.xcarchive", config.app().name()))
.join("Products/Applications")
.join(format!("{}.app", config.app().name()));
.join(format!("{}.app", config.app().stylized_name()));
let cmd = duct::cmd("xcrun", ["simctl", "install", id])
.vars(env.explicit_env())
.before_spawn(move |cmd| {
Expand Down
2 changes: 1 addition & 1 deletion templates/platforms/xcode/project.yml.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ configs:
settingGroups:
app:
base:
PRODUCT_NAME: {{app.name}}
PRODUCT_NAME: {{app.stylized-name}}
PRODUCT_BUNDLE_IDENTIFIER: {{reverse-domain app.domain}}.{{app.name}}
DEVELOPMENT_TEAM: {{apple.development-team}}
targetTemplates:
Expand Down

0 comments on commit 6b8cf77

Please sign in to comment.