App settings not present in system settings in iOS - ios

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?

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:
Open ios folder in xcode
Open Runner entry in the project view, it should contain a bunch of folders, one of which is Runner again
Right-click the inner Runner entry
Select New file...
Select Settings Bundle and confirm the selection (then press create with default settings)
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

React Native application doesn't show up on settings in iOS

My config:
react-native: 0.66.3
xcode: 13.2.1
When deploying an application to the simulator, or to real device, I cannot access the settings page of the app in iOS.
I have a button that asks for user location, and I should at least see it on the settings page.
I tried to deploy the application on release variant, but same thing.
I checked some solution on the web, and I found a solution with many upvote but it still did not do the trick.
Maybe there is a way to generate a Settings.bundle with cocoa based to the permission that we have ?
In my case, I came across this and I followed these instructions :
Adding the Settings Bundle Open your workspace inner ios folder with
xcode To add a Settings bundle to your Xcode project: Choose File >
New > New File. Under iOS, choose Resource, and then select the
Settings Bundle template. Name the file Settings.bundle.
My application was available on the Settings application on iOS, and I just updated the file with my permissions.
From now, the purpose of this file is to manually add some permission, or information (like the version code).
But the automatic permissions like geolocation will be added automatically.

Dont see settings in xcode project

I'm doing an app and i try to have a setting that the user would be able to change from the iOS Settings page,
i opened a new settings.bundle in my app
and kept some of the default values, but i dont see it in my actual device settings
i tried reinstalling that app many tines, and i still dont see the app settings in my settings options on my iOS
here is my settings i created:
i kept the default values in the Root.plist
but also on the simulator and also on the actually device i dont see anything on the settings
what am i doing wrong ?
From the official docs at https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html:
A Settings bundle has the name Settings.bundle and resides in the
top-level directory of your app’s bundle. This bundle contains one or
more Settings page files that describe the individual pages of
preferences. It may also include other support files needed to display
your preferences, such as images or localized strings. Table 4-2 lists
the contents of a typical Settings bundle.
So renaming your settings bundle to Settings.bundle should fix the problem.

How do you add Settings.bundle to a phonegap app?

we have implemented a phonegap application using Typescript, Angular, css etc. We use PhoneGapBuild to package this up and deploy to iPads.
I would now like to add some settings for this app in the iPads settings application - currently, this only shows the permission items like camera, notifications etc.
I have managed to use the cordova plugin "me.apla.cordova.app-preferences" to set and fetch application preference values... but these are not being shown in the Settings app.
Investigating further, I believe that you need to create a Settings.bundle folder with the Root.plist file inside... which I have done (I actually created it using xcode and copied the resulting files into the root of my phonegap project (next to the config.xml))... and still after a PhoneGapBuild and re-deploy nothing appears in the Settings app for my application. Upon inspection of the .ipa file... the Settings.bundle is location in the www folder... is this correct?
So could someone please tell me the baby steps required to get settings to appear in the Settings app for this type of project.

iOS custom keyboard settings not saving

I’m implementing a settings bundle for a custom keyboard using the Apple Keyboard Extension documentation and the settings tutorial it links to.
This method works in the parent app, but when I implement it as identically as possible for the keyboard extension, the settings bundle does not appear to save any of the data, as shown in this video. It seems as if something is resetting the values near-constantly: any time I exit the settings view (e.g. Multitasking view, previous settings page), the values are set to zero (not default: empty, false, and zero respectively). This is the default settings bundle template, no edits, not referred to in code.
Is there a special implementation for extension settings not explicitly stated in the documentation (or that I missed) that is causing this?
For clarity, the steps I took (after creating the extension):
Created the bundle with New File –> Settings Bundle.
Named it, targeted the keyboard extension.
Built and ran.
These were the same steps I took for the parent app (targeting the app), which was able to save settings.
This is on a physical iOS 11.0 (15A5326a) device; app built with Xcode 9.0 (9M202q), Swift 4.

Prevent an iOS app from being updated

I am doing some research to find out if an app developer can set up an app in a way that it can't be updated, at least in some circumstance.
Or in another way: what can be done by a developer in order to create on purpose issue during the update of its own app?
It sounds like what you actually want to do is create another Target in your project. This way, you can have multiple copies of your app on the same device. For example, you could have a dev target that is constantly moving and a release target that you don't want to override.
You can do this by selecting your project in the project navigator, right clicking on your app's target, and then selecting Duplicate. It will create a new target called YourAppName-copy. You can then select your target next to where you select the device/simulator to run on & select the new target. Run the new target & it will install the new target and leave your other one alone.
For an enterprise app, you could support your own app updating (and create a web service to check to see if the app needs to be updated -- or if the user's credentials are still valid, etc.).
For a public App Store app, this is not currently possible.

Resources