Migrate from Tauri to CapacitorJS #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "capacitorjs-spike"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation
The first use case for a KtC mobile app is alerting the user when their home server is down. This requires a background task that will make a http request to the server and dispatch a local notification if the server response is non-ok.
Tauri does not have official support for background tasks, and the only community plugin providing background tasks was AI generated and nonfunctional. It's documentation generally had gaps regarding mobile usage, as it's mainly a desktop application framework.
Solution
CapacitorJS provides an official background runner, as well as notifications, preferences, etc. This framework is mobile only, so mobile support and documentation is excellent.
Note: Background runner is only active on physical iOS devices — it does not run on a simulator.
Follow up
Server address is currently hardcoded. Next PR needs to set the server address via preferences and read it in the background worker using CapacitorKV