spencerccf / app_settings

Flutter plugin for accessing app phone settings for iOS and Android
MIT License
336 stars 125 forks source link

How can I go to General Settings screen in Ios platform ? #146

Closed SuYungCheng closed 1 year ago

SuYungCheng commented 2 years ago

I use your github demo code (version 4.1.1) : AppSettings.openWIFISettings(); can to general settings screen.

But in my project, and use the same code : AppSettings.openWIFISettings(); just always go to app settings?

don't know why?

The document says: All options open the current 'app' settings section if there are settings defined. If no current settings are "defined" for the app the iPhone Settings Screen will be displayed.

What does "defined" words mean? how can I "not" to defined current settings?

Thanks!

elmar001 commented 2 years ago

I also need that one. But seems like it can only open app settings if there is anything int the app settings - permissions etc.

SuYungCheng commented 2 years ago

It's very strange!

I create a native iOS project and it can open general settings. But after I use my flutter project and use channel method to call native code. It goes to app settings.

Maybe like you said , something in the app settings.

But other apps also has that, and it can go general settings.

Maturelittleman commented 2 years ago

me too ,Inaccessible WIFI setting , is iOS

plinkos commented 2 years ago

Apple does not allow direct access to WIFI settings. They ask that you implement the security description items for WiFi access in info.plist and you need to make a request to user for WiFi access on the device in your code and then when you call openWIFISettings method it will open App Settings but will list the WIFI items there.

Sent with GitHawk

SuYungCheng commented 2 years ago

ya, I know it can't access to WIFI settings.

what I want is to open General Settings and don't use the rejecting words "Prefs:root".

It will be reject by apple.

SuYungCheng commented 2 years ago

@plinkos you mean if I implement the security for WiFi access in info.plist, I will always open App Settings. Right?

plinkos commented 2 years ago

Yes, the settings you have permission granted for will appear in app settings screen.

https://betterprogramming.pub/wifi-permission-changes-for-ios-12-1-iphone-x-and-other-devices-c313e24f90ae

Sent with GitHawk

SuYungCheng commented 2 years ago

@plinkos Thank you for clearing up my confusion.

After I remove the Entitlements.plist for WiFi access, I can go to general settings.

But also make the other issue:

My app need to get WiFi name to let users know.

So I used the package "network_info_plus".

When I remove the WiFi access, the WiFi name return null.

How can I both to get WiFi name and access to general settings?

Like some iot app, it can get WiFi name and also go to general setting?

for example

video

plinkos commented 2 years ago

Check this out: https://developer.apple.com/forums/thread/679038

SuYungCheng commented 2 years ago

Thank you @plinkos .

You help me a lot.

I'll try it.

Hope it can work.