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.
Related
I'm working on a React Native app that requires use of the camera/photo library. The functionality works in the iOS simulator, however when I test with a physical device I see the following error in the console:
sandbox extension creation failed: client lacks entitlements for path
Based on what I found in the documentation on the Apple development forum, I need to enable the App Sandbox configuration.
This is done by going in Xcode (13.1) to the project > signing & capabilities > click the plus button in the lower-left under TARGETS
When the dialogue box appears, there are various options. However, the sandbox is not one of them.
I found this S/O post that shows the location of the sandbox in the dialogue but does not describe in any detail how to actually add this to a project.
Sandbox extension creation failed: client lacks entitlements? for path:
In the case of a React Native application, how is this done? There is supposed to be a .entitlements file (where I belive the other entitlements should be listed), but I do not see one in the /ios directory in the React Native project or in X-Code. What directory is this located in or if it is to be created, which directory should it be added to? Thanks in advance.
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.
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.
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.
I want to create an app icon, splash screen, edit the app name, and set some cordova / app settings.
meteor run ios opens up the simulator but doesn't open or the project. Where is that project and does this Xcode project ever get overwritten? I don't want to lose any settings I make.
For example I want to set the app url scheme so I can implement a redirect to the app. I also want to set cordova preferences to disallow over scroll. Typically I would do these things from within the .xcodeproj but where is it and when does it get overwritten / reset?
From what i have seen from the docs and my experience so far
meteor run ios only runs the iOS emulator with your code in it. The code related to this build is in .meteor/local/cordova-build but is temporary and will get overwritten all the time
meteor run ios-device -p yourlocalip:yourlocalport will launch XCode with the cordova-built .xcodeproject, and a local server on your computer. It is intended to make you able to run and debug your code from an actual iPhone device, with the changes you make on your computer to the code repercuted instantly on the iPhone screen. You need your computer and your phone to be on the same Wifi to enable this feature. The code related to this build is in .meteor/local/cordova-build but is temporary and will get overwritten all the time
meteor build /Path/To/Builds/Directory/NewBuild -p yourserverhost:yourserverip will actually create the cordova-built .xcodeproject pointing to your real server at the path you specified. From this project you can customize as much as you want BUT you will indeed loose these settings with a new build...
Except if you use the yourproject/cordova-build-override/ folder !
As described in the offical cordova meteor docs under "Advanced build configuration" everything you put in this folder will overwrite the files created by meteor during its build. So you can configure everything in the Cordova/Phonegap way there. If you were able to configure your features through Cordova usually, you will be able to do it there.
Bonus that I have learned the hard way :
Always destroy the .meteor/local folder before building one of those three things, i got stuck in a state where XCode remembered some of my changes to the .xcodeproject and everything was messed up. After destroying this folder, everything went back to normal :)
hope i helped
Mickael
If you are looking for the path to the Xcode project in your filesystem, it is located at:
/path/to/project/.meteor/local/cordova-build/platforms/ios/<project>.xcodeproj
You'll have to navigate to your project directory and open .meteor because it is a hidden file.
Note: If you want to be able to see hidden files in finder on a mac, then type into your terminal defaults write com.apple.finder AppleShowAllFiles TRUE, and then restart finder. Change TRUE to FALSE to only see visible files.