diff --git a/.changes/permission-add-default-windows.md b/.changes/permission-add-default-windows.md new file mode 100644 index 000000000000..3540e83e44e9 --- /dev/null +++ b/.changes/permission-add-default-windows.md @@ -0,0 +1,6 @@ +--- +"@tauri-apps/cli": patch:enhance +"tauri-cli": patch:enhance +--- + +Associate a newly created capability file with the `main` window on the `tauri add` and `tauri permission add` commands. diff --git a/.github/workflows/publish-cli-js.yml b/.github/workflows/publish-cli-js.yml index 946198989a95..d12a8c490090 100644 --- a/.github/workflows/publish-cli-js.yml +++ b/.github/workflows/publish-cli-js.yml @@ -108,7 +108,6 @@ jobs: - uses: Swatinem/rust-cache@v1 with: key: ${{ matrix.settings.target }} - working-directory: 'crates/tauri-cli/' if: ${{ matrix.settings.docker }} - name: Setup toolchain run: ${{ matrix.settings.setup }} diff --git a/crates/tauri-cli/src/acl/permission/add.rs b/crates/tauri-cli/src/acl/permission/add.rs index 25cbe3bfe703..9ace7dcd9716 100644 --- a/crates/tauri-cli/src/acl/permission/add.rs +++ b/crates/tauri-cli/src/acl/permission/add.rs @@ -187,7 +187,8 @@ pub fn command(options: Options) -> Result<()> { capabilities.push(( TomlOrJson::Json(serde_json::json!({ "identifier": identifier, - "platforms": expected_platforms + "platforms": expected_platforms, + "windows": ["main"] })), capability_path, )); diff --git a/crates/tauri-cli/src/mobile/ios/mod.rs b/crates/tauri-cli/src/mobile/ios/mod.rs index a7236e5f9d5c..1e0e63a56ed4 100644 --- a/crates/tauri-cli/src/mobile/ios/mod.rs +++ b/crates/tauri-cli/src/mobile/ios/mod.rs @@ -132,7 +132,7 @@ pub fn get_config( log::warn!("No code signing certificates found. You must add one and set the certificate development team ID on the `bundle > iOS > developmentTeam` config value or the `{APPLE_DEVELOPMENT_TEAM_ENV_VAR_NAME}` environment variable. To list the available certificates, run `tauri info`."); None } - 1 =>None, + 1 => None, _ => { log::warn!("You must set the code signing certificate development team ID on the `bundle > iOS > developmentTeam` config value or the `{APPLE_DEVELOPMENT_TEAM_ENV_VAR_NAME}` environment variable. Available certificates: {}", teams.iter().map(|t| format!("{} (ID: {})", t.name, t.id)).collect::>().join(", ")); None