Where to place the PrivacyInfo.xcprivacy file

Hello

I am using the ionicframework online tool builder. So I upload to Github a minimal amount of files, basically some config files and all files inside /src.

As I am not using XCode or Visual Studio, I don´t know where should I place PrivacyInfo.xcprivacy file.

I have tried at root and in /ios folder but when I download the xcarchive, I don´t find it inside, so I think that the system is not recognizing it when gets the code from GitHub.

How should I proceed?

Thanks.

Sadly placing the file in a folder is not enough, native projects have references to the files, so only moving a file inside the project does nothing as there is no reference to it.

If you don’t use Xcode, or VS Code you’ll have to use some node package such as node-xcode to copy files to the native project and create the references to it.

Thank you very much for your answer.

I thought Apple would simply check to see if the file exists. Now I understand that another configuration file must point to this file.

I have opened that folder with VSCode, installed the Ionic Extension, installed the node_modules, installed JDK 21, migrated to Capacitor 6 using the extension… ok, but…

According to Privacy Manifest | Capacitor Documentation I should have two ways to create it.

  1. “Under recommendations you will see Add Privacy Manifest”: That option does not appear. Maybe because no plugin requires it. But I do want to put the file in anyway since I request the user’s name and email among other information.

  2. “Manual Steps”: When I want to create a new file, the type “App Privacy File” is not proposed.

So I find myself at a dead end again.

Do you have an advice, please?

You can add one of the plugins that trigger the creation of the file and then remove it after you have created the file.

For the manual steps, which Xcode version are you using? you probably need Xcode 15 to have that option available.

Hi Mobile App,
Considering the recent policy updates from Apple app store regarding the use of required reason for APIs used in our iOS app. Warning from Apple: We have received warnings from Apple regarding missing API declarations in their recent app submissions. These warnings highlight the necessity for us to adhere to Apple’s guidelines regarding privacy manifest files.
Action Required:
Starting May 1, 2024, all new app submissions or updates must include a NSPrivacyAccessedAPITypes array in the app’s privacy manifest, detailing approved reasons for the usage of certain APIs. This is crucial for ensuring compliance with Apple’s policies and maintaining user trust.
Solution: Here is the solution to streamline the process of configuring the app’s privacy manifest for iOS submissions. Cordova iOS 7.1.0 introduces enhanced support for privacy manifest files. Here’s what we need to do.
Privacy Manifest Template: Cordova now provides a blank privacy manifest file, PrivacyInfo.xcprivacy, which can be configured directly from your config.xml. Configuration Support: we can now define privacy manifest configurations within our config.xml file, streamlining the process of incorporating privacy details into app submissions.
Configuration (sample) :

 <platform name="ios">....
<privacy-manifest>
    <key>NSPrivacyAccessedAPITypes</key>
    <array>
      <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>
      <dict>
        <key>NSPrivacyAccessedAPIType</key>
        <string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
        <key>NSPrivacyAccessedAPITypeReasons</key>
        <array>
          <string>C617.1</string>
        </array>
      </dict>
    </array>
  </privacy-manifest>
 </platform>

Ensure that we update our *config.xml* file with the necessary privacy manifest configurations, reflecting the specific APIs used in our app. Refer to Apple’s Developer Documentation for detailed guidance on these parameters.

References:

  1. Cordova 7.1.0
  2. Apple privacy manifest
  3. Apple Describing use of required reason API