viam-rover demonstrates Tauri version 2's ability to run Typescript-for-the-browser as an application across both desktop and mobile platforms using only one code base.
For prerequisites, see this page: Tauri prerequisites
$ cd viam-rover
$ yarn
$ npm install
$ yarn tauri dev
$ npm run tauri dev
$ yarn tauri android init
$ yarn tauri android dev
$ npm run tauri android init
$ npm run tauri android dev
$ yarn tauri ios init
$ yarn tauri ios dev
$ npm run tauri ios init
$ npm run tauri ios dev
- a Viam API key
- a Viam API key ID
- a Viam App Address
- You must first create a login at Viam: https://viam.com
- Go to your profile settings in the upper-right hand corner to create your API key and API key ID
- Then go to the Try Viam page here: https://app.viam.com/try
- Click on the "TRY NOW" button and wait for a rover reservation
- When it succeeds, click on the "TRY MY ROVER" button
- In the dashboard, click on "CONNECT" in the menu bar
- Copy the "Machine address (URI)" which you will use in the form field labeled "APP ADDRESS"
Up to 20 seconds after you submit the form, the "Click Me" button should change color and be enabled.
You can right-click on the app (or Ctrl-click on MacOS) and select "inspect element" to see the web console.
VITE_APP_API_KEY=joy8glxxxxxxxxxxxxxxxcngs
VITE_APP_API_KEY_ID=0dxxxxxx-9xxx-4xxx-9xxx-8xxxxx22
Running on an iPhone Emulator as a Native iOS App