-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat(ios): Replace usage of UserDefaults with KeyValueStore. #7191
Conversation
… will prevent every single Capacitor user from having to declare use of a required reason API. This is also made available for plugin authors or others who utilize Capacitor as a dependency.
try? FileManager.default.createDirectory(at: url, withIntermediateDirectories: true, attributes: nil) | ||
|
||
let new = FileStore(baseUrl: url) | ||
instances[url.absoluteString] = new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly not sure why I'm keying off the URL instead of just the name. That would allow for checking for its existence before doing all the other url logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already talked about this a bunch, but it also works when I run it, so that's good.
This will break live updates for users using |
cordova-plugin-ionic is not actually reading or setting any values being set by Capacitor core through UserDefaults in this case. For the serverBasePath stuff it actually goes through |
Ah, sorry, I was thinking about |
No worries, I immediately thought of cordova-plugin-ionic when I started this work and tried to be very thorough in my vetting of its uses. |
This will prevent every single Capacitor user from having to declare use of a required reason API when it becomes required by Apple. This is also made available for plugin authors or others who utilize Capacitor as a dependency.