- Swift 43.3%
- TypeScript 31.8%
- CSS 12.4%
- JavaScript 7.1%
- HTML 3.5%
- Other 1.9%
## Motivation "sever okay" notifications were only included for testing. Wanted to find out if the scheduled background task could be used to reliably detect home server outages. Interestingly, iOS's scheduling of the background task is sometimes frequent but not really reliable enough. Sometimes it runs every few minutes, sometimes it goes an hour or two without running. I think adding a desktop application with more reliable and consistent background polling might help. However, building out the rest of the mobile application might reveal that are self evident enough when they matter — when the user or their family is trying to access their server. ## Solution Have removed the "ok" notification Co-authored-by: Anthony Manning-Franklin <anthony.manning.franklin@gmail.com> Reviewed-on: http://localhost:3000/kill-the-cloud/phone-app/pulls/4 |
||
|---|---|---|
| .vscode | ||
| ios | ||
| scripts | ||
| web | ||
| .gitignore | ||
| capacitor.config.json | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
KtC Phone App
Cross platform app allowing users to setup, use, and manage their homeserver. Implemented using CapacitorJS
CapacitorJS Gotchas
While CapacitorJS appears to be the most mature webview based cross platform mobile app development framework, quite a few parts of it API are unintuitive. All oddities encountered so far are documented here:
console.log only accepts a single argument!
console logging functions typically accept any number of arguments. However, CapacitorJS overrides the builtin functions in order to route the logs back to xcode. In doing so, they have not faithfully re-implemented native console log behaviour.
This doesn't just mean that you have to do your own string interpolation/concatenation, it also means managing to string transformations, e.g. using JSON.stringify on objects.
CapacitorKV and @capacitor/preferences do not share data
Despite both using UserDefaults on iOS and SharedPreferences on Android, they don't read the same data. Instead, data from @capacitor/preferences has to be sent to the background workers via an event, which can then be persisted using CapacitorKV and retrieved in subsequent background invocations.