Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open setting->Privacy of iPhone in Cordova PhoneGap Application

We are building Cordova PhoneGap application and using location service.
Like in iOS Native app If Location service is disabled, the Cordova app should show popup that will redirect to setting->privacy page. So that user can enable location service.

Solution I am using:
To resolve this issue I have installed Cordova Open Native Settings plugin, that has provided list of settings(like Bluetooth, Location, Security.. etc.) that can be opened.

ALONG WITH TOW METHODS
FOR Android
cordova.plugins.settings.openSetting("privacy", function(){ },function(){ });

AND FOR iOS
cordova.plugins.settings.open(function(){},function(error){});

It works properly for Android but Not for iOS
The issue with iOS is that it is opening Settings->MyAppSettingpage
Actually opening this my app setting.I don't need this one.The above one is not require for me. This is expected for me.
This is expected for me

Please help me to do this using Cordova Phone gap.
Thank's

like image 535
Avinash Jadhav Avatar asked Feb 03 '26 21:02

Avinash Jadhav


1 Answers

Try the following plugin (it is based on the plugin you are currently using). iOS 9 now supporting opening specific preference.

https://github.com/guyromb/Cordova-open-native-settings

like image 91
guyromb Avatar answered Feb 06 '26 10:02

guyromb