Search code examples
iosxcodeprivacy-manifest

Missing an expected key: 'NSPrivacyCollectedDataTypes'


I got the issue in my Policies I don't know why? Even I follow all Instruction that apple provide on their official Page. But could not find any solution here.

I also followed ITMS-91053: Missing API declaration - Privacy on StackOverflow

Here is my PrivacyInfo.xcprivacy file

enter image description here

I download the Privacy Report I shows me that error enter image description here


Solution

  • As the attached photo, your NSPrivacyCollectedDataTypes was empty. You need to provide at least one data type, which is listed here. i.e, You're collecting user email for advertising purpose, it's should be something like:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>NSPrivacyCollectedDataTypes</key>
        <array>
            <dict>
                <key>NSPrivacyCollectedDataType</key>
                <string>NSPrivacyCollectedDataTypeEmailAddress</string>
                <key>NSPrivacyCollectedDataTypeLinked</key>
                <false/>
                <key>NSPrivacyCollectedDataTypeTracking</key>
                <false/>
                <key>NSPrivacyCollectedDataTypePurposes</key>
                <array>
                    <string>NSPrivacyCollectedDataTypePurposeDeveloperAdvertising</string>
                </array>
            </dict>
        </array>
    </dict>
    </plist>
    

    enter image description here