2

I am using expo-image-picker in one of my expo managed project (SDK 40). Here is my app.json:

{     
  "expo": {
    "name": "Alpha Soko Classifieds",
    "slug": "alphasokoclassifieds",
    "version": "1.1",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "backgroundColor": "#ff4500",
      "resizeMode": "contain"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": ["**/*"],
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "com.alpha.soko",
      "buildNumber": "2",
      "infoPlist": {
        "NSCameraUsageDescription": "This app uses the camera to capture and upload user profile image and listing image.",
        "NSPhotoLibraryUsageDescription": "This app needs access to the photo library to select and upload user profile image and listing image.",
        "NSLocationWhenInUseUsageDescription": "This app usages device location on listing information, Listing search Data and User information."
      },
      "config": {
        "googleMapsApiKey": "AIzaSyCCCF3jLaTY******hGASwzod1bPYNi***"
      }
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "android": {
      "package": "com.alpha.soko",
      "config": {
        "googleMaps": {
          "apiKey": "AIzaSyCCCF3jLaTY******hGASwzod1bPYNi***"
        }
      },
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#fff"
      },
      "permissions": [
        "CAMERA",
        "CAMERA_ROLL",
        "MEDIA_LIBRARY",
        "READ_EXTERNAL_STORAGE",
        "WRITE_EXTERNAL_STORAGE",
        "RECORD_AUDIO",
        "READ_PHONE_STATE",
        "READ_CONTACTS",
        "LOCATION"
      ],
      "versionCode": 2
    }
  }
}

The standalone build (.ipa) got rejected twice , because it is not showing the text in the permission modal. See the Image apple review team has sent me. enter image description here

Apple's recommendation is following:

"Please revise the purpose string in your app’s Info.plist file for the photos to explain why your app needs access.

You can modify your app's Info.plist file using the property list editor in Xcode."

I tried with a simulator build and it works well. I am really confused now . Can Anybody help me with this? What can I do now? Please help.

Habibur Rahman
  • 424
  • 7
  • 19
  • 1
    You can check this link https://stackoverflow.com/a/52045802/11795209. To check your infoPlist. Or please share your app.json. – Anthony Jul 14 '21 at 08:22
  • @PhạmTấnTài Updated the post with App.json . I've also checked info.plist file inside my ipa file. It contains all the permission strings from my infoPlist object. – Habibur Rahman Jul 14 '21 at 15:35
  • 1
    I have gone through the exact same today and yesterday (rejected twice, same reason) when requesting Calendar and Reminder permissions. Very frustrating since the only way to find out if it's working is by submitting yet another new build to Apple. I will now try to change the Expo SDK version for my next build, see if that helps... Will let you know. Please answer your own question in case you find out the solution. – Hacktisch Jul 14 '21 at 18:02

2 Answers2

2

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.

Habibur Rahman
  • 424
  • 7
  • 19
1

I had the exact same situation during the same days that you posted this question. Had my app update rejected twice for the same reason, even though I had the proper texts in the Info.plist.

I actually just decided to open an appeal in the conflict resolution center, responding to the rejection by explaining what had happened. I told them there is probably going something wrong in their testing environment, since I'm not the only one who has this problem (I linked to this question on Stackoverflow, so thank you), and told them I can see the messages when I view the app on my device.

Miraculously, they just accepted my update - the exact same build that was rejected previously!

Hacktisch
  • 1,392
  • 15
  • 33