iosswiftprivacy-manifest

NSPrivacyAccessedAPICategorySystemBootTime: Invalid API category + Missing API declaration


I have an app that when submitting to the app store receives two warnings:

  1. ITMS-91054: Invalid API category declaration - The PrivacyInfo.xcprivacy for the “YYY” file contains “System Boot Time” as the value for a NSPrivacyAccessedAPIType key, which is invalid.
  2. ITMS-91053:Missing API declaration - Your app’s code in the “YYY” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategorySystemBootTime.

There is also the same warning about one of the files in the project: ITMS-91054: Invalid API category declaration - The PrivacyInfo.xcprivacy for the “build_wireguard_go_bridge.pl” file contains “System Boot Time” as the value for a NSPrivacyAccessedAPIType key, which is invalid.

I tried to submit an app three times with different variants of NSPrivacyAccessedAPITypeReasons for “System Boot Time” but received the same warning each time.

Current PrivacyInfo content:

<key>NSPrivacyCollectedDataTypes</key>
    <array>
        <dict>
            <key>NSPrivacyCollectedDataType</key>
            <string>NSPrivacyCollectedDataTypeCrashData</string>
            <key>NSPrivacyCollectedDataTypeLinked</key>
            <false/>
            <key>NSPrivacyCollectedDataTypeTracking</key>
            <false/>
            <key>NSPrivacyCollectedDataTypePurposes</key>
            <array>
                <string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
            </array>
        </dict>
    </array>
    <key>NSPrivacyAccessedAPITypes</key>
    <array>
        <dict>
            <key>NSPrivacyAccessedAPIType</key>
            <string>NSPrivacyAccessedAPICategoryActiveKeyboards</string>
            <key>NSPrivacyAccessedAPITypeReasons</key>
            <array>
                <string>54BD.1</string>
            </array>
        </dict>
        <dict>
            <key>NSPrivacyAccessedAPIType</key>
            <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
            <key>NSPrivacyAccessedAPITypeReasons</key>
            <array>
                <string>CA92.1</string>
            </array>
        </dict>
        <dict>
            <key>NSPrivacyAccessedAPIType</key>
            <string>System Boot Time</string>
            <key>NSPrivacyAccessedAPITypeReasons</key>
            <array>
                <string>8FFB.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>NSPrivacyAccessedAPICategoryFileTimestamp</string>
            <key>NSPrivacyAccessedAPITypeReasons</key>
            <array>
                <string>C617.1</string>
            </array>
        </dict>
    </array>

What do you think I should add to the PrivacyInfo to suppress these warnings?


Solution

  • <dict>
        <key>NSPrivacyAccessedAPIType</key>
        <string>System Boot Time</string>
        <key>NSPrivacyAccessedAPITypeReasons</key>
        <array>
          <string>8FFB.1</string>
        </array>
    </dict>
    

    System Boot Time is wrong, it should be NSPrivacyAccessedAPICategorySystemBootTime.

    As you can see, all the other ones start with NSPrivacyAccessedAPICategory...

    When opened by Xcode as "Property List", it's interpreted and human readable shown as System Boot Time, but the real value is indeed NSPrivacyAccessedAPICategorySystemBootTime. Replace the correct value in the Plist when opened as source code, or rewrite it in "Property List" mode, but let Xcode autocomplete help you.