App settings not present in system settings in iOS

Viewed 931

I've created a flutter app. One of the functionalities I'm creating requires location access and once the user denies the permission there's no way to enable it manually and system doesn't display dialogs on subsequent requests.

The reason it can't be done manually is that there's no application entry in system settings (at least in iOS simulator - that's the only iOS instance I can test on myself). What do I do to make it appear?

1 Answers

iOS uses settings bundle to display applications in system settings. Turns out Flutter is not creating it upon project creation.

In order to create it:

  1. Open ios folder in xcode
  2. Open Runner entry in the project view, it should contain a bunch of folders, one of which is Runner again
  3. Right-click the inner Runner entry
  4. Select New file...
  5. Select Settings Bundle and confirm the selection (then press create with default settings)
  6. Open Root.plist file and remove all Preference Items so that the array is empty

Once you reinstall the app, an entry in settings should appear. Once you request some permission (e.g. location) and deny/approve it, it should be automatically added there.

Related