Hi Jonatan,
Have you tried the Settings Plugin? I don't know if it solves your issue because it seems that this use case is achieved by using private APIs from Apple and there's a risk of not being able to submit the app through its AppStore.
The Settings Plugin is a wrapper to a Cordova plugin that already has a newer version forked on GitHub and the latest fix was related to iOS11.