diff --git a/app/android/app/build.gradle b/app/android/app/build.gradle index 2b7c287ae..08c13b631 100644 --- a/app/android/app/build.gradle +++ b/app/android/app/build.gradle @@ -231,8 +231,9 @@ dependencies { implementation "com.google.guava:guava:31.1-android" implementation "androidx.profileinstaller:profileinstaller:1.3.1" - implementation "androidx.activity:activity:1.9.3" - implementation "androidx.activity:activity-ktx:1.9.3" + implementation "androidx.activity:activity:1.10.1" + implementation "androidx.activity:activity-ktx:1.10.1" + implementation "com.google.android.material:material:1.12.0" implementation "com.google.android.play:app-update:2.1.0" } diff --git a/app/android/app/src/main/java/com/proofofpassportapp/MainActivity.kt b/app/android/app/src/main/java/com/proofofpassportapp/MainActivity.kt index 24bcab1c7..8a8a9becf 100644 --- a/app/android/app/src/main/java/com/proofofpassportapp/MainActivity.kt +++ b/app/android/app/src/main/java/com/proofofpassportapp/MainActivity.kt @@ -5,9 +5,8 @@ package com.proofofpassportapp import android.content.Intent import android.os.Bundle import android.util.Log -import android.graphics.Color -import androidx.activity.SystemBarStyle -import androidx.activity.enableEdgeToEdge +import androidx.core.view.WindowCompat +import androidx.core.view.WindowInsetsControllerCompat import com.facebook.react.ReactActivity import com.facebook.react.ReactActivityDelegate import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled @@ -44,12 +43,11 @@ class MainActivity : ReactActivity() { // Prevent fragment state restoration to avoid react-native-screens crash // See: https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-424704978 super.onCreate(null) - // Ensure edge-to-edge is enabled consistently across Android versions using - // the AndroidX helper so deprecated window color APIs are avoided. - enableEdgeToEdge( - statusBarStyle = SystemBarStyle.auto(Color.TRANSPARENT, Color.TRANSPARENT), - navigationBarStyle = SystemBarStyle.auto(Color.TRANSPARENT, Color.TRANSPARENT) - ) + WindowCompat.setDecorFitsSystemWindows(window, false) + WindowInsetsControllerCompat(window, window.decorView).apply { + systemBarsBehavior = + WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE + } // Allow system to manage orientation for large screens } } diff --git a/app/ios/Podfile.lock b/app/ios/Podfile.lock index 54a7d7609..9b219e2e3 100644 --- a/app/ios/Podfile.lock +++ b/app/ios/Podfile.lock @@ -2065,7 +2065,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - RNScreens (4.15.3): + - RNScreens (4.17.0): - DoubleConversion - glog - hermes-engine @@ -2086,9 +2086,9 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNScreens/common (= 4.15.3) + - RNScreens/common (= 4.17.0) - Yoga - - RNScreens/common (4.15.3): + - RNScreens/common (4.17.0): - DoubleConversion - glog - hermes-engine @@ -2639,7 +2639,7 @@ SPEC CHECKSUMS: RNKeychain: 471ceef8c13f15a5534c3cd2674dbbd9d0680e52 RNLocalize: 4f5e4a46d2bccd04ccb96721e438dcb9de17c2e0 RNReactNativeHapticFeedback: e526ac4a7ca9fb23c7843ea4fd7d823166054c73 - RNScreens: 806e1449a8ec63c2a4e4cf8a63cc80203ccda9b8 + RNScreens: 8049d2198d60c2b8f00b115270ab7a08edfa4190 RNSentry: 6ad982be2c8e32dab912afb4132b6a0d88484ea0 RNSVG: e1cf5a9a5aa12c69f2ec47031defbd87ae7fb697 segment-analytics-react-native: 0eae155b0e9fa560fa6b17d78941df64537c35b7 diff --git a/app/package.json b/app/package.json index e1f3bdc3e..45b13d7fa 100644 --- a/app/package.json +++ b/app/package.json @@ -161,7 +161,7 @@ "react-native-passkey": "^3.3.1", "react-native-passport-reader": "1.0.3", "react-native-safe-area-context": "^5.6.1", - "react-native-screens": "4.15.3", + "react-native-screens": "4.17.0", "react-native-sqlite-storage": "^6.0.1", "react-native-svg": "15.14.0", "react-native-svg-web": "1.0.9", diff --git a/app/src/components/SystemBars.tsx b/app/src/components/SystemBars.tsx new file mode 100644 index 000000000..7e95c714f --- /dev/null +++ b/app/src/components/SystemBars.tsx @@ -0,0 +1,19 @@ +// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. +// SPDX-License-Identifier: BUSL-1.1 +// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. + +import React from 'react'; +import { Platform } from 'react-native'; +import { SystemBars as EdgeToEdgeSystemBars } from 'react-native-edge-to-edge'; + +export type { SystemBarStyle } from 'react-native-edge-to-edge'; + +type SystemBarsProps = React.ComponentProps; + +export const SystemBars: React.FC = props => { + if (Platform.OS === 'android' || Platform.OS === 'web') { + return null; + } + + return ; +}; diff --git a/app/src/components/navbar/BaseNavBar.tsx b/app/src/components/navbar/BaseNavBar.tsx index e4f7186eb..d8429814f 100644 --- a/app/src/components/navbar/BaseNavBar.tsx +++ b/app/src/components/navbar/BaseNavBar.tsx @@ -4,8 +4,6 @@ import React, { useMemo } from 'react'; import type { TextProps } from 'react-native'; -import type { SystemBarStyle } from 'react-native-edge-to-edge'; -import { SystemBars } from 'react-native-edge-to-edge'; import { ChevronLeft, X } from '@tamagui/lucide-icons'; import type { ViewProps } from '@selfxyz/mobile-sdk-alpha/components'; @@ -16,6 +14,9 @@ import { XStack, } from '@selfxyz/mobile-sdk-alpha/components'; +import type { SystemBarStyle } from '@/components/SystemBars'; +import { SystemBars } from '@/components/SystemBars'; + interface NavBarProps extends ViewProps { children: React.ReactNode; backgroundColor?: string; diff --git a/app/src/components/navbar/HeadlessNavForEuclid.tsx b/app/src/components/navbar/HeadlessNavForEuclid.tsx index d2d651717..a5ad4df25 100644 --- a/app/src/components/navbar/HeadlessNavForEuclid.tsx +++ b/app/src/components/navbar/HeadlessNavForEuclid.tsx @@ -2,9 +2,10 @@ // SPDX-License-Identifier: BUSL-1.1 // NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. -import { SystemBars } from 'react-native-edge-to-edge'; import type { NativeStackHeaderProps } from '@react-navigation/native-stack'; +import { SystemBars } from '@/components/SystemBars'; + export const HeadlessNavForEuclid = (props: NativeStackHeaderProps) => { return ( <> diff --git a/app/src/layouts/ExpandableBottomLayout.tsx b/app/src/layouts/ExpandableBottomLayout.tsx index 2dbb4a22c..73d6ac87a 100644 --- a/app/src/layouts/ExpandableBottomLayout.tsx +++ b/app/src/layouts/ExpandableBottomLayout.tsx @@ -3,7 +3,6 @@ // NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. import React from 'react'; -import { SystemBars } from 'react-native-edge-to-edge'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import type { @@ -15,6 +14,8 @@ import type { import { ExpandableBottomLayout as BaseExpandableBottomLayout } from '@selfxyz/mobile-sdk-alpha'; import { black } from '@selfxyz/mobile-sdk-alpha/constants/colors'; +import { SystemBars } from '@/components/SystemBars'; + const Layout: React.FC = ({ children, backgroundColor, diff --git a/app/src/navigation/app.tsx b/app/src/navigation/app.tsx index 07cc37057..3d1a1254b 100644 --- a/app/src/navigation/app.tsx +++ b/app/src/navigation/app.tsx @@ -3,11 +3,11 @@ // NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. import React from 'react'; -import { SystemBars } from 'react-native-edge-to-edge'; import type { NativeStackNavigationOptions } from '@react-navigation/native-stack'; import type { DocumentCategory } from '@selfxyz/common/utils/types'; +import { SystemBars } from '@/components/SystemBars'; import DeferredLinkingInfoScreen from '@/screens/app/DeferredLinkingInfoScreen'; import GratificationScreen from '@/screens/app/GratificationScreen'; import LoadingScreen from '@/screens/app/LoadingScreen'; diff --git a/app/src/screens/app/GratificationScreen.tsx b/app/src/screens/app/GratificationScreen.tsx index e9c378260..b487a11bb 100644 --- a/app/src/screens/app/GratificationScreen.tsx +++ b/app/src/screens/app/GratificationScreen.tsx @@ -9,7 +9,6 @@ import { StyleSheet, Text as RNText, } from 'react-native'; -import { SystemBars } from 'react-native-edge-to-edge'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { Text, View, YStack } from 'tamagui'; import { useNavigation, useRoute } from '@react-navigation/native'; @@ -28,6 +27,7 @@ import { dinot, dinotBold } from '@selfxyz/mobile-sdk-alpha/constants/fonts'; import GratificationBg from '@/assets/images/gratification_bg.svg'; import SelfLogo from '@/assets/logos/self.svg'; +import { SystemBars } from '@/components/SystemBars'; import type { RootStackParamList } from '@/navigation'; const GratificationScreen: React.FC = () => { diff --git a/app/src/screens/documents/selection/DocumentOnboardingScreen.tsx b/app/src/screens/documents/selection/DocumentOnboardingScreen.tsx index e1cfbf208..96ca88143 100644 --- a/app/src/screens/documents/selection/DocumentOnboardingScreen.tsx +++ b/app/src/screens/documents/selection/DocumentOnboardingScreen.tsx @@ -5,7 +5,6 @@ import LottieView from 'lottie-react-native'; import React, { useEffect, useRef } from 'react'; import { StyleSheet } from 'react-native'; -import { SystemBars } from 'react-native-edge-to-edge'; import { useNavigation } from '@react-navigation/native'; import { useSelfClient } from '@selfxyz/mobile-sdk-alpha'; @@ -58,7 +57,6 @@ const DocumentOnboardingScreen: React.FC = () => { return ( - { return ( - { return { __esModule: true, Dimensions: mockDimensions, + Platform: { OS: 'ios', select: jest.fn() }, Pressable: ({ onPress, children }: any) => (