#tauri-plugin-localhost v2.0.0-beta usage example seems outdated

1 messages ยท Page 1 of 1 (latest)

thin kraken
#

Hey folks! Congrats on the v2 beta ๐Ÿ‘

I was trying to upgrade my old tauri v1 setup to v2 and got stuck on upgrading tauri-plugin-localhost, the usage example seems outdated.

https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/localhost/README.md#usage

Some notes:

  • There's no ipc_scope method on app within setup.
  • It doesn't say where RemoteDomainAccessScope comes from.
  • WindowBuilder::new() doesn't take 3 arguments anymore.
  • tauri::WindowUrl doesn't seem to exist?
  • I guess I have to use the unstable feature to get access to WindowBuilder?

Any chance this example could get updated, or some notes on how to proceed? Thanks! ๐Ÿ™

twin acorn
#

V2 is bate not stable. Work with v1 intil lanche v2 stable

thin kraken
#

Thanks salmi, I'm aware of that.
The v2 beta blog post does say no major changes are expected, so I assume this stuff isn't going to change much.

#

Managed to find the new API for the windows.
There's now a WebviewBuilder in addition to WindowBuilder

Can't find anything on the new IPC API though.

twin acorn
#

See this from general discussion

thin kraken
#

Yup I'm aware.

quasi wolf
#

There's no ipc_scope method on app within setup.
Scopes were replaced as part of the move to an ACL. Changing capabilities/permissions whatever at runtime is afaik not supported yet, this includes the ipc configs. You could however decide on a known port for now and configure it here https://beta.tauri.app/references/v2/acl/#remote-access.
It doesn't say where RemoteDomainAccessScope comes from.
Used to be from tauri::ipc::RemoteDomainAccessScope
WindowBuilder::new() doesn't take 3 arguments anymore.
It's WindowWebviewBuilder now
tauri::WindowUrl doesn't seem to exist?
Correct, it's https://docs.rs/tauri/2.0.0-beta.2/tauri/enum.WebviewUrl.html now.
I guess I have to use the unstable feature to get access to WindowBuilder?
yes, but you don't need the WindowBuilder.

thin kraken
#

Thanks @quasi wolf! Super helpful ๐Ÿ™