WebviewWindowBuilder open external url permission doesn't work on the AppStore build
#14381
-
|
As the title says, I have a Tauri app with OAuth feature that will open the signing URL, in this case Apple, Google, and Spotify, on a new window for desktop only and a default browser on mobile. It works on development, including with --release flag (cargo tauri dev --release) but it doesn't do anything on TestFlight build. I initially thought it was the window permission, so I added the window label in the windows permission array. I built it for TestFligt, download it, and it still doesn't do anything. Any clue? #[tauri::command]
pub async fn open_new_window(handle: AppHandle, id: String, url: String, title: String) {
#[cfg(desktop)]
{
print!("Will open new window at {url}.");
let docs_window = WebviewWindowBuilder::new(
&handle,
id, /* the unique window label */
WebviewUrl::External(url.parse().unwrap()),
)
.inner_size(800.0, 600.0)
.build()
.unwrap();
let _ = docs_window.set_title(title.as_str());
}
}Permissions JSON: {
"identifier": "migrated",
"description": "Permissions that were migrated from v1",
"local": true,
"windows": ["main", "oauth_window"],
"permissions": [
"core:default",
"store:default",
"deep-link:default",
"os:default",
"fs:default",
"fs:allow-open",
"fs:allow-read",
"fs:allow-write",
"fs:allow-app-read-recursive",
"fs:allow-app-write-recursive",
"haptics:allow-impact-feedback",
"haptics:allow-notification-feedback",
"haptics:allow-selection-feedback",
"haptics:allow-vibrate",
"clipboard-manager:default",
"clipboard-manager:allow-write-text",
"oauth:allow-start",
"oauth:allow-cancel",
"opener:default",
"log:allow-log",
{
"identifier": "opener:allow-open-url",
"allow": [
{
"url": "https://splitfire.ai"
},
{
"url": "custom:*"
}
]
}
]
}
If I understand this correctly, the default window permission will be included by default. And there's no external url stuff in the docs. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Does that mean the window doesn't even open or that it's a white page or something? You can likely ignore all the permissions/capabilities. That's an additional layer on top of whatever the OS does or allows. This issue sounds like a sandbox issue or something to me. I assume you already set up entitlements, can you add this as well? <key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/> |
Beta Was this translation helpful? Give feedback.
Does that mean the window doesn't even open or that it's a white page or something?
You can likely ignore all the permissions/capabilities. That's an additional layer on top of whatever the OS does or allows.
This issue sounds like a sandbox issue or something to me. I assume you already set up entitlements, can you add this as well?