ashleymills / Reachability.swift

Replacement for Apple's Reachability re-written in Swift with closures
MIT License
7.94k stars 948 forks source link

Missing an expected key: 'NSPrivacyCollectedDataTypes'. #405

Closed kawacho closed 6 months ago

kawacho commented 7 months ago

When I build an app that includes Reachability.swift (5.2.0) and generate a privacy report PDF, the following error message appears in the PDF file

Errors Encountered
Missing an expected key: 'NSPrivacyCollectedDataTypes'. 
${MyAppName}.app/Reachability_Reachability.bundle/PrivacyInfo.xcprivacy

It may be necessary to include other keys in the privacy manifest file.

<?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>NSPrivacyAccessedAPITypes</key>
    <array/>

    <key>NSPrivacyCollectedDataTypes</key>
    <array/>

    :
    :
</dict>
</plist>
lvandal commented 7 months ago

Apple released an update yesterday about this: https://developer.apple.com/news/?id=3d8a9yyh

Starting March 13: If you upload a new or updated app to App Store Connect that uses an API requiring approved reasons, we’ll send you an email letting you know if you’re missing reasons in your app’s privacy manifest. This is in addition to the existing notification in App Store Connect.

Starting May 1: You’ll need to include approved reasons for the listed APIs used by your app’s code to upload a new or updated app to App Store Connect. If you’re not using an API for an allowed reason, please find an alternative. And if you add a new third-party SDK that’s on the list of commonly used third-party SDKs, these API, privacy manifest, and signature requirements will apply to that SDK. Make sure to use a version of the SDK that includes its privacy manifest and note that signatures are also required when the SDK is added as a binary dependency.