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

Add mobile data permission #478

Conversation

sebastian-student
Copy link

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation changes

PR Checklist

For bug fixes / features, please check if your PR fulfills the following requirements:

  • Testing has been carried out for the changes have been added
  • Regression testing has been carried out for existing functionality
  • Docs have been added / updated

What is the purpose of this PR?

iOS enables the user to block a specific apps from using cellular data connection. This PR provides the ability to check this permission so e.g. error messages can be made more granular.

Does this PR introduce a breaking change?

  • Yes
  • No

What testing has been done on the changes in the PR?

Manually checked that the correct value is returned after first app install and after the user changed the setting.

What testing has been done on existing functionality?

Compatibility with module system is currently untested! Testing of other functionality should not be necessary.

@dpa99c
Copy link
Owner

dpa99c commented Oct 4, 2022

Thanks, I have implemented this in the core module for both Android (20acb90) & iOS (5a2da5f)

@dpa99c dpa99c closed this Oct 4, 2022
@sebastian-student
Copy link
Author

There seems to have been a misunderstanding. The current documentation and Android implementation refers to the device mobile data setting while the ios implementation and reason for the PR refers to an additional app specific permission. As a result the function currently can return TRUE even if device mobile data is disabled (for example cordova-diagnostic-plugin-example: open app and re-check state -> mobile data always displayed as enabled independent of device mobile data setting; the refered permission only appears in per app settings and mobile data settings after the first http request and the default value appears to be kCTCellularDataNotRestricted).
I'm not aware of an equivalent native Android functionality to block apps from using mobile data. (The closest I have found is blocking data usage from background.)

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