PrivacyInfo.xcprivacy for Widget

94 Views Asked by At

I've a PrivacyInfo.xcprivacy for my app and it works well. The warnings when uploading are gone. Here's how it looks like:

<?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>NSPrivacyAccessedAPICategoryDiskSpace</string>
            <key>NSPrivacyAccessedAPITypeReasons</key>
            <array>
                <string>85F4.1</string>
            </array>
        </dict>
        <dict>
            <key>NSPrivacyAccessedAPIType</key>
            <string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
            <key>NSPrivacyAccessedAPITypeReasons</key>
            <array>
                <string>0A2A.1</string>
            </array>
        </dict>
        <dict>
            <key>NSPrivacyAccessedAPIType</key>
            <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
            <key>NSPrivacyAccessedAPITypeReasons</key>
            <array>
                <string>1C8F.1</string>
            </array>
        </dict>
    </array>
</dict>
</plist>

However, I was unable to remove warnings attributed to the widget target of my app. Tried to add another privacy info file to the widget target and that didn't help. Anyone with a Widget has managed to resolve this?

Thank you.

1

There are 1 best solutions below

0
Kjuly On

If your XXXWidget and XXXWidgetIntents both access privacy APIs, you need to add two PrivacyInfo.xcprivacy files for them.

I also checked the widget targets when adding "PrivacyInfo.xcprivacy". As the screenshot shown below:

screenshot

Or you can check the "Build Phases - Copy Bundle Resources" of Widget & WidgetIntents to see if the PrivacyInfo.xcprivacy file is included.

enter image description here

I'm not quite sure if this is necessary (i.e., adding "PrivacyInfo.xcprivacy" as a resource file), but I don't get the warning email anymore. Hope it helps.