If you're like 99.9999% of other developers, you're using UserDefaults in an app.
And because you do that, you'll see this message when you upload your next build to the App Store.
Here's what to do about it…
If you're like 99.9999% of other developers, you're using UserDefaults in an app.
And because you do that, you'll see this message when you upload your next build to the App Store.
Here's what to do about it…
First, read the documentation:
The section for UserDefaults is the last one (saving the best for last, of course!)
You'll need to add a new file to your Xcode project. Make sure the PrivacyInfo.xcprivacy file is included in the target (so that it can be extracted after you upload to the App Store).
The documentation here explains how to create the file:
https://developer.apple.com/documentation/bundleresources/privacy_manifest_files#4284009
The format of the XML in the file isn't obvious. There's a lot of talk about keys for types and description, but the hierarchy wasn't clear to me.
Here's where I landed on the file: https://gist.github.com/chockenberry/2c1c829dba9c7f34c9a7e8e04335be42
NOTE: This file assumes that you only use UserDefaults in the app. If you're using an app group for an extension or whatever, the “CA92.1" won't fly. Read the docs I mentioned earlier!
Also note that this PrivacyInfo.xcprivacy is only for UserDefaults. You may (and probably!) have other APIs you need to declare.
This is a nice little shell script that helps you find the culprits (before the App Store can complain about them):
https://github.com/Wooder/ios_17_required_reason_api_scanner
A simple shell script collection to scan your Xcode Swift project for required reason API usage to ensure privacy compliance and to simplify the creation of privacy manifests. - Wooder/ios_17_requi...
It sure would have been nice for Apple to document the most widespread use case for privacy.
The motivation here is excellent: it's an effort to reduce the fingerprinting that shithead developers like to do. I'm all for that.
But making me work to figure it all out? And making every other developer who's used UserDefaults do the same thing?
Come on, that's low hanging fruit!
Apple folks: while you're updating these PrivacyInfo.xcprivacy docs, how about putting in some information about how this affects macOS and your other platforms? There's nothing to indicate that it's iOS-only or not at this point.
Also: thanks to @brentsimmons for pointing me in the right direction for a lot of this stuff.
FIN
@jolson @chockenberry
And Rotten Fruit cares about your mood why?
Any indications over the last couple of years that Apple ever cared for its developer chattel?
(A couple of people have pointed out to me that Apple is not a classical case of #enshitification because, well, they simply never cared for their business partners.)