Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop to master #862

Merged
merged 294 commits into from
Dec 28, 2024
Merged

Develop to master #862

merged 294 commits into from
Dec 28, 2024

Conversation

graphefruit
Copy link
Owner

No description provided.

RagingCactus and others added 30 commits October 3, 2024 19:08
The Cordova file system plugin does not work properly in Capacitor while
also using Angular. Some promises just do not resolve. While there is a
monkey-patch for that out there, migrating away from the unsupported
plugin seems like the better option.

This was also a great opportunity to clean up the file read methods in
uiFileHelper a bit, centralizing a lot of the file handling.

File writes and other remaining uses of the Cordova plugin must be
removed in the next steps.
This was not working and hanging the app before due to the issues with
the Cordova file system plugin. Now that the uiFileHelper was refactored
to read files using the Capacitor APIs, the automatic data restore can
be enabled again and should be working now.
This commit migrates all ordinary file write functions to the Capacitor
API. Some special file system functions still remain on the Cordova
plugin. Those must be migrated later.
cordova-plugin-filepath is now unused and can be removed.
This is especially important for Android, as only the external backup
directory is readable via adb. On iOS this falls back to the Documents
directory anyway, so there are no changes there.
This is exactly why I want to remove the plugin, but I need the
workaround for now.
With this, uiFileHelper does not use the Cordova file plugin anymore.
Now only some straggling references in other files remain before the
plugin can finally be removed.
This commit pretty much re-writes the import functionality which allows
us to remove all usages of cordova-plugin-file in production code.

Now only references in test code remain.

Note that the plugin itself cannot be removed yet, as we have to remove
cordova-plugin-advanced-http and cordova-plugin-file-transfer first
because they have dependencies on cordova-file-plugin.
This removes thousands of lines of warning/error output from the test
results. There is still a _lot_ of output, but this is a first step.
Now there are no test failures left.
cordova-plugin-file-transfer was now unused and can be removed by just
removing all references to it and then uninstalling it.
All remaining usages should be migrated now except the following:

* SanremoYOUDevice
* XeniaDevice

Because of upstream code changes to at least the SanremoYOUDevice, these
will be fixed after another merge of upstream/develop.
While I can't test this, this should do the same calls as before.
Unfortunately I can't test this, so some calls might be broken.
If you want to run a CLI command and force a certain platform version of
the Capacitor platform config, use the environment variable
CAPACITOR_PLATFORM_OVERRIDE and set it to either 'android' or 'ios'.
This only contains the default project setup as generated by the
Capacitor CLI and the generated icons.

The Info.plist should be reviewed carefully and missing configuration
for permissions and privacy regulations added.
These are no longer needed with Capacitor. The Cordova plugins are still
pulled in as needed.
Migrate from Cordova to Capacitor
…brew-template loading else the false reference would bet set
@graphefruit graphefruit merged commit 5db3555 into master Dec 28, 2024
2 of 4 checks passed
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
6 Security Hotspots
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants