diff --git a/App.tsx b/App.tsx index 186e5406a..2a9fb69e7 100644 --- a/App.tsx +++ b/App.tsx @@ -42,6 +42,7 @@ import { privySecureStorage } from "./utils/keychain/helpers"; import { initSentry } from "./utils/sentry"; import "./utils/splash/splash"; import "./features/notifications/utils"; +import { setupAppAttest } from "@utils/appCheck"; LogBox.ignoreLogs([ "Privy: Expected status code 200, received 400", // Privy @@ -65,6 +66,10 @@ const App = () => { const styles = useStyles(); const debugRef = useRef(); + useEffect(() => { + setupAppAttest(); + }, []); + useCoinbaseWalletListener(true, coinbaseUrl); useEffect(() => { diff --git a/README.md b/README.md index d5ae16091..febb122e2 100644 --- a/README.md +++ b/README.md @@ -49,11 +49,13 @@ Until then Converse web will only show 1 to 1 conversations and the majority of Web support is an end goal and the team is happy to fix any issues that are reported ### Install JS/React Native Dependencies + ``` yarn ``` ### Building the Web App + ``` yarn start ``` @@ -72,6 +74,7 @@ yarn start ``` # Linting + ``` yarn lint ``` @@ -79,6 +82,7 @@ yarn lint # Testing ## Running Jest tests + Before running the tests make sure that you have a `.env` file setup with the variables variable set ```sh @@ -88,6 +92,7 @@ yarn test ## Running Performance Tests Capture baselines for performance tests + ```sh yarn test:perf:baseline ``` @@ -95,6 +100,7 @@ yarn test:perf:baseline Make changes to the code to see the performance impact Run the performance tests again to see the changes + ```sh yarn test:perf ``` @@ -103,22 +109,22 @@ yarn test:perf Frames are expected to follow the Open Frames Standard https://github.com/open-frames/standard - - # Release Processes ### Main Branch + Represents the current production code. ### Release Branches + Each release branch is based off of `main` or the release branch before it. It is used to prepare and stabilize the code for a specific release version (e.g., `release/2.0.8`). ### Feature Branches + Feature branches are longer-lived features or refactors expected to take additional time. They should be based off of the targeted feature release branch. This structure allows code to flow **from `main` to release branches to feature branches**. - ![Merge Diagram](docs/image.png) --- @@ -128,6 +134,7 @@ This structure allows code to flow **from `main` to release branches to feature Assuming your branch is `feature/scw`, and your feature is targeted for release `2.1.0`, follow these steps to rebase: 1. First, checkout the feature branch: + ```bash git fetch origin git branch feature/scw -D @@ -141,7 +148,9 @@ Assuming your branch is `feature/scw`, and your feature is targeted for release ``` ### Exceptions + There are certain times where this flow does not work as intended. For example: -* Build scripts: These may need to be run off of the default main branch instead of feature or release branches. -* Read me updates: These are not required to be on a branch and can be committed directly to main. -* Bug fixes that can be OTA updated: These can be committed directly to main to perform an OTA update. + +- Build scripts: These may need to be run off of the default main branch instead of feature or release branches. +- Read me updates: These are not required to be on a branch and can be committed directly to main. +- Bug fixes that can be OTA updated: These can be committed directly to main to perform an OTA update. diff --git a/app.config.ts b/app.config.ts index f7fac77c6..a0af81a26 100644 --- a/app.config.ts +++ b/app.config.ts @@ -33,19 +33,24 @@ export default ({ config }: ConfigContext): ExpoConfig => ({ }, version: appBuildNumbers.expo.version, assetBundlePatterns: ["**/*"], + plugins: ["@react-native-firebase/app-check"], ios: { supportsTablet: true, buildNumber: appBuildNumbers.expo.ios.buildNumber, + bundleIdentifier: "com.converse.dev", config: { usesNonExemptEncryption: false, }, }, android: { + package: "com.converse.dev", adaptiveIcon: { foregroundImage: "./assets/adaptive-icon.png", backgroundColor: "#FFFFFF", }, versionCode: appBuildNumbers.expo.android.versionCode, + // TODO(lustig): dynamically set this based on env in Android PR for AppCheck + // googleServicesFile: "./android/google-services.json", }, web: { favicon: "./assets/favicon.png", diff --git a/config.ts b/config.ts index 3f66f4fa9..e403c4c57 100644 --- a/config.ts +++ b/config.ts @@ -70,6 +70,9 @@ const ENV = { ), alphaGroupChatUrl: "https://converse.xyz/group-invite/UDv3aYZONQGc6_XPJY6Ch", + appCheckDebugToken: isAndroid + ? undefined + : process.env.EXPO_PUBLIC_FIREBASE_APP_CHECK_DEBUG_TOKEN_IOS, }, preview: { ...defaultConfig, @@ -88,6 +91,7 @@ const ENV = { ].flatMap((domain) => [`https://${domain}`, `http://${domain}`, domain]), alphaGroupChatUrl: "https://converse.xyz/group-invite/eQAvo-WvwrdBTsHINuSMJ", + appCheckDebugToken: undefined, }, prod: { ...defaultConfig, @@ -121,10 +125,11 @@ const ENV = { }, alphaGroupChatUrl: "https://converse.xyz/group-invite/eQAvo-WvwrdBTsHINuSMJ", + appCheckDebugToken: undefined, }, } as const; -const getConfig = () => { +export const getConfig = () => { if (__DEV__) { return ENV.dev; } else if (Constants.expoConfig?.extra?.ENV === "preview") { diff --git a/dependencies/Environment/Flavors/determineFlavor.utils.ts b/dependencies/Environment/Flavors/determineFlavor.utils.ts index 7c33358db..e0eecbe4a 100644 --- a/dependencies/Environment/Flavors/determineFlavor.utils.ts +++ b/dependencies/Environment/Flavors/determineFlavor.utils.ts @@ -1,6 +1,7 @@ import { DependencyFlavor, DependencyFlavors } from "./flavors.type"; export function determineDependencyFlavor(): DependencyFlavor { + // @ts-ignore if (typeof jest !== "undefined" || process.env.JEST_WORKER_ID !== undefined) { return DependencyFlavors.jest; } diff --git a/eas.json b/eas.json index f60f8ad04..038a06278 100644 --- a/eas.json +++ b/eas.json @@ -8,9 +8,6 @@ "developmentClient": true, "distribution": "internal", "channel": "development", - "env": { - "EXPO_ENV": "dev" - }, "node": "20.15.1", "ios": { "cocoapods": "1.14.3" diff --git a/features/conversation/conversation-message/conversation-message-sender-avatar.tsx b/features/conversation/conversation-message/conversation-message-sender-avatar.tsx index 7d4af0198..a588bba9f 100644 --- a/features/conversation/conversation-message/conversation-message-sender-avatar.tsx +++ b/features/conversation/conversation-message/conversation-message-sender-avatar.tsx @@ -2,14 +2,14 @@ import Avatar from "@components/Avatar"; import { useCallback, useMemo } from "react"; import { StyleSheet, TouchableOpacity, View } from "react-native"; -import { usePreferredInboxAddress } from "@hooks/usePreferredInboxAddress"; -import { usePreferredInboxName } from "@hooks/usePreferredInboxName"; -import { useInboxProfileSocialsQuery } from "@queries/useInboxProfileSocialsQuery"; import { useAppTheme } from "@theme/useAppTheme"; import { InboxId } from "@xmtp/react-native-sdk"; import { useCurrentAccount } from "../../../data/store/accountsStore"; import { navigate } from "../../../utils/navigation"; import { getPreferredInboxAvatar } from "../../../utils/profile"; +import { usePreferredInboxAddress } from "@/hooks/usePreferredInboxAddress"; +import { usePreferredInboxName } from "@/hooks/usePreferredInboxName"; +import { useInboxProfileSocialsQuery } from "@/queries/useInboxProfileSocialsQuery"; type MessageSenderAvatarDumbProps = { // hasNextMessageInSeries: boolean; diff --git a/ios/Converse.xcodeproj/project.pbxproj b/ios/Converse.xcodeproj/project.pbxproj index a042fea5d..5924fb6a6 100644 --- a/ios/Converse.xcodeproj/project.pbxproj +++ b/ios/Converse.xcodeproj/project.pbxproj @@ -3,13 +3,16 @@ archiveVersion = 1; classes = { }; - objectVersion = 54; + objectVersion = 60; objects = { /* Begin PBXBuildFile section */ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 15EBCA4A2D13414100241032 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 15EBCA492D13414100241032 /* GoogleService-Info.plist */; }; + 15EBCA4B2D13414100241032 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 15EBCA492D13414100241032 /* GoogleService-Info.plist */; }; + 19BACCA5A8C482ED4B85F4AE /* Pods_Converse.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E14C537DB575FE9167DE049A /* Pods_Converse.framework */; }; 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; }; 4C2440D02A9C8BE8004F31A3 /* Keychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C2440CF2A9C8BE8004F31A3 /* Keychain.swift */; }; 4C2440D22A9C8C5A004F31A3 /* Datatypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C2440D12A9C8C5A004F31A3 /* Datatypes.swift */; }; @@ -28,12 +31,11 @@ 4CFB3F322BCE878300A47FFE /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 4CFB3F312BCE876A00A47FFE /* PrivacyInfo.xcprivacy */; }; 4CFB3F332BCE878A00A47FFE /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 4CFB3F312BCE876A00A47FFE /* PrivacyInfo.xcprivacy */; }; 6821E5F22C2B2A620051F947 /* Spam.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6821E5F12C2B2A620051F947 /* Spam.swift */; }; - 9075F7ED8DD224A49926DAA1 /* Pods_Converse.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A60FA9F79ECEAE8E341071C /* Pods_Converse.framework */; }; + 7B689C0740BB18FD869B41B8 /* Pods_ConverseNotificationExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9CB664EE1E0F717DB379E4E /* Pods_ConverseNotificationExtension.framework */; }; B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */; }; B7969B4A79FE4F9F8C52019D /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68FED7E170C7437EB719C8C6 /* noop-file.swift */; }; BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; }; DA84913A2AD94AED00288FE0 /* NotificationUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA8491392AD94AED00288FE0 /* NotificationUtils.swift */; }; - F58EA8305884ED6DF0BDF78D /* Pods_ConverseNotificationExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 205EAD7021331DF97121D96C /* Pods_ConverseNotificationExtension.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -61,16 +63,13 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 000A3CED54C850EE71144470 /* Pods-Converse.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Converse.debug.xcconfig"; path = "Target Support Files/Pods-Converse/Pods-Converse.debug.xcconfig"; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* Converse.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Converse.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Converse/AppDelegate.h; sourceTree = ""; }; 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = Converse/AppDelegate.mm; sourceTree = ""; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Converse/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Converse/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Converse/main.m; sourceTree = ""; }; - 1445CF94083F9D9607454340 /* Pods-ConverseNotificationExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ConverseNotificationExtension.release.xcconfig"; path = "Target Support Files/Pods-ConverseNotificationExtension/Pods-ConverseNotificationExtension.release.xcconfig"; sourceTree = ""; }; - 205EAD7021331DF97121D96C /* Pods_ConverseNotificationExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ConverseNotificationExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 3A60FA9F79ECEAE8E341071C /* Pods_Converse.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Converse.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 15EBCA492D13414100241032 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 4C2440CF2A9C8BE8004F31A3 /* Keychain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Keychain.swift; sourceTree = ""; }; 4C2440D12A9C8C5A004F31A3 /* Datatypes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Datatypes.swift; sourceTree = ""; }; 4C2440D32A9C8CFE004F31A3 /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; @@ -87,23 +86,31 @@ 4CBD67172A9CF7C30010C648 /* Sentry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sentry.swift; sourceTree = ""; }; 4CBD671B2A9D08050010C648 /* Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = ""; }; 4CFB3F312BCE876A00A47FFE /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; + 57BD1F4E3C2C98EDEE2B50AA /* Pods-Converse.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Converse.release.xcconfig"; path = "Target Support Files/Pods-Converse/Pods-Converse.release.xcconfig"; sourceTree = ""; }; 6821E5F12C2B2A620051F947 /* Spam.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Spam.swift; sourceTree = ""; }; 68FED7E170C7437EB719C8C6 /* noop-file.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = "noop-file.swift"; path = "Converse/noop-file.swift"; sourceTree = ""; }; - 719365A4F39A103E17CDA8CF /* Pods-Converse.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Converse.release.xcconfig"; path = "Target Support Files/Pods-Converse/Pods-Converse.release.xcconfig"; sourceTree = ""; }; + 7DAB5A0EF68FD62E9903A54F /* Pods-ConverseNotificationExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ConverseNotificationExtension.release.xcconfig"; path = "Target Support Files/Pods-ConverseNotificationExtension/Pods-ConverseNotificationExtension.release.xcconfig"; sourceTree = ""; }; AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = Converse/SplashScreen.storyboard; sourceTree = ""; }; BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = ""; }; - D1C50CFE219D5A0A7A8098B5 /* Pods-ConverseNotificationExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ConverseNotificationExtension.debug.xcconfig"; path = "Target Support Files/Pods-ConverseNotificationExtension/Pods-ConverseNotificationExtension.debug.xcconfig"; sourceTree = ""; }; + C9CB664EE1E0F717DB379E4E /* Pods_ConverseNotificationExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ConverseNotificationExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DA8491392AD94AED00288FE0 /* NotificationUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationUtils.swift; sourceTree = ""; }; + DEE10FF98ED77E1CC4F74C2D /* Pods-Converse.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Converse.debug.xcconfig"; path = "Target Support Files/Pods-Converse/Pods-Converse.debug.xcconfig"; sourceTree = ""; }; + E14C537DB575FE9167DE049A /* Pods_Converse.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Converse.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E315655DDE5400C29FCD0031 /* Pods-ConverseNotificationExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ConverseNotificationExtension.debug.xcconfig"; path = "Target Support Files/Pods-ConverseNotificationExtension/Pods-ConverseNotificationExtension.debug.xcconfig"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-Converse/ExpoModulesProvider.swift"; sourceTree = ""; }; /* End PBXFileReference section */ +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 1581A1112D12066900FAFD98 /* Google Services */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = "Google Services"; sourceTree = ""; }; +/* End PBXFileSystemSynchronizedRootGroup section */ + /* Begin PBXFrameworksBuildPhase section */ 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9075F7ED8DD224A49926DAA1 /* Pods_Converse.framework in Frameworks */, + 19BACCA5A8C482ED4B85F4AE /* Pods_Converse.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -112,7 +119,7 @@ buildActionMask = 2147483647; files = ( 4C31F4EE29AF887B0032D062 /* Alamofire in Frameworks */, - F58EA8305884ED6DF0BDF78D /* Pods_ConverseNotificationExtension.framework in Frameworks */, + 7B689C0740BB18FD869B41B8 /* Pods_ConverseNotificationExtension.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -139,8 +146,8 @@ isa = PBXGroup; children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - 3A60FA9F79ECEAE8E341071C /* Pods_Converse.framework */, - 205EAD7021331DF97121D96C /* Pods_ConverseNotificationExtension.framework */, + E14C537DB575FE9167DE049A /* Pods_Converse.framework */, + C9CB664EE1E0F717DB379E4E /* Pods_ConverseNotificationExtension.framework */, ); name = Frameworks; sourceTree = ""; @@ -186,6 +193,7 @@ 83CBB9F61A601CBA00E9B192 = { isa = PBXGroup; children = ( + 1581A1112D12066900FAFD98 /* Google Services */, 13B07FAE1A68108700A75B9A /* Converse */, 832341AE1AAA6A7D00B99B32 /* Libraries */, 4C65044B295C7C1F00C5A40F /* ConverseNotificationExtension */, @@ -193,6 +201,7 @@ 2D16E6871FA4F8E400B85C8A /* Frameworks */, D65327D7A22EEC0BE12398D9 /* Pods */, D7E4C46ADA2E9064B798F356 /* ExpoModulesProviders */, + 15EBCA492D13414100241032 /* GoogleService-Info.plist */, ); indentWidth = 2; sourceTree = ""; @@ -228,10 +237,10 @@ D65327D7A22EEC0BE12398D9 /* Pods */ = { isa = PBXGroup; children = ( - 000A3CED54C850EE71144470 /* Pods-Converse.debug.xcconfig */, - 719365A4F39A103E17CDA8CF /* Pods-Converse.release.xcconfig */, - D1C50CFE219D5A0A7A8098B5 /* Pods-ConverseNotificationExtension.debug.xcconfig */, - 1445CF94083F9D9607454340 /* Pods-ConverseNotificationExtension.release.xcconfig */, + DEE10FF98ED77E1CC4F74C2D /* Pods-Converse.debug.xcconfig */, + 57BD1F4E3C2C98EDEE2B50AA /* Pods-Converse.release.xcconfig */, + E315655DDE5400C29FCD0031 /* Pods-ConverseNotificationExtension.debug.xcconfig */, + 7DAB5A0EF68FD62E9903A54F /* Pods-ConverseNotificationExtension.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -251,7 +260,7 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Converse" */; buildPhases = ( - 87B65BC22A20E255EFBC3706 /* [CP] Check Pods Manifest.lock */, + 17F5574754FC8979F9A199D8 /* [CP] Check Pods Manifest.lock */, C4304E4C15B6A588EF0F2290 /* [Expo] Configure project */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, @@ -259,14 +268,18 @@ 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, BADF501E92C64E5B8BE5C54D /* Upload Debug Symbols to Sentry */, 4C650452295C7C1F00C5A40F /* Embed Foundation Extensions */, - E77124006398F213A9B2B887 /* [CP] Embed Pods Frameworks */, - 950B8C24E47BF20C9F204515 /* [CP] Copy Pods Resources */, + 183A28503D5BB3D0AF7B6703 /* [CP] Embed Pods Frameworks */, + 06B549071BA6CEEBAC055058 /* [CP] Copy Pods Resources */, + 5EE7AEECEA0CE78EF11A85B0 /* [CP-User] [RNFB] Core Configuration */, ); buildRules = ( ); dependencies = ( 4C56DB602BA444B700E84A23 /* PBXTargetDependency */, ); + fileSystemSynchronizedGroups = ( + 1581A1112D12066900FAFD98 /* Google Services */, + ); name = Converse; productName = Converse; productReference = 13B07F961A680F5B00A75B9A /* Converse.app */; @@ -276,16 +289,19 @@ isa = PBXNativeTarget; buildConfigurationList = 4C650455295C7C1F00C5A40F /* Build configuration list for PBXNativeTarget "ConverseNotificationExtension" */; buildPhases = ( - 33B7BB1240A8B27013DBBDC1 /* [CP] Check Pods Manifest.lock */, + 6C2EBD2F0142FE6223CA8017 /* [CP] Check Pods Manifest.lock */, 4C650446295C7C1F00C5A40F /* Sources */, 4C650447295C7C1F00C5A40F /* Frameworks */, 4C650448295C7C1F00C5A40F /* Resources */, - 9A59CB24F8B33E7377CBE29F /* [CP] Copy Pods Resources */, + 4B87D4151278FFDCA0FF35EB /* [CP] Copy Pods Resources */, ); buildRules = ( ); dependencies = ( ); + fileSystemSynchronizedGroups = ( + 1581A1112D12066900FAFD98 /* Google Services */, + ); name = ConverseNotificationExtension; packageProductDependencies = ( 4C31F4ED29AF887B0032D062 /* Alamofire */, @@ -343,6 +359,7 @@ BB2F792D24A3F905000567C9 /* Expo.plist in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */, + 15EBCA4A2D13414100241032 /* GoogleService-Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -351,6 +368,7 @@ buildActionMask = 2147483647; files = ( 4CFB3F332BCE878A00A47FFE /* PrivacyInfo.xcprivacy in Resources */, + 15EBCA4B2D13414100241032 /* GoogleService-Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -372,51 +390,7 @@ shellPath = /bin/sh; shellScript = "if [[ -f \"$PODS_ROOT/../.xcode.env\" ]]; then\n source \"$PODS_ROOT/../.xcode.env\"\nfi\nif [[ -f \"$PODS_ROOT/../.xcode.env.local\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.local\"\nfi\n\n# The project root by default is one level up from the ios directory\nexport PROJECT_ROOT=\"$PROJECT_DIR\"/..\n\nif [[ \"$CONFIGURATION\" = *Debug* ]]; then\n export SKIP_BUNDLING=1\nfi\nif [[ -z \"$ENTRY_FILE\" ]]; then\n # Set the entry JS file using the bundler's entry resolution.\n export ENTRY_FILE=\"$(\"$NODE_BINARY\" -e \"require('expo/scripts/resolveAppEntry')\" \"$PROJECT_ROOT\" ios absolute | tail -n 1)\"\nfi\n\nif [[ -z \"$CLI_PATH\" ]]; then\n # Use Expo CLI\n export CLI_PATH=\"$(\"$NODE_BINARY\" --print \"require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })\")\"\nfi\nif [[ -z \"$BUNDLE_COMMAND\" ]]; then\n # Default Expo CLI command for bundling\n export BUNDLE_COMMAND=\"export:embed\"\nfi\n\n# Source .xcode.env.updates if it exists to allow\n# SKIP_BUNDLING to be unset if needed\nif [[ -f \"$PODS_ROOT/../.xcode.env.updates\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.updates\"\nfi\n# Source local changes to allow overrides\n# if needed\nif [[ -f \"$PODS_ROOT/../.xcode.env.local\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.local\"\nfi\n\n/bin/sh `\"$NODE_BINARY\" --print \"require('path').dirname(require.resolve('@sentry/react-native/package.json')) + '/scripts/sentry-xcode.sh'\"` `\"$NODE_BINARY\" --print \"require('path').dirname(require.resolve('react-native/package.json')) + '/scripts/react-native-xcode.sh'\"`\n\n"; }; - 33B7BB1240A8B27013DBBDC1 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ConverseNotificationExtension-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 87B65BC22A20E255EFBC3706 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Converse-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 950B8C24E47BF20C9F204515 /* [CP] Copy Pods Resources */ = { + 06B549071BA6CEEBAC055058 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -434,6 +408,10 @@ "${PODS_CONFIGURATION_BUILD_DIR}/ExpoFileSystem/ExpoFileSystem_privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/ExpoLocalization/ExpoLocalization_privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/ExpoSystemUI/ExpoSystemUI_privacy.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore/FirebaseCore_Privacy.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreInternal/FirebaseCoreInternal_Privacy.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities/GoogleUtilities_Privacy.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC/FBLPromises_Privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/RCT-Folly/RCT-Folly_privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/RNCAsyncStorage/RNCAsyncStorage_resources.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift/ReachabilitySwift.bundle", @@ -461,6 +439,10 @@ "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoFileSystem_privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoLocalization_privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoSystemUI_privacy.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseCore_Privacy.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseCoreInternal_Privacy.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleUtilities_Privacy.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FBLPromises_Privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCT-Folly_privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNCAsyncStorage_resources.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ReachabilitySwift.bundle", @@ -480,7 +462,55 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Converse/Pods-Converse-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 9A59CB24F8B33E7377CBE29F /* [CP] Copy Pods Resources */ = { + 17F5574754FC8979F9A199D8 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Converse-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 183A28503D5BB3D0AF7B6703 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Converse/Pods-Converse-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/MMKV/MMKV.framework", + "${BUILT_PRODUCTS_DIR}/MMKVCore/MMKVCore.framework", + "${BUILT_PRODUCTS_DIR}/MMKVAppExtension/MMKVAppExtension.framework", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MMKV.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MMKVCore.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MMKVAppExtension.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Converse/Pods-Converse-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 4B87D4151278FFDCA0FF35EB /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -506,64 +536,73 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ConverseNotificationExtension/Pods-ConverseNotificationExtension-resources.sh\"\n"; showEnvVarsInLog = 0; }; - BADF501E92C64E5B8BE5C54D /* Upload Debug Symbols to Sentry */ = { + 5EE7AEECEA0CE78EF11A85B0 /* [CP-User] [RNFB] Core Configuration */ = { isa = PBXShellScriptBuildPhase; - buildActionMask = 8; + buildActionMask = 2147483647; files = ( ); inputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", ); - name = "Upload Debug Symbols to Sentry"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 1; + name = "[CP-User] [RNFB] Core Configuration"; + runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh `${NODE_BINARY:-node} --print \"require('path').dirname(require.resolve('@sentry/react-native/package.json')) + '/scripts/sentry-xcode-debug-files.sh'\"`\n"; + shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n##########################################################################\n##########################################################################\n#\n# NOTE THAT IF YOU CHANGE THIS FILE YOU MUST RUN pod install AFTERWARDS\n#\n# This file is installed as an Xcode build script in the project file\n# by cocoapods, and you will not see your changes until you pod install\n#\n##########################################################################\n##########################################################################\n\nset -e\n\n_MAX_LOOKUPS=2;\n_SEARCH_RESULT=''\n_RN_ROOT_EXISTS=''\n_CURRENT_LOOKUPS=1\n_JSON_ROOT=\"'react-native'\"\n_JSON_FILE_NAME='firebase.json'\n_JSON_OUTPUT_BASE64='e30=' # { }\n_CURRENT_SEARCH_DIR=${PROJECT_DIR}\n_PLIST_BUDDY=/usr/libexec/PlistBuddy\n_TARGET_PLIST=\"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}\"\n_DSYM_PLIST=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n# plist arrays\n_PLIST_ENTRY_KEYS=()\n_PLIST_ENTRY_TYPES=()\n_PLIST_ENTRY_VALUES=()\n\nfunction setPlistValue {\n echo \"info: setting plist entry '$1' of type '$2' in file '$4'\"\n ${_PLIST_BUDDY} -c \"Add :$1 $2 '$3'\" $4 || echo \"info: '$1' already exists\"\n}\n\nfunction getFirebaseJsonKeyValue () {\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n ruby -Ku -e \"require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']\"\n else\n echo \"\"\n fi;\n}\n\nfunction jsonBoolToYesNo () {\n if [[ $1 == \"false\" ]]; then\n echo \"NO\"\n elif [[ $1 == \"true\" ]]; then\n echo \"YES\"\n else echo \"NO\"\n fi\n}\n\necho \"info: -> RNFB build script started\"\necho \"info: 1) Locating ${_JSON_FILE_NAME} file:\"\n\nif [[ -z ${_CURRENT_SEARCH_DIR} ]]; then\n _CURRENT_SEARCH_DIR=$(pwd)\nfi;\n\nwhile true; do\n _CURRENT_SEARCH_DIR=$(dirname \"$_CURRENT_SEARCH_DIR\")\n if [[ \"$_CURRENT_SEARCH_DIR\" == \"/\" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then break; fi;\n echo \"info: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME} file.\"\n _SEARCH_RESULT=$(find \"$_CURRENT_SEARCH_DIR\" -maxdepth 2 -name ${_JSON_FILE_NAME} -print | /usr/bin/head -n 1)\n if [[ ${_SEARCH_RESULT} ]]; then\n echo \"info: ${_JSON_FILE_NAME} found at $_SEARCH_RESULT\"\n break;\n fi;\n _CURRENT_LOOKUPS=$((_CURRENT_LOOKUPS+1))\ndone\n\nif [[ ${_SEARCH_RESULT} ]]; then\n _JSON_OUTPUT_RAW=$(cat \"${_SEARCH_RESULT}\")\n _RN_ROOT_EXISTS=$(ruby -Ku -e \"require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]\" || echo '')\n\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n if ! python3 --version >/dev/null 2>&1; then echo \"python3 not found, firebase.json file processing error.\" && exit 1; fi\n _JSON_OUTPUT_BASE64=$(python3 -c 'import json,sys,base64;print(base64.b64encode(bytes(json.dumps(json.loads(open('\"'${_SEARCH_RESULT}'\"', '\"'rb'\"').read())['${_JSON_ROOT}']), '\"'utf-8'\"')).decode())' || echo \"e30=\")\n fi\n\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n\n # config.app_data_collection_default_enabled\n _APP_DATA_COLLECTION_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_data_collection_default_enabled\")\n if [[ $_APP_DATA_COLLECTION_ENABLED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseDataCollectionDefaultEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_DATA_COLLECTION_ENABLED\")\")\n fi\n\n # config.analytics_auto_collection_enabled\n _ANALYTICS_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_auto_collection_enabled\")\n if [[ $_ANALYTICS_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_COLLECTION\")\")\n fi\n\n # config.analytics_collection_deactivated\n _ANALYTICS_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_collection_deactivated\")\n if [[ $_ANALYTICS_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_DEACTIVATED\")\")\n fi\n\n # config.analytics_idfv_collection_enabled\n _ANALYTICS_IDFV_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_idfv_collection_enabled\")\n if [[ $_ANALYTICS_IDFV_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_IDFV_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_IDFV_COLLECTION\")\")\n fi\n\n # config.analytics_default_allow_analytics_storage\n _ANALYTICS_STORAGE=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_analytics_storage\")\n if [[ $_ANALYTICS_STORAGE ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_ANALYTICS_STORAGE\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_STORAGE\")\")\n fi\n\n # config.analytics_default_allow_ad_storage\n _ANALYTICS_AD_STORAGE=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_storage\")\n if [[ $_ANALYTICS_AD_STORAGE ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_STORAGE\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AD_STORAGE\")\")\n fi\n\n # config.analytics_default_allow_ad_user_data\n _ANALYTICS_AD_USER_DATA=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_user_data\")\n if [[ $_ANALYTICS_AD_USER_DATA ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_USER_DATA\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AD_USER_DATA\")\")\n fi\n\n # config.analytics_default_allow_ad_personalization_signals\n _ANALYTICS_PERSONALIZATION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_personalization_signals\")\n if [[ $_ANALYTICS_PERSONALIZATION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_PERSONALIZATION_SIGNALS\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_PERSONALIZATION\")\")\n fi\n\n # config.analytics_registration_with_ad_network_enabled\n _ANALYTICS_REGISTRATION_WITH_AD_NETWORK=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_registration_with_ad_network_enabled\")\n if [[ $_ANALYTICS_REGISTRATION_WITH_AD_NETWORK ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_REGISTRATION_WITH_AD_NETWORK_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_REGISTRATION_WITH_AD_NETWORK\")\")\n fi\n\n # config.google_analytics_automatic_screen_reporting_enabled\n _ANALYTICS_AUTO_SCREEN_REPORTING=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_automatic_screen_reporting_enabled\")\n if [[ $_ANALYTICS_AUTO_SCREEN_REPORTING ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAutomaticScreenReportingEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_SCREEN_REPORTING\")\")\n fi\n\n # config.perf_auto_collection_enabled\n _PERF_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_auto_collection_enabled\")\n if [[ $_PERF_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_enabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_AUTO_COLLECTION\")\")\n fi\n\n # config.perf_collection_deactivated\n _PERF_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_collection_deactivated\")\n if [[ $_PERF_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_deactivated\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_DEACTIVATED\")\")\n fi\n\n # config.messaging_auto_init_enabled\n _MESSAGING_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"messaging_auto_init_enabled\")\n if [[ $_MESSAGING_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseMessagingAutoInitEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_MESSAGING_AUTO_INIT\")\")\n fi\n\n # config.in_app_messaging_auto_colllection_enabled\n _FIAM_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"in_app_messaging_auto_collection_enabled\")\n if [[ $_FIAM_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseInAppMessagingAutomaticDataCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_FIAM_AUTO_INIT\")\")\n fi\n\n # config.app_check_token_auto_refresh\n _APP_CHECK_TOKEN_AUTO_REFRESH=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_check_token_auto_refresh\")\n if [[ $_APP_CHECK_TOKEN_AUTO_REFRESH ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAppCheckTokenAutoRefreshEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_CHECK_TOKEN_AUTO_REFRESH\")\")\n fi\n\n # config.crashlytics_disable_auto_disabler - undocumented for now - mainly for debugging, document if becomes useful\n _CRASHLYTICS_AUTO_DISABLE_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"crashlytics_disable_auto_disabler\")\n if [[ $_CRASHLYTICS_AUTO_DISABLE_ENABLED == \"true\" ]]; then\n echo \"Disabled Crashlytics auto disabler.\" # do nothing\n else\n _PLIST_ENTRY_KEYS+=(\"FirebaseCrashlyticsCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"NO\")\n fi\nelse\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n echo \"warning: A firebase.json file was not found, whilst this file is optional it is recommended to include it to configure firebase services in React Native Firebase.\"\nfi;\n\necho \"info: 2) Injecting Info.plist entries: \"\n\n# Log out the keys we're adding\nfor i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n echo \" -> $i) ${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\"\ndone\n\nfor plist in \"${_TARGET_PLIST}\" \"${_DSYM_PLIST}\" ; do\n if [[ -f \"${plist}\" ]]; then\n\n # paths with spaces break the call to setPlistValue. temporarily modify\n # the shell internal field separator variable (IFS), which normally\n # includes spaces, to consist only of line breaks\n oldifs=$IFS\n IFS=\"\n\"\n\n for i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n setPlistValue \"${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\" \"${plist}\"\n done\n\n # restore the original internal field separator value\n IFS=$oldifs\n else\n echo \"warning: A Info.plist build output file was not found (${plist})\"\n fi\ndone\n\necho \"info: <- RNFB build script finished\"\n"; }; - C4304E4C15B6A588EF0F2290 /* [Expo] Configure project */ = { + 6C2EBD2F0142FE6223CA8017 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); - name = "[Expo] Configure project"; + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-ConverseNotificationExtension-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-Converse/expo-configure-project.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; }; - E77124006398F213A9B2B887 /* [CP] Embed Pods Frameworks */ = { + BADF501E92C64E5B8BE5C54D /* Upload Debug Symbols to Sentry */ = { isa = PBXShellScriptBuildPhase; + buildActionMask = 8; + files = ( + ); + inputPaths = ( + ); + name = "Upload Debug Symbols to Sentry"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 1; + shellPath = /bin/sh; + shellScript = "/bin/sh `${NODE_BINARY:-node} --print \"require('path').dirname(require.resolve('@sentry/react-native/package.json')) + '/scripts/sentry-xcode-debug-files.sh'\"`\n"; + }; + C4304E4C15B6A588EF0F2290 /* [Expo] Configure project */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Converse/Pods-Converse-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/MMKV/MMKV.framework", - "${BUILT_PRODUCTS_DIR}/MMKVCore/MMKVCore.framework", - "${BUILT_PRODUCTS_DIR}/MMKVAppExtension/MMKVAppExtension.framework", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes", ); - name = "[CP] Embed Pods Frameworks"; + name = "[Expo] Configure project"; + outputFileListPaths = ( + ); outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MMKV.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MMKVCore.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MMKVAppExtension.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Converse/Pods-Converse-frameworks.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-Converse/expo-configure-project.sh\"\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -613,7 +652,7 @@ /* Begin XCBuildConfiguration section */ 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 000A3CED54C850EE71144470 /* Pods-Converse.debug.xcconfig */; + baseConfigurationReference = DEE10FF98ED77E1CC4F74C2D /* Pods-Converse.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIconPreview; @@ -630,7 +669,7 @@ "FB_SONARKIT_ENABLED=1", ); INFOPLIST_FILE = Converse/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -656,7 +695,7 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 719365A4F39A103E17CDA8CF /* Pods-Converse.release.xcconfig */; + baseConfigurationReference = 57BD1F4E3C2C98EDEE2B50AA /* Pods-Converse.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIconPreview; @@ -668,7 +707,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = Q6W2FLK8DM; INFOPLIST_FILE = Converse/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -693,7 +732,7 @@ }; 4C650453295C7C1F00C5A40F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D1C50CFE219D5A0A7A8098B5 /* Pods-ConverseNotificationExtension.debug.xcconfig */; + baseConfigurationReference = E315655DDE5400C29FCD0031 /* Pods-ConverseNotificationExtension.debug.xcconfig */; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; @@ -713,7 +752,7 @@ INFOPLIST_FILE = ConverseNotificationExtension/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = ConverseNotificationExtension; INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -737,7 +776,7 @@ }; 4C650454295C7C1F00C5A40F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1445CF94083F9D9607454340 /* Pods-ConverseNotificationExtension.release.xcconfig */; + baseConfigurationReference = 7DAB5A0EF68FD62E9903A54F /* Pods-ConverseNotificationExtension.release.xcconfig */; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; @@ -758,7 +797,7 @@ INFOPLIST_FILE = ConverseNotificationExtension/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = ConverseNotificationExtension; INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/ios/Converse/AppDelegate.mm b/ios/Converse/AppDelegate.mm index fd3e138a1..ac6d5e6a9 100644 --- a/ios/Converse/AppDelegate.mm +++ b/ios/Converse/AppDelegate.mm @@ -1,5 +1,8 @@ #import "AppDelegate.h" +#import "RNFBAppCheckModule.h" +#import + #import #import @@ -13,6 +16,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( // They will be passed down to the ViewController used by React Native. self.initialProps = @{}; + [RNFBAppCheckModule sharedInstance]; + + // Firebase Configuration is provided via Google Services/GoogleServices-Info-.plist and the proper file is copied + // during build via the scripts/build/ios/[preview|prod].js files + [FIRApp configure]; + return [super application:application didFinishLaunchingWithOptions:launchOptions]; } diff --git a/ios/Converse/Converse.entitlements b/ios/Converse/Converse.entitlements index d9a38358f..987190aaa 100644 --- a/ios/Converse/Converse.entitlements +++ b/ios/Converse/Converse.entitlements @@ -4,6 +4,15 @@ aps-environment development + com.apple.developer.associated-domains + + applinks:dev.converse.xyz + applinks:dev.getconverse.app + + com.apple.developer.devicecheck.appattest-environment + production + com.apple.developer.usernotifications.communication + com.apple.security.application-groups group.com.converse.dev @@ -12,12 +21,5 @@ $(AppIdentifierPrefix)com.converse.dev - com.apple.developer.associated-domains - - applinks:dev.converse.xyz - applinks:dev.getconverse.app - - com.apple.developer.usernotifications.communication - diff --git a/ios/ConverseNotificationExtension/Spam.swift b/ios/ConverseNotificationExtension/Spam.swift index 2b4d1c72c..8e6aa016c 100644 --- a/ios/ConverseNotificationExtension/Spam.swift +++ b/ios/ConverseNotificationExtension/Spam.swift @@ -185,7 +185,7 @@ func computeSpamScoreV3Message(client: XMTP.Client, conversation: XMTP.Conversat if let senderAddresses = try await group.members.first(where: {$0.inboxId == senderInboxId})?.addresses { for address in senderAddresses { - if try await client.preferences.addressState(address:address) == .denied { + if try await client.preferences.addressState(address: address) == .denied { return 1 } } diff --git a/ios/Google Services/GoogleService-Info-preview.plist b/ios/Google Services/GoogleService-Info-preview.plist new file mode 100644 index 000000000..ed7f90868 --- /dev/null +++ b/ios/Google Services/GoogleService-Info-preview.plist @@ -0,0 +1,30 @@ + + + + + API_KEY + AIzaSyD5G_3H8Q1wzUiRTuv9SefDyjlJxigHJh8 + GCM_SENDER_ID + 564961909146 + PLIST_VERSION + 1 + BUNDLE_ID + com.converse.preview + PROJECT_ID + converse-unshut-labs + STORAGE_BUCKET + converse-unshut-labs.firebasestorage.app + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:564961909146:ios:5dfa3959b85ed8ccbd0223 + + \ No newline at end of file diff --git a/ios/Google Services/GoogleService-Info-prod.plist b/ios/Google Services/GoogleService-Info-prod.plist new file mode 100644 index 000000000..8fe83a021 --- /dev/null +++ b/ios/Google Services/GoogleService-Info-prod.plist @@ -0,0 +1,30 @@ + + + + + API_KEY + AIzaSyD5G_3H8Q1wzUiRTuv9SefDyjlJxigHJh8 + GCM_SENDER_ID + 564961909146 + PLIST_VERSION + 1 + BUNDLE_ID + com.converse.prod + PROJECT_ID + converse-unshut-labs + STORAGE_BUCKET + converse-unshut-labs.firebasestorage.app + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:564961909146:ios:2e5cb8de4619ba59bd0223 + + \ No newline at end of file diff --git a/ios/Google Services/firebase-setup.readme.md b/ios/Google Services/firebase-setup.readme.md new file mode 100644 index 000000000..8d3a3a052 --- /dev/null +++ b/ios/Google Services/firebase-setup.readme.md @@ -0,0 +1,26 @@ +# Firebase Configuration + +Firebase config files are copied into the filepath expected by Firebase libraries at build time via the `scripts/build/ios/[preview|prod].js` files. + +Firebase looks for this file in + +`ios/GoogleService-Info.plist` + +In order to ease development, we keep the file corresponding to our debug environment in the root of the repo, in the location expected by Firebase initialization. + +We keep the environment specific files tucked away in `ios/Google Services/` to avoid cluttering the top level of our folder. + +- ios/Google Services/GoogleService-Info-preview.plist (preview) +- ios/Google Services/GoogleService-Info-prod.plist (prod) + +## Supporting Documentation this is Safe, If Not Advised Always + +https://stackoverflow.com/a/44937513/2441420 + +> While it's not the end of the world if you commit `GoogleService-Info.plist` (similarly, on Android, `google-services.json`), you're better off leaving it out for one big reason: **You're making it clear that others who build your code that they should be setting up their own Firebase project to host its configuration and data (because your project simply won't build with that file missing).** Furthermore, if your project has world-writable resources in it, you can expect that people who get a hold of your app and config so easily will inadvertently start writing data into it, which is probably not what you want. + +> Open source projects that require a Firebase setup should ideally have it stated in the readme that anyone who wants to work with this app needs to go through the process of setting up Firebase. + +> The data in these config files is not exactly private - they can be extracted fairly easily from an IPA or Android APK. It's just probably not in your best interest to share them as part of your app's code. + +For simplicity, we're doing it this way for now. If any security issues arise, we can spend the time to set this up more privately for our build scripts. diff --git a/ios/GoogleService-Info.plist b/ios/GoogleService-Info.plist new file mode 100644 index 000000000..9dbf095bf --- /dev/null +++ b/ios/GoogleService-Info.plist @@ -0,0 +1,30 @@ + + + + + API_KEY + AIzaSyD5G_3H8Q1wzUiRTuv9SefDyjlJxigHJh8 + GCM_SENDER_ID + 564961909146 + PLIST_VERSION + 1 + BUNDLE_ID + com.converse.dev + PROJECT_ID + converse-unshut-labs + STORAGE_BUCKET + converse-unshut-labs.firebasestorage.app + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:564961909146:ios:779bcea169541560bd0223 + + \ No newline at end of file diff --git a/ios/Podfile b/ios/Podfile index a84ef62e2..c6fb107d1 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -28,6 +28,8 @@ target 'Converse' do config = use_native_modules! use_frameworks! :linkage => :static + $RNFirebaseAsStaticFramework = true + pod 'MMKV', $mmkvVersion, :linkage => :dynamic pod 'MMKVCore', $mmkvVersion, :linkage => :dynamic pod 'XMTP', $xmtpVersion, :modular_headers => true diff --git a/ios/Podfile.lock b/ios/Podfile.lock index ee22fbdc6..d407a8524 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,4 +1,8 @@ PODS: + - AppCheckCore (11.2.0): + - GoogleUtilities/Environment (~> 8.0) + - GoogleUtilities/UserDefaults (~> 8.0) + - PromisesObjC (~> 2.4) - boost (1.84.0) - CoinbaseWalletSDK/Client (1.0.4) - CoinbaseWalletSDK/CrossPlatform (1.0.4): @@ -10,11 +14,11 @@ PODS: - DGSwiftUtilities (~> 0.11) - Connect-Swift (1.0.0): - SwiftProtobuf (~> 1.28.2) - - ContextMenuAuxiliaryPreview (0.4.0): - - DGSwiftUtilities (~> 0.13) + - ContextMenuAuxiliaryPreview (0.5.2): + - DGSwiftUtilities (~> 0.29) - CryptoSwift (1.8.3) - CSecp256k1 (0.2.0) - - DGSwiftUtilities (0.28.0) + - DGSwiftUtilities (0.29.0) - DoubleConversion (1.1.6) - EASClient (0.12.0): - ExpoModulesCore @@ -30,18 +34,18 @@ PODS: - ExpoModulesCore - EXNotifications (0.28.19): - ExpoModulesCore - - Expo (51.0.38): + - Expo (51.0.39): - ExpoModulesCore - - expo-dev-client (4.0.28): + - expo-dev-client (4.0.29): - EXManifests - expo-dev-launcher - expo-dev-menu - expo-dev-menu-interface - EXUpdatesInterface - - expo-dev-launcher (4.0.28): + - expo-dev-launcher (4.0.29): - DoubleConversion - EXManifests - - expo-dev-launcher/Main (= 4.0.28) + - expo-dev-launcher/Main (= 4.0.29) - expo-dev-menu - expo-dev-menu-interface - ExpoModulesCore @@ -67,7 +71,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - expo-dev-launcher/Main (4.0.28): + - expo-dev-launcher/Main (4.0.29): - DoubleConversion - EXManifests - expo-dev-launcher/Unsafe @@ -96,7 +100,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - expo-dev-launcher/Unsafe (4.0.28): + - expo-dev-launcher/Unsafe (4.0.29): - DoubleConversion - EXManifests - expo-dev-menu @@ -124,10 +128,10 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - expo-dev-menu (5.0.22): + - expo-dev-menu (5.0.23): - DoubleConversion - - expo-dev-menu/Main (= 5.0.22) - - expo-dev-menu/ReactNativeCompatibles (= 5.0.22) + - expo-dev-menu/Main (= 5.0.23) + - expo-dev-menu/ReactNativeCompatibles (= 5.0.23) - glog - hermes-engine - RCT-Folly (= 2024.01.01.00) @@ -147,8 +151,8 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - expo-dev-menu-interface (1.8.3) - - expo-dev-menu/Main (5.0.22): + - expo-dev-menu-interface (1.8.4) + - expo-dev-menu/Main (5.0.23): - DoubleConversion - EXManifests - expo-dev-menu-interface @@ -175,7 +179,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - expo-dev-menu/ReactNativeCompatibles (5.0.22): + - expo-dev-menu/ReactNativeCompatibles (5.0.23): - DoubleConversion - glog - hermes-engine @@ -196,7 +200,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - expo-dev-menu/SafeAreaView (5.0.22): + - expo-dev-menu/SafeAreaView (5.0.23): - DoubleConversion - ExpoModulesCore - glog @@ -218,7 +222,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - expo-dev-menu/Vendored (5.0.22): + - expo-dev-menu/Vendored (5.0.23): - DoubleConversion - expo-dev-menu/SafeAreaView - glog @@ -312,7 +316,7 @@ PODS: - ExpoModulesCore - ExpoWebBrowser (13.0.3): - ExpoModulesCore - - EXSplashScreen (0.27.6): + - EXSplashScreen (0.27.7): - DoubleConversion - ExpoModulesCore - glog @@ -369,8 +373,37 @@ PODS: - EXUpdatesInterface (0.16.2): - ExpoModulesCore - FBLazyVector (0.75.4) + - Firebase/AppCheck (11.4.0): + - Firebase/CoreOnly + - FirebaseAppCheck (~> 11.4.0) + - Firebase/CoreOnly (11.4.0): + - FirebaseCore (= 11.4.0) + - FirebaseAppCheck (11.4.0): + - AppCheckCore (~> 11.0) + - FirebaseAppCheckInterop (~> 11.0) + - FirebaseCore (~> 11.0) + - GoogleUtilities/Environment (~> 8.0) + - GoogleUtilities/UserDefaults (~> 8.0) + - FirebaseAppCheckInterop (11.6.0) + - FirebaseCore (11.4.0): + - FirebaseCoreInternal (~> 11.0) + - GoogleUtilities/Environment (~> 8.0) + - GoogleUtilities/Logger (~> 8.0) + - FirebaseCoreInternal (11.6.0): + - "GoogleUtilities/NSData+zlib (~> 8.0)" - fmt (9.1.0) - glog (0.3.5) + - GoogleUtilities/Environment (8.0.2): + - GoogleUtilities/Privacy + - GoogleUtilities/Logger (8.0.2): + - GoogleUtilities/Environment + - GoogleUtilities/Privacy + - "GoogleUtilities/NSData+zlib (8.0.2)": + - GoogleUtilities/Privacy + - GoogleUtilities/Privacy (8.0.2) + - GoogleUtilities/UserDefaults (8.0.2): + - GoogleUtilities/Logger + - GoogleUtilities/Privacy - hermes-engine (0.75.4): - hermes-engine/Pre-built (= 0.75.4) - hermes-engine/Pre-built (0.75.4) @@ -404,12 +437,18 @@ PODS: - React-callinvoker - React-Core - OpenSSL-Universal (1.1.2200) + - PromisesObjC (2.4.0) - RCT-Folly (2024.01.01.00): - boost - DoubleConversion - fmt (= 9.1.0) - glog - RCT-Folly/Default (= 2024.01.01.00) + - RCT-Folly/Default (2024.01.01.00): + - boost + - DoubleConversion + - fmt (= 9.1.0) + - glog - RCT-Folly/Fabric (2024.01.01.00): - boost - DoubleConversion @@ -421,7 +460,7 @@ PODS: - FBLazyVector (= 0.75.4) - RCTRequired (= 0.75.4) - React-Core (= 0.75.4) - - ReachabilitySwift (5.2.3) + - ReachabilitySwift (5.2.4) - React (0.75.4): - React-Core (= 0.75.4) - React-Core/DevSupport (= 0.75.4) @@ -1659,7 +1698,7 @@ PODS: - React-Core - react-native-get-random-values (1.11.0): - React-Core - - react-native-keyboard-controller (1.14.3): + - react-native-keyboard-controller (1.14.5): - DoubleConversion - glog - hermes-engine @@ -2020,12 +2059,12 @@ PODS: - React-logger (= 0.75.4) - React-perflogger (= 0.75.4) - React-utils (= 0.75.4) - - ReactNativeIosContextMenu (2.5.2): + - ReactNativeIosContextMenu (2.5.1): - ContextMenuAuxiliaryPreview (~> 0.3) - DGSwiftUtilities - ExpoModulesCore - ReactNativeIosUtilities - - ReactNativeIosUtilities (4.5.1): + - ReactNativeIosUtilities (4.5.0): - ComputableLayout (~> 0.7) - DGSwiftUtilities (~> 0.27) - ExpoModulesCore @@ -2039,6 +2078,13 @@ PODS: - React-Core - RNDeviceInfo (10.9.0): - React-Core + - RNFBApp (21.4.0): + - Firebase/CoreOnly (<= 11.4.0) + - React-Core + - RNFBAppCheck (21.4.0): + - Firebase/AppCheck (<= 11.4.0) + - React-Core + - RNFBApp - RNFlashList (1.6.4): - React-Core - RNFS (2.20.0): @@ -2066,10 +2112,10 @@ PODS: - Yoga - RNLocalize (3.0.2): - React-Core - - RNNotifee (9.1.2): + - RNNotifee (9.1.3): - React-Core - - RNNotifee/NotifeeCore (= 9.1.2) - - RNNotifee/NotifeeCore (9.1.2): + - RNNotifee/NotifeeCore (= 9.1.3) + - RNNotifee/NotifeeCore (9.1.3): - React-Core - RNReactNativeSharedGroupPreferences (1.1.23): - React @@ -2359,6 +2405,8 @@ DEPENDENCIES: - "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)" - "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)" - RNDeviceInfo (from `../node_modules/react-native-device-info`) + - "RNFBApp (from `../node_modules/@react-native-firebase/app`)" + - "RNFBAppCheck (from `../node_modules/@react-native-firebase/app-check`)" - "RNFlashList (from `../node_modules/@shopify/flash-list`)" - RNFS (from `../node_modules/react-native-fs`) - RNGestureHandler (from `../node_modules/react-native-gesture-handler`) @@ -2379,6 +2427,7 @@ DEPENDENCIES: SPEC REPOS: trunk: + - AppCheckCore - CoinbaseWalletSDK - ComputableLayout - Connect-Swift @@ -2386,6 +2435,12 @@ SPEC REPOS: - CryptoSwift - CSecp256k1 - DGSwiftUtilities + - Firebase + - FirebaseAppCheck + - FirebaseAppCheckInterop + - FirebaseCore + - FirebaseCoreInternal + - GoogleUtilities - libavif - libdav1d - libwebp @@ -2395,6 +2450,7 @@ SPEC REPOS: - MMKVAppExtension - MMKVCore - OpenSSL-Universal + - PromisesObjC - ReachabilitySwift - SDWebImage - SDWebImageAVIFCoder @@ -2660,6 +2716,10 @@ EXTERNAL SOURCES: :path: "../node_modules/@react-native-clipboard/clipboard" RNDeviceInfo: :path: "../node_modules/react-native-device-info" + RNFBApp: + :path: "../node_modules/@react-native-firebase/app" + RNFBAppCheck: + :path: "../node_modules/@react-native-firebase/app-check" RNFlashList: :path: "../node_modules/@shopify/flash-list" RNFS: @@ -2690,16 +2750,17 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: + AppCheckCore: cc8fd0a3a230ddd401f326489c99990b013f0c4f boost: 4cb898d0bf20404aab1850c656dcea009429d6c1 CoinbaseWalletSDK: ea1f37512bbc69ebe07416e3b29bf840f5cc3152 CoinbaseWalletSDKExpo: fc6cc756974827763d7a0decf7140c2902dafca2 ComputableLayout: c50faffac4ed9f8f05b0ce5e6f3a60df1f6042c8 Connect-Swift: 84e043b904f63dc93a2c01c6c125da25e765b50d - ContextMenuAuxiliaryPreview: 484e47f66bcb9ffe485b5e7e34cc968ff3218a9f + ContextMenuAuxiliaryPreview: 20be0be795b783b68f8792732eed4bed9f202c1c CryptoSwift: 967f37cea5a3294d9cce358f78861652155be483 CSecp256k1: 2a59c03e52637ded98896a33be4b2649392cb843 - DGSwiftUtilities: 1f2722e8b2442dc11c17b66818f62b93780e95fd - DoubleConversion: f16ae600a246532c4020132d54af21d0ddb2a385 + DGSwiftUtilities: 626565e1ee90ddacebd8520ea1ce730110ad13e4 + DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 EASClient: 1509a9a6b48b932ec61667644634daf2562983b8 EXApplication: c08200c34daca7af7fd76ac4b9d606077410e8ad EXConstants: 409690fbfd5afea964e5e9d6c4eb2c2b59222c59 @@ -2707,11 +2768,11 @@ SPEC CHECKSUMS: EXJSONUtils: 30c17fd9cc364d722c0946a550dfbf1be92ef6a4 EXManifests: c1fab4c3237675e7b0299ea8df0bcb14baca4f42 EXNotifications: 85496c9fab09d759d0e4ff594bca078ab817c40c - Expo: 9b6666ef2fedcfc89c5b9be2aa1ce12b81f9e7f5 - expo-dev-client: e25e1c63686cc097d9701354e475b2b60038b83b - expo-dev-launcher: d71690e9583fa44dfcfe789d098ce8b194b777ba - expo-dev-menu: cd0e86c49b59aff06299533c938e81b2f92b3920 - expo-dev-menu-interface: be32c09f1e03833050f0ee290dcc86b3ad0e73e4 + Expo: 8c995afb875c15bf8439af0b20bcb9ed8f90d0bd + expo-dev-client: 0cec8ec81fd01c10d9afcd9f6de3768b10644aee + expo-dev-launcher: 28b484290149642f4b78a5316f7e418a1047fcf4 + expo-dev-menu: 0f439698a8848b4be8bbc32dcf0d7b47e3d9d4b9 + expo-dev-menu-interface: 5764ad537419c1a5e8f66f668e29c81e8aca290c ExpoAsset: 323700f291684f110fb55f0d4022a3362ea9f875 ExpoBackgroundFetch: a06c553ecaf0bade0acd691042d996b9ce926327 ExpoBlur: fa53f874e7b208bc3756d1bf07903c12e790beb1 @@ -2734,14 +2795,20 @@ SPEC CHECKSUMS: ExpoSecureStore: 060cebcb956b80ddae09821610ac1aa9e1ac74cd ExpoSystemUI: d4f065a016cae6721b324eb659cdee4d4cf0cb26 ExpoWebBrowser: 7595ccac6938eb65b076385fd23d035db9ecdc8e - EXSplashScreen: c55b181f3e451bf6f4945045ca24a6da06b52056 + EXSplashScreen: 538afe6d1d98cfcc2538cf391105d68ecbd6b6ea EXStructuredHeaders: cb8d1f698e144f4c5547b4c4963e1552f5d2b457 EXTaskManager: 9c3520305c3aa1b4a12a7c6d1e3f85f2779c06e9 EXUpdates: 60b8b9b0d6e8cb7699ebd375a4deada231b9f5ca EXUpdatesInterface: 996527fd7d1a5d271eb523258d603f8f92038f24 FBLazyVector: 430e10366de01d1e3d57374500b1b150fe482e6d - fmt: 10c6e61f4be25dc963c36bd73fc7b1705fe975be - glog: 08b301085f15bcbb6ff8632a8ebaf239aae04e6a + Firebase: cf1b19f21410b029b6786a54e9764a0cacad3c99 + FirebaseAppCheck: 933cbda29279ed316b82360bca77602ac1af1ff2 + FirebaseAppCheckInterop: 347aa09a805219a31249b58fc956888e9fcb314b + FirebaseCore: e0510f1523bc0eb21653cac00792e1e2bd6f1771 + FirebaseCoreInternal: d98ab91e2d80a56d7b246856a8885443b302c0c2 + fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120 + glog: 69ef571f3de08433d766d614c73a9838a06bf7eb + GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d hermes-engine: ea92f60f37dba025e293cbe4b4a548fd26b610a0 libavif: 84bbb62fb232c3018d6f1bab79beea87e35de7b7 libdav1d: 23581a4d8ec811ff171ed5e2e05cd27bad64c39f @@ -2753,11 +2820,12 @@ SPEC CHECKSUMS: MMKVCore: d26e4d3edd5cb8588c2569222cbd8be4231374e9 op-sqlite: 7720c6cc59e76c983263edc07420e642b45fa288 OpenSSL-Universal: 6e1ae0555546e604dbc632a2b9a24a9c46c41ef6 - RCT-Folly: bf5c0376ffe4dd2cf438dcf86db385df9fdce648 + PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 + RCT-Folly: 4464f4d875961fce86008d45f4ecf6cef6de0740 RCTDeprecation: 726d24248aeab6d7180dac71a936bbca6a994ed1 RCTRequired: a94e7febda6db0345d207e854323c37e3a31d93b RCTTypeSafety: 28e24a6e44f5cbf912c66dde6ab7e07d1059a205 - ReachabilitySwift: 7f151ff156cea1481a8411701195ac6a984f4979 + ReachabilitySwift: 32793e867593cfc1177f5d16491e3a197d2fccda React: c2830fa483b0334bda284e46a8579ebbe0c5447e React-callinvoker: 4aecde929540c26b841a4493f70ebf6016691eb8 React-Core: 9c059899f00d46b5cec3ed79251f77d9c469553d @@ -2788,7 +2856,7 @@ SPEC CHECKSUMS: react-native-context-menu-view: 30915369a9b5887904c571b616653acf3f1c8edb react-native-fast-create-hash: 0d0f0ec146f12feadace675164f881bbe692f8bd react-native-get-random-values: 21325b2244dfa6b58878f51f9aa42821e7ba3d06 - react-native-keyboard-controller: cdf3b225aff038f60956f0d33e3971fef91e2c17 + react-native-keyboard-controller: 4909dc3ceeb62e896bd09f77e4dca509d76c48ba react-native-menu: d32728a357dfb360cf01cd5979cf7713c5acbb95 react-native-mmkv: 54f5626371820ab9385821db1bbb03b6ab62c28a react-native-netinfo: bdb108d340cdb41875c9ced535977cac6d2ff321 @@ -2825,18 +2893,20 @@ SPEC CHECKSUMS: React-utils: d1bae5ac6a5fb94a772ebfc7a7e1aba3a6706a3a ReactCodegen: 99b435b58bd874bb0626b3fb16437d2e8735d370 ReactCommon: 1007c09a406a451ddbd874e51511aa541d6034f6 - ReactNativeIosContextMenu: 3e0880f9bd20af2905b57ace99b69a36be125d1a - ReactNativeIosUtilities: 4980803356bff7906929d5d034da58bfc9bb824a + ReactNativeIosContextMenu: e5f972174bd78ab3a552bd6ee4745762ffaa42b3 + ReactNativeIosUtilities: 8ea45df073a05d24b9fd75e4ec5fe1de19051466 rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba RNAWSCognito: fe0c870c7cd9970a2efefc075b3f2d75eac913c7 RNCAsyncStorage: 826b603ae9c0f88b5ac4e956801f755109fa4d5c RNCClipboard: 0a720adef5ec193aa0e3de24c3977222c7e52a37 RNDeviceInfo: 02ea8b23e2280fa18e00a06d7e62804d74028579 + RNFBApp: fa976629c5a8617da9870929534602020244e28f + RNFBAppCheck: 4125a618c647355d59b2f51e49dbd0cb71d4ef11 RNFlashList: b521ebdd7f9352673817f1d98e8bdc0c8cf8545b RNFS: 4ac0f0ea233904cb798630b3c077808c06931688 RNGestureHandler: 634189dbe31ecedf6e75c0d8b5ec5ae208850074 RNLocalize: dbea38dcb344bf80ff18a1757b1becf11f70cae4 - RNNotifee: bc20a5e3d581f629db988075944fdd944d363dfe + RNNotifee: 522276e0be010e98173175fb838514b69f18cbe0 RNReactNativeSharedGroupPreferences: de0121a4224c267bc7e9fb16c398f3f087c8da81 RNReanimated: e71d3475e3ef59d343061839b4506a7eaeeeae96 RNScreens: de55b9d7de8a017d1588dcb70415492d0b0597c2 @@ -2856,8 +2926,8 @@ SPEC CHECKSUMS: UMAppLoader: f17a5ee8e85b536ace0fc254b447a37ed198d57e XMTP: 3b586fa3703640bb5fec8a64daba9e157d9e5fdc XMTPReactNative: f3e1cbf80b7278b817bd42982703a95a9250497d - Yoga: a9ef4f5c2cd79ad812110525ef61048be6a582a4 + Yoga: b05994d1933f507b0a28ceaa4fdb968dc18da178 -PODFILE CHECKSUM: 7ed5cefb992e438c67772278d7c473ace4b42753 +PODFILE CHECKSUM: 4d82c35393154fdd66fed2438e82b56bea48f396 -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.2 diff --git a/package.json b/package.json index 95280b906..3d633c0bb 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,8 @@ "@react-native-async-storage/async-storage": "1.23.1", "@react-native-clipboard/clipboard": "^1.14.1", "@react-native-community/netinfo": "11.3.1", + "@react-native-firebase/app": "^21.4.0", + "@react-native-firebase/app-check": "^21.4.0", "@react-native-menu/menu": "^1.1.2", "@react-native/metro-config": "^0.73.3", "@react-navigation/drawer": "^6.6.6", @@ -238,6 +240,7 @@ "eslint-plugin-react-hooks": "^5.0.0", "eslint-plugin-react-native": "^4.1.0", "eslint-plugin-unused-imports": "^4.1.4", + "expo-build-properties": "~0.12.5", "git-is-clean": "^3.0.1", "globals": "^15.12.0", "husky": "^8.0.2", diff --git a/queries/QueryKeys.ts b/queries/QueryKeys.ts index 87e93cd14..95427aa51 100644 --- a/queries/QueryKeys.ts +++ b/queries/QueryKeys.ts @@ -41,102 +41,102 @@ export enum QueryKeys { export const conversationMessageQueryKey = ( account: string, messageId: string -) => [QueryKeys.CONVERSATION_MESSAGE, account.toLowerCase(), messageId]; +) => [QueryKeys.CONVERSATION_MESSAGE, account?.toLowerCase(), messageId]; export const conversationsQueryKey = (account: string) => [ QueryKeys.CONVERSATIONS, - account.toLowerCase(), + account?.toLowerCase(), ]; export const conversationQueryKey = ( account: string, topic: ConversationTopic -) => [QueryKeys.CONVERSATION, account.toLowerCase(), topic]; +) => [QueryKeys.CONVERSATION, account?.toLowerCase(), topic]; export const conversationWithPeerQueryKey = (account: string, peer: string) => [ QueryKeys.CONVERSATION_WITH_PEER, - account.toLowerCase(), + account?.toLowerCase(), peer, ]; export const conversationMessagesQueryKey = ( account: string, topic: ConversationTopic -) => [QueryKeys.CONVERSATION_MESSAGES, account.toLowerCase(), topic]; +) => [QueryKeys.CONVERSATION_MESSAGES, account?.toLowerCase(), topic]; export const conversationPreviewMessagesQueryKey = ( account: string, topic: ConversationTopic -) => [QueryKeys.CONVERSATION_MESSAGES, account.toLowerCase(), topic]; +) => [QueryKeys.CONVERSATION_MESSAGES, account?.toLowerCase(), topic]; export const groupMembersQueryKey = ( account: string, topic: ConversationTopic -) => [QueryKeys.GROUP_MEMBERS, account.toLowerCase(), topic]; +) => [QueryKeys.GROUP_MEMBERS, account?.toLowerCase(), topic]; export const groupNameQueryKey = ( account: string, topic: ConversationTopic -) => [QueryKeys.GROUP_NAME, account.toLowerCase(), topic]; +) => [QueryKeys.GROUP_NAME, account?.toLowerCase(), topic]; export const groupDescriptionQueryKey = ( account: string, topic: ConversationTopic -) => [QueryKeys.GROUP_DESCRIPTION, account.toLowerCase(), topic]; +) => [QueryKeys.GROUP_DESCRIPTION, account?.toLowerCase(), topic]; export const groupPhotoQueryKey = ( account: string, topic: ConversationTopic -) => [QueryKeys.GROUP_PHOTO, account.toLowerCase(), topic]; +) => [QueryKeys.GROUP_PHOTO, account?.toLowerCase(), topic]; export const groupPinnedFrameQueryKey = ( account: string, topic: ConversationTopic -) => [QueryKeys.PINNED_FRAME, account.toLowerCase(), topic]; +) => [QueryKeys.PINNED_FRAME, account?.toLowerCase(), topic]; export const groupPermissionsQueryKey = ( account: string, topic: ConversationTopic -) => [QueryKeys.GROUP_PERMISSIONS, account.toLowerCase(), topic]; +) => [QueryKeys.GROUP_PERMISSIONS, account?.toLowerCase(), topic]; export const groupConsentQueryKey = ( account: string, topic: ConversationTopic -) => [QueryKeys.GROUP_CONSENT, account.toLowerCase(), topic]; +) => [QueryKeys.GROUP_CONSENT, account?.toLowerCase(), topic]; export const dmConsentQueryKey = ( account: string, topic: ConversationTopic -) => [QueryKeys.DM_CONSENT, account.toLowerCase(), topic]; +) => [QueryKeys.DM_CONSENT, account?.toLowerCase(), topic]; export const addedByQueryKey = (account: string, topic: ConversationTopic) => [ QueryKeys.ADDED_BY, - account.toLowerCase(), + account?.toLowerCase(), topic, ]; export const groupIsActiveQueryKey = ( account: string, topic: ConversationTopic -) => [QueryKeys.GROUP_ACTIVE, account.toLowerCase(), topic]; +) => [QueryKeys.GROUP_ACTIVE, account?.toLowerCase(), topic]; export const groupInviteQueryKey = (account: string, inviteId: string) => [ QueryKeys.GROUP_INVITE, - account.toLowerCase(), + account?.toLowerCase(), inviteId, ]; export const groupJoinRequestQueryKey = ( account: string, requestId: string -) => [QueryKeys.GROUP_JOIN_REQUEST, account.toLowerCase(), requestId]; +) => [QueryKeys.GROUP_JOIN_REQUEST, account?.toLowerCase(), requestId]; export const pendingJoinRequestsQueryKey = (account: string) => [ QueryKeys.PENDING_JOIN_REQUESTS, - account.toLowerCase(), + account?.toLowerCase(), ]; export const groupPermissionPolicyQueryKey = ( account: string, topic: ConversationTopic -) => [QueryKeys.GROUP_PERMISSION_POLICY, account.toLowerCase(), topic]; +) => [QueryKeys.GROUP_PERMISSION_POLICY, account?.toLowerCase(), topic]; diff --git a/screens/Navigation/Navigation.tsx b/screens/Navigation/Navigation.tsx index 9460b1181..d1becf4bd 100644 --- a/screens/Navigation/Navigation.tsx +++ b/screens/Navigation/Navigation.tsx @@ -2,8 +2,8 @@ import { createNativeStackNavigator, NativeStackNavigationOptions, } from "@react-navigation/native-stack"; -import { memo } from "react"; -import { Platform, useColorScheme } from "react-native"; +import { memo, useEffect, useState } from "react"; +import { Platform, useColorScheme, View, Text } from "react-native"; import { ScreenHeaderModalCloseButton } from "../../components/Screen/ScreenHeaderModalCloseButton"; import { ConversationBlockedListNav } from "../../features/blocked-chats/ConversationBlockedListNav"; import { useRouter } from "../../navigation/useNavigation"; @@ -48,6 +48,9 @@ import WebviewPreviewNav, { } from "./WebviewPreviewNav"; import { translate } from "@/i18n"; import { ConversationTopic } from "@xmtp/react-native-sdk"; +import { Button } from "@/design-system/Button/Button"; +import { setupAppAttest, tryGetAppCheckToken } from "@/utils/appCheck"; +import logger from "@/utils/logger"; export type NavigationParamList = { Idle: undefined; @@ -191,6 +194,39 @@ export function SignedInNavigation() { ); } +// todo: remove once integration complete +const TestAppCheckScreen = () => { + const [token, setToken] = useState(undefined); + const [key, setKey] = useState(undefined); + const [error, setError] = useState(undefined); + useEffect(() => { + setupAppAttest(); + }, []); + return ( + + TestAppCheckScreen +