0

What steps to take to resolve following error related to missing PrivacyInfo:

The archive does not contain any "PrivacyInfo.xcprivacy" files.

This happens when I try to Generate Privacy Report on the archive.

Steps taken to define Privacy Manifest and debug this error:

  • Defined the PrivacyInfo.xcprivacy and ensured it loading correctly in the Xcode 15 beta 5.
  • Added PrivacyInfo.xcprivacy to same location as Info.plist - Screenshot added below:
  • Ensured the target membership of PrivacyInfo.xcprivacy to frameworks.
  • Archive the framework and also use command line to create distribution .xcframework - receiving the error with archive and unable to see .xcprivacy file in the .xcframework (next question).

Will this PrivacyInfo.xcprivacy file be locatable in the archive or final .xcframework content on the same level as Info.plist? If yes, where to find it?

For reference, Apple Developer - Privacy manifest files, doesn't mention any other specific steps for Framework. Here is the WWDC-2023 video: WWDC-2023 Privacy Menifest, which illustrates various steps.

Location of PrivacyInfo

Privacy-Info-XCPrivacy-file-location

ashokds
  • 2,204
  • 1
  • 7
  • 11
  • Linking the same issue, following the suggestions on it: https://developer.apple.com/forums/thread/731541 – ashokds Aug 30 '23 at 18:42

1 Answers1

0

Details of debugging with Xcode 15 Beta 8

Note: The current SDK project has two targets - RestSDK.framework and RestAPI.framework. This could be interfering with inclusion of Privacy Manifest (PrivacyInfo.xcprivacy).

In order to narrow down the issue, took following debugging steps:

  1. Installed latest beta 8 Version 15.0 beta 8 (15A5229m)
  2. Removed old xcprivacy file and added a new with Command-n -> Resource -> App Privacy. Removed all entires but 1 in the new Privacy Manifest and added NSPrivacyTracking as false. Here is how it looks:
<dict>
    <key>NSPrivacyTracking</key>
    <false/>
    <key>NSPrivacyCollectedDataTypes</key>
    <array>
        <dict>
            <key>NSPrivacyCollectedDataType</key>
            <string>NSPrivacyCollectedDataTypeUserID</string>
            <key>NSPrivacyCollectedDataTypeLinked</key>
            <true/>
            <key>NSPrivacyCollectedDataTypeTracking</key>
            <false/>
            <key>NSPrivacyCollectedDataTypePurposes</key>
            <array>
                <string>NSPrivacyCollectedDataTypePurposeProductPersonalization</string>
            </array>
        </dict>
    </array>
</dict
  1. Add the target membership to both RestSDK.framework & RestAPI.framework (first test), and run the command to create archive: Noticed following log on console for RestAPI.framework.
Copying /Users/***/Library/Developer/Xcode/DerivedData/RestSDK-ezfmhpxprnhniqcyumuohtkeojih/Build/Intermediates.noindex/ArchiveIntermediates/RestSDK/InstallationBuildProductsLocation/Library/Frameworks/RestAPI.framework/PrivacyInfo.xcprivacy

and not a similar log for RestSDK.framework.

  1. Removed the RestAPI.framework target membership of PrivacyInfo.xcprivacy. Keeping target membership only for RestSDK.framework. Triggered the archive build with command line and noticed following:
Copying /Users/***/Library/Developer/Xcode/DerivedData/RestSDK-ezfmhpxprnhniqcyumuohtkeojih/Build/Intermediates.noindex/ArchiveIntermediates/RestSDK/InstallationBuildProductsLocation/Library/Frameworks/RestSDK.framework/PrivacyInfo.xcprivacy
  1. Tried Generate Privacy Report and still the same result: The archive does not contain any PrivacyInfo.xcprivacy files.. Even though, RestSDK.framework under iOS.xcarchive contains PrivacyInfo.xcprivacy ?!! XCPrivacy file in built SDK archive
  2. [Stuck] - Perhaps, I need to add some other keys.
HangarRash
  • 7,314
  • 5
  • 5
  • 32
ashokds
  • 2,204
  • 1
  • 7
  • 11