diff --git a/.github/workflows/mobile-build-ios.yml b/.github/workflows/mobile-build-ios.yml index 8d804e5744..80b35fe7aa 100644 --- a/.github/workflows/mobile-build-ios.yml +++ b/.github/workflows/mobile-build-ios.yml @@ -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 diff --git a/app.config.js b/app.config.js index a5439c74fc..4c15a00f6d 100644 --- a/app.config.js +++ b/app.config.js @@ -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"], }, }, diff --git a/packages/scripts/app-build/createPrivacyInfo.ts b/packages/scripts/app-build/createPrivacyInfo.ts new file mode 100644 index 0000000000..998afed3bb --- /dev/null +++ b/packages/scripts/app-build/createPrivacyInfo.ts @@ -0,0 +1,56 @@ +import fs from "fs"; + +const FILE_PATH = "./ios/PrivacyInfo.xcprivacy"; + +const FILE_CONTENT = ` + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryDiskSpace + NSPrivacyAccessedAPITypeReasons + + E174.1 + + + + + +`; + +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!"); + } +}); diff --git a/packages/scripts/app-build/fixGitignore.ts b/packages/scripts/app-build/fixGitignore.ts index 9167360b16..115ce5e1b9 100644 --- a/packages/scripts/app-build/fixGitignore.ts +++ b/packages/scripts/app-build/fixGitignore.ts @@ -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) {