From 74caec446b0e507d7514eb969f7b5d04653aa2ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Sundstr=C3=B6m?= Date: Fri, 23 Aug 2024 16:03:12 +0200 Subject: [PATCH] DISTS: Add PrivacyInfo.xcprivacy to ios7 and tvos Apple will require a valid privacy manifest file bundled for applications uploaded to App Store Connect. The privacy manifest describes the privacy practices of an app, describing the reasons of use of some core APIs that can be misused to try to identify the device or user, also known as fingerprinting. Read more about which APIs that require a privacy manifest here: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api Add such manifest to ios7 and tvos ports and make sure they are bundled with the app. --- devtools/create_project/xcode.cpp | 8 ++++++++ dists/ios7/PrivacyInfo.xcprivacy | 33 +++++++++++++++++++++++++++++++ dists/tvos/PrivacyInfo.xcprivacy | 33 +++++++++++++++++++++++++++++++ ports.mk | 2 ++ 4 files changed, 76 insertions(+) create mode 100644 dists/ios7/PrivacyInfo.xcprivacy create mode 100644 dists/tvos/PrivacyInfo.xcprivacy diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index 8d9df77f51c..15c3cc0e54f 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -167,6 +167,10 @@ bool shouldSkipFileForTarget(const std::string &fileID, const std::string &targe if (name.length() > 4 && name.substr(0, 4) == "ios-") { return true; } + // macOS target: we skip the xcprivacy file required for iOS and tvOS targets + if (ext == "xcprivacy") { + return true; + } // parent directory const std::string directory = fileID.substr(0, fileID.length() - fileName.length()); static const std::string iphone_directory = "backends/platform/ios7"; @@ -300,7 +304,9 @@ XcodeProvider::XcodeProvider(StringList &global_warnings, std::map + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + + diff --git a/dists/tvos/PrivacyInfo.xcprivacy b/dists/tvos/PrivacyInfo.xcprivacy new file mode 100644 index 00000000000..1a959b24822 --- /dev/null +++ b/dists/tvos/PrivacyInfo.xcprivacy @@ -0,0 +1,33 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + + diff --git a/ports.mk b/ports.mk index 01079711511..1afc5ab7bcc 100644 --- a/ports.mk +++ b/ports.mk @@ -361,6 +361,7 @@ endif cp $(srcdir)/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2208x1242.png $(bundle_name)/LaunchImage-800-Landscape-736h@3x.png cp $(srcdir)/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-750x1334.png $(bundle_name)/LaunchImage-800-667h@2x.png cp $(srcdir)/dists/ios7/Assets.car $(bundle_name)/Assets.car + cp $(srcdir)/dists/ios7/PrivacyInfo.xcprivacy $(bundle_name)/PrivacyInfo.xcprivacy codesign -s - --deep --force $(bundle_name) tvosbundle: scummvm-static-ios @@ -436,6 +437,7 @@ endif chmod 755 scummvm cp scummvm $(bundle_name)/ScummVM cp -r $(srcdir)/dists/tvos/Assets.car $(bundle_name)/Assets.car + cp $(srcdir)/dists/tvos/PrivacyInfo.xcprivacy $(bundle_name)/PrivacyInfo.xcprivacy codesign -s - --deep --force $(bundle_name) ifndef WITHOUT_SDL