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

fix: ios privacy manifest #1206

Merged
merged 1 commit into from
Apr 15, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/mobile-build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ jobs:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Expo prebuild
run: npx expo prebuild

- name: Fix privacy
run: npx tsx ./packages/scripts/app-build/createPrivacyInfo.ts

- name: Build ios
run: eas build --local --non-interactive --platform=ios

Expand Down
8 changes: 0 additions & 8 deletions app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ const config = {
NSPhotoLibraryUsageDescription:
"Access to your photo library is required for image upload functionality.",
ITSAppUsesNonExemptEncryption: false,
NSPrivacyAccessedAPICategoryDiskSpace:
"To efficiently manage local storage and cache files for improved app performance.",
NSPrivacyAccessedAPICategoryFileTimestamp:
"To track file modification dates for app data synchronization and integrity checks.",
NSPrivacyAccessedAPICategoryUserDefaults:
"To store user preferences and settings locally for a customized user experience.",
NSPrivacyAccessedAPICategorySystemBootTime:
"To optimize app launch times and resource utilization based on system boot information.",
UIBackgroundModes: ["audio"],
},
},
Expand Down
56 changes: 56 additions & 0 deletions packages/scripts/app-build/createPrivacyInfo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import fs from "fs";

const FILE_PATH = "./ios/PrivacyInfo.xcprivacy";

const FILE_CONTENT = `
<?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>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.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>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>E174.1</string>
</array>
</dict>
</array>
</dict>
</plist>
`;

fs.writeFile(FILE_PATH, FILE_CONTENT, "utf8", (err) => {
if (err) {
console.error("Error writing to PrivacyInfo.xcprivacy:", err);
process.exit(1);
} else {
console.log("PrivacyInfo.xcprivacy file created successfully!");
}
});
6 changes: 5 additions & 1 deletion packages/scripts/app-build/fixGitignore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import fs from "fs";

const FILE_PATH = "./.gitignore";

const TO_REMOVE_ITEMS = ["/weshd/ios/Frameworks/", "/weshd/android/libs/"];
const TO_REMOVE_ITEMS = [
"/weshd/ios/Frameworks/",
"/weshd/android/libs/",
"/ios",
];

fs.readFile(FILE_PATH, "utf8", (err, data) => {
if (err) {
Expand Down
Loading