Search code examples
iosreact-nativeexpoapp-storeinfo-plist

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


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.


Solution

  • 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.