using infoPlist in app.json for expo project seems to not be working

26 views Asked by At

I am getting a new error today when I try to access contacts in my react-native app that has been built using expo

This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSContactsUsageDescription key with a string value explaining to the user how the app uses this data.

I have 'NSContactsUsageDescription' defined in my app.json file in the infoPlist section. Has something changed for this to be used recently? I tried blowing away my node_modules, yarn lock and the ios file to rebuild, but this error still happens. I found a similar post here in stack overflow regarding location data - but there are no answers or suggestions for it. Any thoughts on what I might be doing wrong?

Here is my app.json file

{ "expo": { "name": "Drinklink", "slug": "Drinklink", "privacy": "unlisted", "version": "1.0.29", "orientation": "portrait", "icon": "./assets/mainIcon.png", "scheme": "com.drinklink.dev", "userInterfaceStyle": "automatic", "splash": { "image": "./assets/DrinkLink_Logo-WhiteYellow.png", "resizeMode": "contain", "backgroundColor": "#000000" }, "updates": { "url": "https://u.expo.dev/ae5d9b3c-56b3-4849-bccf-5cc2bb3a4c78", "fallbackToCacheTimeout": 0 }, "assetBundlePatterns": [ "**/*" ], "ios": { "supportsTablet": true, "bundleIdentifier": "com.drinklink.dev", "buildNumber": "1.0.29", "infoPlist": { "NSContactsUsageDescription": "Drinklink uses your contacts to make it easier to find your friends to buy drinks for. This data is never saved or used elsewhere." } }, "android": { "package": "com.drinklink.dev", "adaptiveIcon": { "foregroundImage": "./assets/DrinkLink_Icon-white.png", "backgroundColor": "#000000" }, "versionCode": 29, "versionName": "1.0.29", "permissions": [ "android.permission.RECORD_AUDIO", "android.permission.READ_CONTACTS", "android.permission.WRITE_CONTACTS" ] }, "runtimeVersion": { "policy": "sdkVersion" }, "extra": { "eas": { "projectId": "ae5d9b3c-56b3-4849-bccf-5cc2bb3a4c78" } }, "plugins": [ [ "expo-image-picker", { "photosPermission": "The app accesses your photos to allow you to set a profile picture. This makes it easier for them to identify you. It is only ever used for this single purpose.", "cameraPermission": "The app accesses your camera to allow you to set a profile picture. This makes it easier for them to identify you. It is only ever used for this single purpose." } ], [ "expo-contacts", { "contactsPermission": "Drinklink uses your contacts to make it easier to find your friends to buy drinks for. This data is never saved or used elsewhere." } ] ] } }

Sorry - it isn't formatting that json nicely for some reason.

0

There are 0 answers