Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add docs for the new iOS 17+ privacy requirements #215

Merged
merged 1 commit into from Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/.vuepress/guide.json
Expand Up @@ -1071,8 +1071,8 @@
]
},
[
"Titanium_SDK_How-tos/Migrate_a_Titanium_Application_to_the_Platform",
"Migrate a Titanium Application to the Platform"
"Titanium_SDK_How-tos/Adhere_to_the_iOS17_Privacy_Requirements",
"Adhere to the iOS 17+ Privacy Requirements"
],
{
"title": "Titanium Boilerplates",
Expand Down
@@ -0,0 +1,42 @@
---
title: Adhere to the iOS 17+ Privacy Requirements
weight: '140'
---

# Adhere to the iOS 17+ Privacy Requirements

## Overview

In iOS 17, Apple added some new requirements to protect users from being targeted by finger-printing, a technique
to uniquely identify a device even after a reinstall. Bad players used several APIs that are now being flagged when used.

There are currently five categories that are flagged:

- **File timestamp APIs**: APIs around file system monitoring, e.g. timestamps.
- **System boot time APIs**: APIs around uptime of the device.
- **Disk space APIs**: APIs about the remaining space on the device.
- **Active keyboard APIs**: APIs about active input modes.
- **User defaults APIs**: APIs around storing key-value data across app launches.

Some of the APIs used in Titanium are affected by these changes, e.g. `Ti.Filesystem.File.createdAt` and `Ti.App.Properties` / `Ti.App.iOS.UserDefaults`.
When using these APIs, you need to declare the reason(s) for using them inside a new `PrivacyInfo.xcprivacy` file that can be edited inside Xcode.

## Required Steps

### Existing Apps

For existing apps, you can download the default [PrivacyInfo.xcprivacy here](./PrivacyInfo.xcprivacy) and place them into the following folder:

- Alloy apps: app/assets/iphone/
- Classic apps: Resources/iphone/

That's it! The Titanium build does the rest for you.

### New Apps

For new apps built with Titanium SDK 12.4.0 and later, the default PrivacyInfo.xcprivacy file is generated automatically for you.

## More Details

- [Apple: Privacy manifest files](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files?language=objc)
- [Apple: Describing use of required reason API](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api)

This file was deleted.

17 changes: 17 additions & 0 deletions docs/guide/Titanium_SDK/Titanium_SDK_How-tos/PrivacyInfo.xcprivacy
@@ -0,0 +1,17 @@
<?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>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>AC6B.1</string>
</array>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
</dict>
</array>
</dict>
</plist>