The app's Info.plist must contain an NSContactsUsageDescription key
Asked Answered
H

5

8

I am getting a crash below:

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.

But I have already added the 'Privacy - Contacts Usage Description' key

enter image description here

Hermon answered 18/5, 2018 at 12:24 Comment(2)
Did you try clean and build your project?Forestaysail
I have this problem now on a fresh project. I didn't get an Info.plist when creating the project and adding it seems to make no difference. Cleaning doesn't either.Furnary
C
7

Please check your .plist as a source code and see if your key doesn't contain space at the end like:

<key>NSContactsUsageDescription </key>
Caprine answered 18/5, 2018 at 12:41 Comment(1)
I have this problem on a fresh project. This isn't my problem.Furnary
R
2

Could be that you have accidentally added the key to your UITests target. I've done that a few times with the location privacy keys.

By the way, your contacts usage description "Allow contact access" probably would not pass Apple's review, because it does not state why you want to use them.

Resuscitator answered 18/5, 2018 at 13:5 Comment(0)
A
1

Go To info.plist And

Privacy - Contacts Usage Description

Value : Allow Contact Access For Details

enter image description here

Avouch answered 3/7, 2021 at 15:0 Comment(0)
F
1

I had this problem. There was no Info.plist in a new project and adding it didn't do anything.

Solution:

  • Click project
  • Select Info tab
  • HERE you can add stuff!
Furnary answered 14/1, 2022 at 8:33 Comment(0)
C
0

if you are using App test and and App UItest then there would be multple plist files in your project just make it sure you are adding discription in right if plist

enter image description here

Crandell answered 31/5, 2019 at 7:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.