ioscocoapodsprivacy-manifest

Adding Privacy Manifest to CocoaPods iOS SDK


I have a SDK distributed as XCFramework via cocoapods. I have added the PrivacyInfo file in the Resource folder and specify in the podspec as below.

s.resource_bundles = {"MyFramework_Privacy" => ["Resources/PrivacyInfo.xcprivacy"]}

Also verified that PrivacyInfo file has been copied in to different arch folders in XCframework

enter image description here

However when the consumer app use our SDK and were notified by Apple that they need to provide usage reasons for the required reason APIs and I am not sure why the PrivacyInfo.xcprivacy file that we have shipped not been considered. Any idea please?

Filetree structure

enter image description here

PrivacyInfo file

enter image description here


Solution

  • So far, Apple's warning emails have only included the app itself and the app extensions.

    Apple also recently added page that has instructions for including manifests with static libraries. https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/adding_a_privacy_manifest_to_your_app_or_third-party_sdk

    From your screenshot, the PrivacyInfo.xcprivacy is missing 2 of the 4 required entries. That may be why there are issues with Apple detecting and using it.

    The four entries from https://developer.apple.com/documentation/bundleresources/privacy_manifest_files

    NSPrivacyTracking
    NSPrivacyTrackingDomains
    NSPrivacyCollectedDataTypes
    NSPrivacyAccessedAPITypes