ITMS-91053: privacy manifest question about PrivacyInfo.xcprivacy
-
ITMS-91053: Missing API declaration - Your app’s code in the “app name” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryFileTimestamp. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage.
We could directly add this file? or QT Creator generates? thanks .
-
Adding PrivacyInfo.xcprivacy to your 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 needs 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 usingCMake
please adjust your instructions (if you are then a follow-up withCMake
instructions would be beneficial to all)Note that I have
ios
andmacos
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/placing_content_in_a_bundle