Hey, so apple just came out of nowhere and sent a big email outlining something like NSPrivacyAccessedAPICategoryFileTimestamp Information, NSPrivacyAccessedAPICategoryDiskSpace and NSFileSystemFreeSize with few other API declaration.
Here's what it means for you as a developer and here is what you can do.
How to release my current appšµāš«
Don't worry till May 1st, Apple doesn't expect you to declare these. In fact, they would just flag the required API declaration and approve your app for now. So pushing to production won't stopš„³
How do I get what are the declarations required before submission on Appstore?
You can run a bash script to check your codebase and dependencies for such API declaration requirements.
Use the following one:
https://github.com/Wooder/ios_17_required_reason_api_scanner/blob/main/required_reason_api_text_scanner.sh
Download the
required_reason_api_scanner_text.sh
file.Go to terminal and go to the directory where this file was downloaded to. Run the following command with your app directory path.
sh required_reason_api_scanner.sh <AppDirectory>
This will give you a list of declarations, in the following format:
Found potentially required reason API usage 'UserDefaults'
in './ViewController.swift' Line numbers: 128
- Search for the API declarations mentioned here:
What's next?
- Go to Xcode (15 and above)
- File -> New -> File
- Search and select the 'App privacy' option
- The default privacy file name is required, do not change that and continue
- Copy the following file, and edit the newly created
PrivacyInfo.xcprivacy
:
<?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>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
</array>
</dict>
</plist>
You're done!
Build your app, sit back and relax.ā±ļø
Top comments (2)
@aishanipach Thanks for such cool information. its really helpful.
I have small query that my project is running on react native and i have upgraded some third party software as well as added some privacy policy but when i again try to run sam script it still shows same third party required to update. May i know how i can generate clean report for it
Kindly check the issue thread for each package if they have added privacy policy for their own SDK or not. For example, MoEngage has added a Privacy Manifest file as mentioned here .