Skip to content

Commit b9a8d08

Browse files
fix: remove .app ending from default identifier (#900)
* Remove `.app` ending from default identifier * Clippy
1 parent 61bba26 commit b9a8d08

6 files changed

Lines changed: 39 additions & 5 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"create-tauri-app": "minor"
3+
"create-tauri-app-js": "minor"
4+
---
5+
6+
Changed default app identifier from `com.{package_name}.app` to `com.{user_name}.{package_name}` as `.app` causes problems on macOS

Cargo.lock

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ rust-embed = { version = "8.3", features = [
3636
"compression",
3737
"interpolate-folder-path",
3838
] }
39+
whoami = { version = "1.6.0", default-features = false }

src/category.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ pub enum Category {
1212
Dotnet,
1313
}
1414

15-
impl<'a> Category {
16-
pub const ALL: &'a [Self] = &[Category::JsTs, Category::Rust, Category::Dotnet];
15+
impl Category {
16+
pub const ALL: &[Self] = &[Category::JsTs, Category::Rust, Category::Dotnet];
1717

1818
pub const fn package_managers(&self) -> &[PackageManager] {
1919
match self {

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ where
126126
let identifier = match identifier {
127127
Some(name) => name,
128128
None => {
129-
let default = format!("com.{package_name}.app");
129+
let valid_user_name = utils::to_valid_pkg_name(&whoami::username());
130+
let default = format!("com.{valid_user_name}.{package_name}");
130131
if skip {
131132
default
132133
} else {

src/template.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ impl Template {
143143
}
144144
}
145145

146-
impl<'a> Template {
147-
pub const ALL: &'a [Template] = &[
146+
impl Template {
147+
pub const ALL: &[Template] = &[
148148
Template::Vanilla,
149149
Template::VanillaTs,
150150
Template::Vue,

0 commit comments

Comments
 (0)