Adding PrivacyInfo.xcprivacy to you iOS/macOS App
NOTES
NOTE : Your post does not tell me if you're trying to release for iOS or macOS - hopefully this addresses both
NOTE : I found this same issue late last night. I've coded what you will see below but as it is a long weekend at Apple HQ I'm still waiting for my app to be reviewed. I will update if these instructions need changing.
As of May 1st 2024 Apple require your application to identify the reasons that various OS features are used. This is mostly to deter the use of information such as boot time and file system statistics to fingerprint users without their permission.
One need to create a PrivacyInfo.xcprivacy file and place it in your app bundle. This file is an XML file in PLIST format (XML not binary).
Essentially the file has the same content on both platforms but the app bundle location is different.
iOS : PrivacyInfo.xcprivacy files is located in the bundle root
macOS : PrivacyInfo.xcprivacy files is located in Content/Resources
My project still uses qmake (for a lot of reasons). If you're usig CMake please adjust your instructions (if you are then a follow-up with CMake instructions would be beneficial to all)
Note that I have ios and macos folders under my project root that contain platform specific files.
Add this code to your qmake files..
ios {
app_privacy_declarations.files = $$files($$PWD/ios/PrivacyInfo.xcprivacy)
QMAKE_BUNDLE_DATA += app_privacy_declarations
}
NOTE is have not tested this macoS as I have not released a macOS application yet.
macx {
app_privacy_declarations.path = Contents/Resources
app_privacy_declarations.files = $$files($$PWD/macos/Contents/Resources/PrivacyInfo.xcprivacy)
QMAKE_BUNDLE_DATA += app_privacy_declarations
}
Here is my PrivacyInfo.xcprivacy file. I will admit I don't quite understand the root cause for all the warnings. Some are, clearly, from Qt's libraries whereas others are from my purchasing library. As long as we obey "the letter of the law" in terms of Apple's rules on fingerprinting and taking data off device we will be fine.
<?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>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>E174.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
</array>
</dict>
</plist>
LINKS
Please find additional content on the Apple website
https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api
https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle