Closed leye0 closed 3 years ago
I received this warning...
UI API called from background thread: UIApplication.canOpenURL(_:) must be used from main thread only
...when navigating back to my application.
It seems like the main thread should be retrieved before calling the UIApplication.shared.canOpenURL method. Maybe something like this would help?
UIApplication.shared.canOpenURL
DispatchQueue.main.async { UIApplication.shared.open(settingsUrl, completionHandler: { (success) in call.resolve([ "status": success ]) }); }
Thanks
That should do the trick. Would you be able to make a pull request for this? @leye0
Here's a PR: https://github.com/RaphaelWoude/capacitor-native-settings/pull/12
I received this warning...
...when navigating back to my application.
It seems like the main thread should be retrieved before calling the
UIApplication.shared.canOpenURL
method. Maybe something like this would help?Thanks