Info.Plist File for React Native iOS App Using Expo Sdk

Info.plist file for react native ios app using expo SDK

If you are using expo, it will not expose the entire info.plist to you.

Expo Workaround

You can add an object as a child of ios object in the app.json like so:

"infoPlist": {
"NSCameraUsageDescription": "This app uses the camera to scan barcodes on event tickets."
},

Which will write to the native level but this is limited. Here is a list of all the keys you can access with while using expo

<key>NSCameraUsageDescription</key>
<string>Allow Expo experiences to use your camera</string>
<key>NSContactsUsageDescription</key>
<string>Allow Expo experiences to access your contacts</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Allow Expo experiences to use your location</string>
<key>NSMicrophoneUsageDescription</key>
<string>Allow Expo experiences to access your microphone</string>
<key>NSMotionUsageDescription</key>
<string>Allow Expo experiences to access your device's accelerometer</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Give Expo experiences permission to save photos</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Give Expo experiences permission to access your photos</string>

View expos official docs here

React-native Init

If you need more low level access to your project, consider using react-native init MyProject instead of create-react-native-app MyProject.

This will provide you with full access to all ios and android bundles.

React-native eject

Or if you already built your app via create-react-native-app MyProject you can run react-native eject to get the build of react-native-init MyProject.

Be cautious, there is no returning once this command is ran.

Where is info.plist for React Native projects run in Expo for the purpose of callback URLs?

Shubhnik Singh truly helped me out here. For anyone wondering, go here: https://docs.expo.io/versions/latest/workflow/linking/

More specifically, look at the Expo.Linking module section. Instead of creating your own callback url link, you are borrowing Expo's. You are, after all, running everything from with inside another app, so it wouldn't make sense to have your own true callback link.

In all, you do have a callback link that Expo gives you.

Edit: Saturday, March 30th, 2019

As reported in the comments, the original link to the Linking guide is dead. But, it only appears like Expo moved around some stuff on their domain. It is apparent that some of the actually details have slightly been changed (see WayBackMachine's snapshot of the original page). Specifically relating to this question, the callback URL specifics and the names on the actual guide have changed slightly. I have updated my original answer above to reflect this.

ios App is not showing infoPlist permission string in app store review and got rejected

I've found the problem and solved it.
Expo image picker has feature to reduce image quality and crop before "NSPhotoLibraryAddUsageDescription" this permission. I've add this and the problem is gone. Apple approved my app.

Thanks everyone.

How to remove permissions for ios using expo

This was resolved updating SDK to 45 and expo-image-picker to it more recent version, here you can modify in the app.json like this

 [
"expo-image-picker",
{
"microphonePermission": false
}
]

How to make react native app communicate with local machine (ios)

Finally figured out the last step I was missing...

When you run the flask app, you have to run it to be hosted on 0.0.0.0 rather than 127.0.0.1 which are both ways of referencing your local machine, but are treated slightly differently on the network.



Related Topics



Leave a reply



Submit