feat: update onboarding and application flows

This commit is contained in:
Jacques_tirot
2026-08-25 15:55:11 +02:00
parent 4fb8a3e1e0
commit bc7edcf3a7
38 changed files with 7234 additions and 289 deletions
+12 -7
View File
@@ -10,7 +10,7 @@ import { Platform } from 'react-native'
const functionsInstances = {}
const emulatorConfigured = {}
const emulatorHost = Platform.OS === 'web' ? 'localhost' : '192.168.1.60'
const USE_FUNCTIONS_EMULATOR = false // Toggle to route functions traffic to the local emulator.
const USE_FUNCTIONS_EMULATOR = __DEV__
const configureFunctionsEmulator = (instance, regionKey = 'us-central1') => {
const shouldUseEmulator = USE_FUNCTIONS_EMULATOR && instance?.useEmulator
@@ -56,15 +56,20 @@ if (!firebase?.apps?.filter(({ name_ }) => name_ === '[DEFAULT]').length) {
console.log('Firebase init')
}
// Firestore settings for React Native/iOS: avoid streaming transport issues
const firestore = firebase.firestore()
try {
// Prefer auto-detect; disable fetch streams for RN iOS stability
firebase.firestore().settings({
experimentalAutoDetectLongPolling: true,
useFetchStreams: false,
const firestoreSettings = {
ignoreUndefinedProperties: true,
})
merge: true,
}
// React Native can require long polling, but these settings break web streaming.
if (Platform.OS !== 'web') {
firestoreSettings.experimentalAutoDetectLongPolling = true
firestoreSettings.useFetchStreams = false
}
firestore.settings(firestoreSettings)
} catch (e) {
// Ignore if settings were already set elsewhere
}