Custom ios permissions message

SDK 38.0
Platforms: ios

Our application was rejected from the Apple App Store as we did not override the default permission message to access the photo library.

Our permission code looks like this:

import * as ImagePicker from "expo-image-picker";
...
const requestPermission = async () => {

        const {
            granted,
        } = await ImagePicker.requestCameraRollPermissionsAsync();

        if (!granted) {

            alert(

                "Sorry, you will need to enabled permissions to access your library to upload an image."

            );

            setCameraPermission(false);

        }

    };

We’ve added the following in app.json:

"ios": {
      "supportsTablet": true,
      "bundleIdentifier": "com.acme.ourapp",
      "infoPlist": {
        "NSPhotoLibraryUsageDescription": "The application requires access to your photos to allow you to upload a profile picture."
      },

When testing using the iOS simulator, the default expo message displays we do not see the infoPlist message text.

Is this a limitation of the iOS simulator or did we code something incorrectly?

Thanks.

Hey @marketbox,

It looks like you’ve done everything correctly. Just to be certain, did you build a new binary after making the changes to your app.json?

Cheers,
Adam

No we’ve been testing in development running the iOS simulator. I assume you are saying that we need to do a new build to see the correct messages?

Yep, that’s correct! You can read more about the limitations of publishing here: https://docs.expo.io/workflow/publishing/#limitations

We did some additional testing with a new build file and the custom permission text is working.

What mean re-build binaries and how to do it??

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.