Apple is introducing a privacy policy that requires the inclusion of a privacy manifest file in new and updated apps created for iOS, iPadOS, tvOS and VisionOS distributed through the AppStore. Obviously, this impacts the iOS and iPadOS apps created with Xojo that you intend to update or submit and distribute through the Apple AppStore.
Such a manifest (PrivacyInfo.xcprivacy) will be mandatory for submitted apps beginning May, 1 2024. It must provide entries for each of the Privacy categories required by Apple based on the use (calls) of some specified APIs.
As of today, the Xojo iOS framework meets these categories:
- File timestamp APIs- Used by the FolderItem class
- System boot time APIs- Used in a general matter and specifically also by Threads
- User defaults APIs- Used to get general information, for example the use of Capitalization
In addition, other libraries or plug-ins you may be using in the development of your iOS app can meet other requirements listed by Apple. It is important to be sure of the API calls they could be making under the hood. If the Required Reasons APIs are not declared in the privacy manifest, then the app might be rejected in the AppStore reviewing process.
There is already a Issues case to integrate the privacy manifest file in a future release of Xojo. Here are the steps required in order to create and add that file manually to your Xojo iOS projects.
Create a PrivacyInfo.xcprivacy File
Open Xcode 15 and select File > New > File
- Select the iOS category in the panel and go to the Resources section to choose the App Privacy entry. Confirm the selection by clicking the OK button.
- Select the destination Folder; for example the place where you put your other iOS app resources.
- Once the file is saved, a new Editor window will appear in Xcode for the PrivacyInfo.xcprivacy file. This XML file will already have a new key on it: App Privacy Configuration
- Select that entry and click the plus button to the right.
- In the popupmenu, select the Privacy Accessed API Types entry.
- Select the Item 0 entry that is hanging from Privacy Accessed API Types and click the plus button.
- Select the Privacy Accessed API Type entry from the popupmenu as the Key, and File Timestamp as its value.
- Again select item 0 and click the plus button, now selecting the Privacy Accessed API Reasons entry.
- Select the Item 0 entry hanging from Privacy API Reasons and select “C617.1…” as the value.
- Select the Privacy Accessed API Types and click the plus button in order to add a new entry below it.
- Repeat the steps from 6 to 10 in order to add new Privacy Accessed API Type entries (assigning a different value), and new Privacy Accessed API Reasons (also with new values for its hanging Item 0 entry).
At the end, the file should have three Privacy Accessed API Types entries whose Keys / Values should look like the ones shown in the following screenshot:
Of course, in case your app meets additional Categories / Reasons because of the use of libraries and/or plug-ins, then you need to add those to the manifest too.
Adding the PrivacyInfo.xcprivacy File to a Xojo Project
With the PrivacyInfo.xcprivacy file created, add it to your Xojo project and, once the app is built, it will be automatically added to the root folder of the compiled iOS app.
If you prefer, this can also be done by adding a new Copy File build step to the iOS app. Just make sure the PrivacyInfo.xcprivacy file is applied to the Release option in the field “Applies to” and select App Parent Folder as the Destination.
Thank you to John Balestrieri for pointing this out in the Xojo Forum!
Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón, Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at @XojoES or on the Xojo Forum.