network canvas client plugin uses file plugin, but API has changed. needs to be updated. removing for now.
custom MainActivity doesn't seem to work. Removing for now.
Android file handling code needed to be updated. cdvfile:// is no longer supported. Internal filesystem actions can use file://, and assets need to use a special localhost based url which is created by running FileEntry.toURL().
remove wkwebview plugin as it is not compatible with newest iOS platform. Add WKWebViewOnly preference to config.xml to use WKWebView.
Added a custom scheme to iOS to bypass the inability to load from file://.
Significant refactor of src/utils/filesystem to change the way that things like ensurePathExists are implemented.
Since network-exporters submodule contains its own version of filesystem utils (which cannot be deduplicated because this would create an external dependency in what should always have been a standalone module) these changes needed to be duplicated. Because the main branch of network-exporters has already been migrated to an ESM module with a completely different structure (and bringing this experimental version to Interviewer is deemed too risky) these changes are in the feature/android-12 branch.
Changed CSP settings fairly dramatically, in order to allow file:// and app:// protocol access. These changes should be reviewed.
Tested so far:
[x] Protocol import on iOS
[x] Protocol import on Android
[x] Asset loading on iOS
[x] Asset loading on Android
[x] Data export on Android
[x] Data export on iOS
Still to do:
- [x] Reinstate custom mainactivity? Decided against this as the only thing it provided was color customisation for titlebar and nav bar.
[x] Reinstate network canvas client plugin, and test server connection?
[x] Verify error messages are still working in network-exporters filesystem, after changes.
This PR brings in changes that were needed to get the app running again in Cordova.
These changes need to be reviewed carefully, as there is significant potential for breakage!
Rough changelog/list of steps required to get this working (for future reference as much as anything):
src/utils/filesystem
to change the way that things likeensurePathExists
are implemented.network-exporters
submodule contains its own version offilesystem
utils (which cannot be deduplicated because this would create an external dependency in what should always have been a standalone module) these changes needed to be duplicated. Because the main branch ofnetwork-exporters
has already been migrated to an ESM module with a completely different structure (and bringing this experimental version to Interviewer is deemed too risky) these changes are in thefeature/android-12
branch.Tested so far:
Still to do:
- [x] Reinstate custom mainactivity?Decided against this as the only thing it provided was color customisation for titlebar and nav bar.network-exporters
filesystem, after changes.