@react-native-firebase/app 26.3.3 → 27.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -0
- package/README.md +10 -27
- package/RNFBApp.podspec +13 -5
- package/android/build.gradle +3 -0
- package/android/src/main/java/io/invertase/firebase/common/RNFBHandleCollisionException.kt +29 -0
- package/android/src/main/java/io/invertase/firebase/common/RNFBHandleMap.kt +146 -0
- package/android/src/main/java/io/invertase/firebase/common/TaskExecutorService.kt +156 -0
- package/android/src/main/java/io/invertase/firebase/common/UniversalFirebaseModule.kt +44 -0
- package/android/src/main/java/io/invertase/firebase/common/UniversalFirebasePreferences.kt +100 -0
- package/android/src/reactnative/java/io/invertase/firebase/app/NativeRNFBTurboApp.kt +250 -0
- package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseApp.kt +64 -0
- package/android/src/reactnative/java/io/invertase/firebase/app/{ReactNativeFirebaseAppInitProvider.java → ReactNativeFirebaseAppInitProvider.kt} +3 -4
- package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseAppPackage.kt +47 -0
- package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseAppRegistrar.kt +33 -0
- package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseVersion.java +1 -1
- package/android/src/reactnative/java/io/invertase/firebase/common/RCTConvertFirebase.kt +185 -0
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseEvent.kt +35 -0
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseEventEmitter.kt +662 -0
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseJSON.kt +103 -0
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseMeta.kt +96 -0
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseModule.kt +140 -0
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebasePreferences.kt +109 -0
- package/android/src/reactnative/java/io/invertase/firebase/common/SharedUtils.kt +451 -0
- package/android/src/reactnative/java/io/invertase/firebase/interfaces/{ContextProvider.java → ContextProvider.kt} +8 -8
- package/android/src/reactnative/java/io/invertase/firebase/interfaces/{NativeError.java → NativeError.kt} +8 -8
- package/android/src/reactnative/java/io/invertase/firebase/interfaces/{NativeEvent.java → NativeEvent.kt} +6 -6
- package/android/src/reactnative/java/io/invertase/firebase/utils/NativeRNFBTurboUtils.kt +219 -0
- package/android/src/test/java/expo/core/ModuleRegistry.java +9 -0
- package/android/src/test/java/io/invertase/firebase/app/NativeRNFBTurboAppTest.java +208 -60
- package/android/src/test/java/io/invertase/firebase/app/ReactNativeFirebaseAppComponentsJavaCompatibilityTest.java +70 -0
- package/android/src/test/java/io/invertase/firebase/app/ReactNativeFirebaseAppJavaCompatibilityTest.java +60 -0
- package/android/src/test/java/io/invertase/firebase/app/ReactNativeFirebaseAppPackageTest.java +165 -0
- package/android/src/test/java/io/invertase/firebase/app/ReactNativeFirebaseAppTest.kt +167 -0
- package/android/src/test/java/io/invertase/firebase/common/RCTConvertFirebaseJavaCompatibilityTest.java +112 -0
- package/android/src/test/java/io/invertase/firebase/common/RCTConvertFirebaseTest.kt +317 -0
- package/android/src/test/java/io/invertase/firebase/common/RNFBHandleMapTest.kt +309 -0
- package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebaseEventEmitterJavaCompatibilityTest.java +176 -0
- package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebaseEventEmitterTest.java +144 -13
- package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebaseEventTest.kt +61 -0
- package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebaseJSONJavaCompatibilityTest.java +85 -0
- package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebaseJSONTest.kt +296 -0
- package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebaseMetaJavaCompatibilityTest.java +67 -0
- package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebaseMetaTest.kt +246 -0
- package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebaseModuleTest.kt +254 -0
- package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebasePreferencesJavaCompatibilityTest.java +87 -0
- package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebasePreferencesTest.kt +260 -0
- package/android/src/test/java/io/invertase/firebase/common/SharedUtilsJavaCompatibilityTest.java +255 -0
- package/android/src/test/java/io/invertase/firebase/common/SharedUtilsTest.kt +674 -0
- package/android/src/test/java/io/invertase/firebase/common/TaskExecutorServiceTest.kt +290 -0
- package/android/src/test/java/io/invertase/firebase/common/UniversalFirebaseModuleJavaCompatibilityTest.java +178 -0
- package/android/src/test/java/io/invertase/firebase/common/UniversalFirebasePreferencesJavaCompatibilityTest.java +99 -0
- package/android/src/test/java/io/invertase/firebase/common/UniversalFirebasePreferencesTest.kt +217 -0
- package/android/src/test/java/io/invertase/firebase/commoncompat/ReactNativeFirebaseModuleJavaCompatibilityTest.java +176 -0
- package/android/src/test/java/io/invertase/firebase/commoncompat/ReactNativeFirebaseModuleKotlinCompatibilityTest.kt +52 -0
- package/android/src/test/java/io/invertase/firebase/interfaces/InterfacesJavaCompatibilityTest.java +144 -0
- package/android/src/test/java/io/invertase/firebase/interfaces/NativeEventTest.kt +56 -0
- package/android/src/test/java/io/invertase/firebase/utils/NativeRNFBTurboUtilsTest.java +517 -23
- package/dist/module/FirebaseApp.js +10 -0
- package/dist/module/FirebaseApp.js.map +1 -1
- package/dist/module/common/Base64.js +13 -21
- package/dist/module/common/Base64.js.map +1 -1
- package/dist/module/common/deeps.js +3 -0
- package/dist/module/common/deeps.js.map +1 -1
- package/dist/module/common/index.js +17 -9
- package/dist/module/common/index.js.map +1 -1
- package/dist/module/internal/FirebaseModule.js.map +1 -1
- package/dist/module/internal/RNFBNativeEventEmitter.js +12 -1
- package/dist/module/internal/RNFBNativeEventEmitter.js.map +1 -1
- package/dist/module/internal/SharedEventEmitter.js +3 -1
- package/dist/module/internal/SharedEventEmitter.js.map +1 -1
- package/dist/module/internal/asyncStorage.js +7 -11
- package/dist/module/internal/asyncStorage.js.map +1 -1
- package/dist/module/internal/index.js +1 -0
- package/dist/module/internal/index.js.map +1 -1
- package/dist/module/internal/logger.js +44 -40
- package/dist/module/internal/logger.js.map +1 -1
- package/dist/module/internal/nativeModuleAndroidIos.js +2 -29
- package/dist/module/internal/nativeModuleAndroidIos.js.map +1 -1
- package/dist/module/internal/nativeModuleDebug.js +74 -0
- package/dist/module/internal/nativeModuleDebug.js.map +1 -0
- package/dist/module/internal/nativeModuleWeb.js +9 -29
- package/dist/module/internal/nativeModuleWeb.js.map +1 -1
- package/dist/module/internal/registry/app.js +8 -2
- package/dist/module/internal/registry/app.js.map +1 -1
- package/dist/module/internal/registry/modular.js +2 -2
- package/dist/module/internal/registry/modular.js.map +1 -1
- package/dist/module/internal/registry/nativeModule.js +3 -3
- package/dist/module/internal/registry/nativeModule.js.map +1 -1
- package/dist/module/internal/web/RNFBAppModule.js +16 -15
- package/dist/module/internal/web/RNFBAppModule.js.map +1 -1
- package/dist/module/internal/web/memidb/lib/FakeEventTarget.js +3 -1
- package/dist/module/internal/web/memidb/lib/FakeEventTarget.js.map +1 -1
- package/dist/module/types/app.js.map +1 -1
- package/dist/module/types/internal.js +2 -0
- package/dist/module/version.js +1 -1
- package/dist/typescript/lib/FirebaseApp.d.ts +7 -0
- package/dist/typescript/lib/FirebaseApp.d.ts.map +1 -1
- package/dist/typescript/lib/common/Base64.d.ts.map +1 -1
- package/dist/typescript/lib/common/deeps.d.ts.map +1 -1
- package/dist/typescript/lib/common/index.d.ts.map +1 -1
- package/dist/typescript/lib/internal/FirebaseModule.d.ts +2 -3
- package/dist/typescript/lib/internal/FirebaseModule.d.ts.map +1 -1
- package/dist/typescript/lib/internal/NativeModules.d.ts +4 -1
- package/dist/typescript/lib/internal/NativeModules.d.ts.map +1 -1
- package/dist/typescript/lib/internal/RNFBNativeEventEmitter.d.ts +2 -2
- package/dist/typescript/lib/internal/RNFBNativeEventEmitter.d.ts.map +1 -1
- package/dist/typescript/lib/internal/SharedEventEmitter.d.ts +3 -3
- package/dist/typescript/lib/internal/SharedEventEmitter.d.ts.map +1 -1
- package/dist/typescript/lib/internal/asyncStorage.d.ts.map +1 -1
- package/dist/typescript/lib/internal/index.d.ts +1 -0
- package/dist/typescript/lib/internal/index.d.ts.map +1 -1
- package/dist/typescript/lib/internal/logger.d.ts.map +1 -1
- package/dist/typescript/lib/internal/nativeModuleAndroidIos.d.ts.map +1 -1
- package/dist/typescript/lib/internal/nativeModuleDebug.d.ts +2 -0
- package/dist/typescript/lib/internal/nativeModuleDebug.d.ts.map +1 -0
- package/dist/typescript/lib/internal/nativeModuleWeb.d.ts.map +1 -1
- package/dist/typescript/lib/internal/registry/app.d.ts.map +1 -1
- package/dist/typescript/lib/internal/web/RNFBAppModule.d.ts +7 -7
- package/dist/typescript/lib/internal/web/RNFBAppModule.d.ts.map +1 -1
- package/dist/typescript/lib/types/app.d.ts +10 -3
- package/dist/typescript/lib/types/app.d.ts.map +1 -1
- package/dist/typescript/lib/types/internal.d.ts +12 -0
- package/dist/typescript/lib/types/internal.d.ts.map +1 -1
- package/dist/typescript/lib/version.d.ts +1 -1
- package/firebase-schema.json +5 -1
- package/firebase_spm.rb +552 -96
- package/ios/RNFBApp/RCTConvert+FIRApp.h +2 -5
- package/ios/RNFBApp/RCTConvert+FIRApp.m +11 -6
- package/ios/RNFBApp/RCTConvert+FIROptions.h +2 -5
- package/ios/RNFBApp/RCTConvert+FIROptions.m +11 -10
- package/ios/RNFBApp/RCTConvertFIRApp.swift +86 -0
- package/ios/RNFBApp/RCTConvertFIROptions.swift +259 -0
- package/ios/RNFBApp/RNFBAppCustomAuthDomains.swift +63 -0
- package/ios/RNFBApp/RNFBAppInitializeOptionsMapper.swift +113 -0
- package/ios/RNFBApp/RNFBAppLogLevelMapper.swift +53 -0
- package/ios/RNFBApp/RNFBAppModule+CustomAuthDomain.m +35 -0
- package/ios/RNFBApp/RNFBAppModule.h +6 -2
- package/ios/RNFBApp/RNFBAppModule.mm +67 -204
- package/ios/RNFBApp/RNFBAppModuleFirebase.swift +439 -0
- package/ios/RNFBApp/RNFBAppModuleImplementation.h +68 -0
- package/ios/RNFBApp/RNFBAppModuleImplementation.m +195 -0
- package/ios/RNFBApp/RNFBHandleMap.h +73 -0
- package/ios/RNFBApp/RNFBHandleMap.m +87 -0
- package/ios/RNFBApp/RNFBHandleMapStorage.swift +90 -0
- package/ios/RNFBApp/RNFBInitializeAppArguments.swift +82 -0
- package/ios/RNFBApp/RNFBJSON.m +22 -38
- package/ios/RNFBApp/RNFBJSONImplementation.swift +71 -0
- package/ios/RNFBApp/RNFBMeta.m +24 -26
- package/ios/RNFBApp/RNFBMetaStorage.swift +76 -0
- package/ios/RNFBApp/RNFBNullSentinelDecoding.swift +135 -0
- package/ios/RNFBApp/RNFBNullSentinelInterceptor.h +30 -3
- package/ios/RNFBApp/RNFBNullSentinelInterceptor.m +28 -5
- package/ios/RNFBApp/RNFBPreferences.m +22 -20
- package/ios/RNFBApp/RNFBPreferencesStorage.swift +101 -0
- package/ios/RNFBApp/RNFBRCTEventEmitter.m +36 -93
- package/ios/RNFBApp/RNFBRCTEventEmitterCore.swift +161 -0
- package/ios/RNFBApp/RNFBSharedUtils.h +2 -5
- package/ios/RNFBApp/RNFBSharedUtils.m +109 -197
- package/ios/RNFBApp/RNFBSharedUtilsConfig.swift +72 -0
- package/ios/RNFBApp/RNFBSharedUtilsFIRApp.swift +271 -0
- package/ios/RNFBApp/RNFBSharedUtilsFormatting.swift +59 -0
- package/ios/RNFBApp/RNFBSharedUtilsPromiseRejection.swift +88 -0
- package/ios/RNFBApp/RNFBUtilsHelpers.swift +116 -0
- package/ios/RNFBApp/RNFBUtilsModule+Foundation.m +44 -0
- package/ios/RNFBApp/RNFBUtilsModule+PhotoAssets.m +47 -0
- package/ios/RNFBApp/RNFBUtilsModule.h +11 -1
- package/ios/RNFBApp/RNFBUtilsModule.mm +10 -85
- package/ios/RNFBApp/RNFBUtilsModuleImplementation.h +32 -0
- package/ios/RNFBApp/RNFBUtilsModuleImplementation.m +56 -0
- package/ios/RNFBApp/RNFBVersion.m +1 -1
- package/ios/RNFBApp.xcodeproj/project.pbxproj +106 -0
- package/ios/RNFBAppUnitTests/HostStubs/FirebaseCore/FIRApp.m +171 -0
- package/ios/RNFBAppUnitTests/HostStubs/FirebaseCore/FirebaseCore.h +78 -0
- package/ios/RNFBAppUnitTests/HostStubs/FirebaseInstallations/FIRInstallations.m +7 -0
- package/ios/RNFBAppUnitTests/HostStubs/FirebaseInstallations/FirebaseInstallations.h +8 -0
- package/ios/RNFBAppUnitTests/HostStubs/RNFBAppModuleHostStub.m +55 -0
- package/ios/RNFBAppUnitTests/HostStubs/RNFBAppTurboModules.h +89 -0
- package/ios/RNFBAppUnitTests/HostStubs/RNFBAppTurboModules.mm +30 -0
- package/ios/RNFBAppUnitTests/HostStubs/React/RCTBridge.h +19 -0
- package/ios/RNFBAppUnitTests/HostStubs/React/RCTBridge.m +32 -0
- package/ios/RNFBAppUnitTests/HostStubs/React/RCTBridgeModule.h +19 -0
- package/ios/RNFBAppUnitTests/HostStubs/React/RCTConvert.h +28 -0
- package/ios/RNFBAppUnitTests/HostStubs/React/RCTConvert.m +23 -0
- package/ios/RNFBAppUnitTests/HostStubs/React/RCTEventEmitter.h +9 -0
- package/ios/RNFBAppUnitTests/HostStubs/React/RCTInvalidating.h +24 -0
- package/ios/RNFBAppUnitTests/HostStubs/React/RCTUtils.h +9 -0
- package/ios/RNFBAppUnitTests/HostStubs/module.modulemap +13 -0
- package/ios/RNFBAppUnitTests/RCTConvertFIRAppFacadeTests.m +61 -0
- package/ios/RNFBAppUnitTests/RCTConvertFIRAppTests.swift +73 -0
- package/ios/RNFBAppUnitTests/RCTConvertFIROptionsFacadeTests.m +57 -0
- package/ios/RNFBAppUnitTests/RCTConvertFIROptionsTests.swift +243 -0
- package/ios/RNFBAppUnitTests/RNFBAppCustomAuthDomainsFacadeTests.m +73 -0
- package/ios/RNFBAppUnitTests/RNFBAppCustomAuthDomainsTests.swift +70 -0
- package/ios/RNFBAppUnitTests/RNFBAppInitializeOptionsMapperTests.swift +190 -0
- package/ios/RNFBAppUnitTests/RNFBAppLogLevelFacadeTests.m +76 -0
- package/ios/RNFBAppUnitTests/RNFBAppLogLevelMapperTests.swift +59 -0
- package/ios/RNFBAppUnitTests/RNFBAppModuleFirebaseFacadeTests.m +215 -0
- package/ios/RNFBAppUnitTests/RNFBAppModuleFirebaseTests.swift +430 -0
- package/ios/RNFBAppUnitTests/RNFBAppModuleLifecycleTests.m +206 -0
- package/ios/RNFBAppUnitTests/RNFBAppModuleShellTests.mm +367 -0
- package/ios/RNFBAppUnitTests/RNFBAppUnitTests.xcodeproj/project.pbxproj +590 -0
- package/ios/RNFBAppUnitTests/RNFBAppUnitTests.xcodeproj/xcshareddata/xcschemes/RNFBAppUnitTests.xcscheme +69 -0
- package/ios/RNFBAppUnitTests/RNFBFirebaseAppClientTests.swift +165 -0
- package/ios/RNFBAppUnitTests/RNFBHandleMapStorageTests.swift +121 -0
- package/ios/RNFBAppUnitTests/RNFBHandleMapTests.m +238 -0
- package/ios/RNFBAppUnitTests/RNFBInitializeAppArgumentsTests.swift +256 -0
- package/ios/RNFBAppUnitTests/RNFBJSONImplementationTests.swift +126 -0
- package/ios/RNFBAppUnitTests/RNFBJSONTests.m +172 -0
- package/ios/RNFBAppUnitTests/RNFBMetaStorageTests.swift +106 -0
- package/ios/RNFBAppUnitTests/RNFBMetaTests.m +65 -0
- package/ios/RNFBAppUnitTests/RNFBNullSentinelDecodingTests.swift +286 -0
- package/ios/RNFBAppUnitTests/RNFBNullSentinelInterceptorTests.m +312 -0
- package/ios/RNFBAppUnitTests/RNFBPreferencesStorageTests.swift +105 -0
- package/ios/RNFBAppUnitTests/RNFBPreferencesTests.m +110 -0
- package/ios/RNFBAppUnitTests/RNFBRCTEventEmitterCoreTests.swift +163 -0
- package/ios/RNFBAppUnitTests/RNFBRCTEventEmitterFacadeTests.m +141 -0
- package/ios/RNFBAppUnitTests/RNFBSharedUtilsConfigFacadeTests.m +100 -0
- package/ios/RNFBAppUnitTests/RNFBSharedUtilsConfigTests.swift +234 -0
- package/ios/RNFBAppUnitTests/RNFBSharedUtilsFIRAppFacadeTests.m +145 -0
- package/ios/RNFBAppUnitTests/RNFBSharedUtilsFIRAppTests.swift +173 -0
- package/ios/RNFBAppUnitTests/RNFBSharedUtilsFormattingFacadeTests.m +38 -0
- package/ios/RNFBAppUnitTests/RNFBSharedUtilsFormattingTests.swift +82 -0
- package/ios/RNFBAppUnitTests/RNFBSharedUtilsNullSentinelTests.m +35 -0
- package/ios/RNFBAppUnitTests/RNFBSharedUtilsPromiseRejectionFacadeTests.m +107 -0
- package/ios/RNFBAppUnitTests/RNFBSharedUtilsPromiseRejectionTests.swift +133 -0
- package/ios/RNFBAppUnitTests/RNFBUtilsHelpersTests.swift +144 -0
- package/ios/RNFBAppUnitTests/RNFBUtilsModuleFacadeTests.m +72 -0
- package/ios/RNFBAppUnitTests/RNFBUtilsModuleShellTests.mm +282 -0
- package/ios/RNFBFirebase/Package.swift +53 -0
- package/ios/RNFBFirebase/Sources/RNFBFirebase/RNFBFirebase.swift +285 -0
- package/ios/RNFBFirebase/Sources/RNFBFirebaseBridge/Public/.gitkeep +0 -0
- package/ios/RNFBFirebase/Sources/RNFBFirebaseBridge/RNFBFirebaseBridge.m +169 -0
- package/ios/RNFBFirebase/Sources/RNFBFirebaseBridge/include/RNFBFirebaseBridge.h +52 -0
- package/ios/RNFBFirebaseUnitTests/RNFBAppDynamicFacadeTests.swift +240 -0
- package/{android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseAppRegistrar.java → ios/RNFBFirebaseUnitTests/RNFBFirebaseClientImport.swift} +22 -17
- package/ios/RNFBFirebaseUnitTests/RNFBFirebaseUnitTests.xcodeproj/project.pbxproj +588 -0
- package/ios/RNFBFirebaseUnitTests/RNFBFirebaseUnitTests.xcodeproj/xcshareddata/xcschemes/RNFBFirebaseUnitTests.xcscheme +83 -0
- package/ios_config.sh +50 -22
- package/lib/FirebaseApp.ts +10 -0
- package/lib/common/Base64.ts +10 -16
- package/lib/common/deeps.ts +3 -0
- package/lib/common/index.ts +20 -9
- package/lib/internal/FirebaseModule.ts +6 -3
- package/lib/internal/NativeModules.ts +4 -1
- package/lib/internal/RNFBNativeEventEmitter.ts +14 -5
- package/lib/internal/SharedEventEmitter.ts +5 -1
- package/lib/internal/asyncStorage.ts +7 -11
- package/lib/internal/index.ts +1 -0
- package/lib/internal/logger.ts +53 -43
- package/lib/internal/nativeModuleAndroidIos.ts +2 -40
- package/lib/internal/nativeModuleDebug.ts +97 -0
- package/lib/internal/nativeModuleWeb.ts +10 -40
- package/lib/internal/react-native-vendor-emitter.d.ts +11 -0
- package/lib/internal/registry/app.ts +8 -2
- package/lib/internal/registry/modular.ts +2 -2
- package/lib/internal/registry/nativeModule.ts +3 -3
- package/lib/internal/web/RNFBAppModule.ts +16 -15
- package/lib/internal/web/memidb/lib/FakeEventTarget.js +3 -1
- package/lib/types/app.ts +10 -3
- package/lib/types/internal.ts +19 -0
- package/lib/version.ts +1 -1
- package/package.json +9 -8
- package/plugin/build/ios/appDelegate.js +19 -9
- package/plugin/build/ios/podfile.js +16 -16
- package/plugin/build/pluginConfig.d.ts +4 -2
- package/plugin/src/ios/appDelegate.ts +45 -15
- package/plugin/src/ios/podfile.ts +20 -23
- package/plugin/src/pluginConfig.ts +4 -2
- package/android/src/main/java/io/invertase/firebase/common/TaskExecutorService.java +0 -124
- package/android/src/main/java/io/invertase/firebase/common/UniversalFirebaseModule.java +0 -62
- package/android/src/main/java/io/invertase/firebase/common/UniversalFirebasePreferences.java +0 -91
- package/android/src/reactnative/java/io/invertase/firebase/app/NativeRNFBTurboApp.java +0 -222
- package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseApp.java +0 -46
- package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseAppPackage.java +0 -49
- package/android/src/reactnative/java/io/invertase/firebase/common/RCTConvertFirebase.java +0 -191
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseEvent.java +0 -53
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseEventEmitter.java +0 -606
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseJSON.java +0 -107
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseMeta.java +0 -101
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseModule.java +0 -146
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebasePreferences.java +0 -96
- package/android/src/reactnative/java/io/invertase/firebase/common/SharedUtils.java +0 -441
- package/android/src/reactnative/java/io/invertase/firebase/utils/NativeRNFBTurboUtils.java +0 -223
|
@@ -15,13 +15,12 @@
|
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
#import <React/RCTUtils.h>
|
|
19
|
-
|
|
20
|
-
#import "RNFBApp/RNFBSharedUtils.h"
|
|
21
|
-
#import "RNFBAppTurboModules.h"
|
|
22
18
|
#import "RNFBUtilsModule.h"
|
|
19
|
+
#import "RNFBAppTurboModules.h"
|
|
20
|
+
#import "RNFBUtilsModuleImplementation.h"
|
|
23
21
|
|
|
24
22
|
@interface RNFBUtilsModule () <NativeRNFBTurboUtilsSpec>
|
|
23
|
+
|
|
25
24
|
@end
|
|
26
25
|
|
|
27
26
|
@implementation RNFBUtilsModule
|
|
@@ -42,109 +41,35 @@ RCT_EXPORT_MODULE(NativeRNFBTurboUtils)
|
|
|
42
41
|
#pragma mark -
|
|
43
42
|
#pragma mark Constants
|
|
44
43
|
|
|
45
|
-
- (NSString *)getPathForDirectory:(int)directory {
|
|
46
|
-
NSArray *paths =
|
|
47
|
-
NSSearchPathForDirectoriesInDomains((NSSearchPathDirectory)directory, NSUserDomainMask, YES);
|
|
48
|
-
return [paths firstObject];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
- (NSDictionary *)utilsConstantsDictionary {
|
|
52
|
-
NSMutableDictionary *constants = [@{
|
|
53
|
-
@"isRunningInTestLab" : @NO,
|
|
54
|
-
@"MAIN_BUNDLE" : [[NSBundle mainBundle] bundlePath],
|
|
55
|
-
@"CACHES_DIRECTORY" : [self getPathForDirectory:NSCachesDirectory],
|
|
56
|
-
@"DOCUMENT_DIRECTORY" : [self getPathForDirectory:NSDocumentDirectory],
|
|
57
|
-
@"PICTURES_DIRECTORY" : [self getPathForDirectory:NSPicturesDirectory],
|
|
58
|
-
@"MOVIES_DIRECTORY" : [self getPathForDirectory:NSMoviesDirectory],
|
|
59
|
-
@"TEMP_DIRECTORY" : NSTemporaryDirectory(),
|
|
60
|
-
@"LIBRARY_DIRECTORY" : [self getPathForDirectory:NSLibraryDirectory],
|
|
61
|
-
} mutableCopy];
|
|
62
|
-
|
|
63
|
-
NSString *appVersion =
|
|
64
|
-
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
|
|
65
|
-
if ([appVersion isKindOfClass:[NSString class]] && appVersion.length > 0) {
|
|
66
|
-
constants[@"appVersion"] = appVersion;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return [constants copy];
|
|
70
|
-
}
|
|
71
|
-
|
|
72
44
|
- (facebook::react::ModuleConstants<JS::NativeRNFBTurboUtils::Constants>)constantsToExport {
|
|
73
|
-
return [_RCTTypedModuleConstants newWithUnsafeDictionary:
|
|
45
|
+
return [_RCTTypedModuleConstants newWithUnsafeDictionary:RNFBUtilsModuleConstantsDictionary()];
|
|
74
46
|
}
|
|
75
47
|
|
|
76
48
|
- (facebook::react::ModuleConstants<JS::NativeRNFBTurboUtils::Constants>)getConstants {
|
|
77
|
-
return [
|
|
49
|
+
return [_RCTTypedModuleConstants newWithUnsafeDictionary:RNFBUtilsModuleConstantsDictionary()];
|
|
78
50
|
}
|
|
79
51
|
|
|
80
52
|
#pragma mark -
|
|
81
|
-
#pragma mark
|
|
53
|
+
#pragma mark Methods
|
|
82
54
|
|
|
83
55
|
- (void)androidGetPlayServicesStatus:(RCTPromiseResolveBlock)resolve
|
|
84
56
|
reject:(RCTPromiseRejectBlock)reject {
|
|
85
|
-
resolve
|
|
86
|
-
@"isAvailable" : @YES,
|
|
87
|
-
@"status" : @0,
|
|
88
|
-
@"hasResolution" : @NO,
|
|
89
|
-
@"isUserResolvableError" : @NO,
|
|
90
|
-
});
|
|
57
|
+
RNFBUtilsModuleAndroidGetPlayServicesStatus(resolve, reject);
|
|
91
58
|
}
|
|
92
59
|
|
|
93
60
|
- (void)androidPromptForPlayServices:(RCTPromiseResolveBlock)resolve
|
|
94
61
|
reject:(RCTPromiseRejectBlock)reject {
|
|
95
|
-
resolve
|
|
62
|
+
RNFBUtilsModuleAndroidPromptForPlayServices(resolve, reject);
|
|
96
63
|
}
|
|
97
64
|
|
|
98
65
|
- (void)androidResolutionForPlayServices:(RCTPromiseResolveBlock)resolve
|
|
99
66
|
reject:(RCTPromiseRejectBlock)reject {
|
|
100
|
-
resolve
|
|
67
|
+
RNFBUtilsModuleAndroidResolutionForPlayServices(resolve, reject);
|
|
101
68
|
}
|
|
102
69
|
|
|
103
70
|
- (void)androidMakePlayServicesAvailable:(RCTPromiseResolveBlock)resolve
|
|
104
71
|
reject:(RCTPromiseRejectBlock)reject {
|
|
105
|
-
resolve
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
#pragma mark -
|
|
109
|
-
#pragma mark Firebase Utils Methods
|
|
110
|
-
|
|
111
|
-
+ (BOOL)isRemoteAsset:(NSString *)localFilePath {
|
|
112
|
-
return [localFilePath hasPrefix:@"assets-library://"] || [localFilePath hasPrefix:@"ph://"];
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
+ (BOOL)unused_isHeic:(NSString *)localFilePath {
|
|
116
|
-
return [[localFilePath pathExtension] caseInsensitiveCompare:@"heic"] == NSOrderedSame;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
+ (NSString *)valueForKey:(NSString *)key fromQueryItems:(NSArray *)queryItems {
|
|
120
|
-
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name=%@", key];
|
|
121
|
-
NSURLQueryItem *queryItem = [[queryItems filteredArrayUsingPredicate:predicate] firstObject];
|
|
122
|
-
return queryItem.value;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
+ (PHAsset *)fetchAssetForPath:(NSString *)localFilePath {
|
|
126
|
-
PHAsset *asset = nil;
|
|
127
|
-
|
|
128
|
-
if ([localFilePath hasPrefix:@"assets-library://"] || [localFilePath hasPrefix:@"ph://"]) {
|
|
129
|
-
if ([localFilePath hasPrefix:@"assets-library://"]) {
|
|
130
|
-
static BOOL hasWarned = NO;
|
|
131
|
-
if (!hasWarned) {
|
|
132
|
-
NSLog(@"'assets-library://' & 'ph://' URLs are not supported in Catalyst-based targets "
|
|
133
|
-
@"or iOS 12 and higher; returning nil (future warnings will be suppressed)");
|
|
134
|
-
hasWarned = YES;
|
|
135
|
-
}
|
|
136
|
-
} else {
|
|
137
|
-
NSString *assetId = [localFilePath substringFromIndex:@"ph://".length];
|
|
138
|
-
asset = [[PHAsset fetchAssetsWithLocalIdentifiers:@[ assetId ] options:nil] firstObject];
|
|
139
|
-
}
|
|
140
|
-
} else {
|
|
141
|
-
NSURLComponents *components = [NSURLComponents componentsWithString:localFilePath];
|
|
142
|
-
NSArray *queryItems = components.queryItems;
|
|
143
|
-
NSString *assetId = [self valueForKey:@"id" fromQueryItems:queryItems];
|
|
144
|
-
asset = [[PHAsset fetchAssetsWithLocalIdentifiers:@[ assetId ] options:nil] firstObject];
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
return asset;
|
|
72
|
+
RNFBUtilsModuleAndroidMakePlayServicesAvailable(resolve, reject);
|
|
148
73
|
}
|
|
149
74
|
|
|
150
75
|
@end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this library except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
#import <Foundation/Foundation.h>
|
|
18
|
+
#import <React/RCTBridgeModule.h>
|
|
19
|
+
|
|
20
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
21
|
+
|
|
22
|
+
FOUNDATION_EXPORT NSDictionary *RNFBUtilsModuleConstantsDictionary(void);
|
|
23
|
+
FOUNDATION_EXPORT void RNFBUtilsModuleAndroidGetPlayServicesStatus(RCTPromiseResolveBlock resolve,
|
|
24
|
+
RCTPromiseRejectBlock reject);
|
|
25
|
+
FOUNDATION_EXPORT void RNFBUtilsModuleAndroidPromptForPlayServices(RCTPromiseResolveBlock resolve,
|
|
26
|
+
RCTPromiseRejectBlock reject);
|
|
27
|
+
FOUNDATION_EXPORT void RNFBUtilsModuleAndroidResolutionForPlayServices(
|
|
28
|
+
RCTPromiseResolveBlock resolve, RCTPromiseRejectBlock reject);
|
|
29
|
+
FOUNDATION_EXPORT void RNFBUtilsModuleAndroidMakePlayServicesAvailable(
|
|
30
|
+
RCTPromiseResolveBlock resolve, RCTPromiseRejectBlock reject);
|
|
31
|
+
|
|
32
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this library except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
#import "RNFBUtilsModuleImplementation.h"
|
|
18
|
+
|
|
19
|
+
#if __has_include(<RNFBApp/RNFBApp-Swift.h>)
|
|
20
|
+
#import <RNFBApp/RNFBApp-Swift.h>
|
|
21
|
+
#elif __has_include("RNFBApp-Swift.h")
|
|
22
|
+
#import "RNFBApp-Swift.h"
|
|
23
|
+
#elif __has_include("RNFBHandleMapStorage-Swift.inc")
|
|
24
|
+
#import "RNFBHandleMapStorage-Swift.inc"
|
|
25
|
+
#else
|
|
26
|
+
#error "RNFBApp Swift interface not found"
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
NSDictionary *RNFBUtilsModuleConstantsDictionary(void) {
|
|
30
|
+
return [RNFBUtilsHelpers utilsConstantsDictionary];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
void RNFBUtilsModuleAndroidGetPlayServicesStatus(RCTPromiseResolveBlock resolve,
|
|
34
|
+
RCTPromiseRejectBlock reject) {
|
|
35
|
+
resolve(@{
|
|
36
|
+
@"isAvailable" : @YES,
|
|
37
|
+
@"status" : @0,
|
|
38
|
+
@"hasResolution" : @NO,
|
|
39
|
+
@"isUserResolvableError" : @NO,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
void RNFBUtilsModuleAndroidPromptForPlayServices(RCTPromiseResolveBlock resolve,
|
|
44
|
+
RCTPromiseRejectBlock reject) {
|
|
45
|
+
resolve(nil);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
void RNFBUtilsModuleAndroidResolutionForPlayServices(RCTPromiseResolveBlock resolve,
|
|
49
|
+
RCTPromiseRejectBlock reject) {
|
|
50
|
+
resolve(nil);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
void RNFBUtilsModuleAndroidMakePlayServicesAvailable(RCTPromiseResolveBlock resolve,
|
|
54
|
+
RCTPromiseRejectBlock reject) {
|
|
55
|
+
resolve(nil);
|
|
56
|
+
}
|
|
@@ -18,6 +18,30 @@
|
|
|
18
18
|
4D97BAD423042F2700077358 /* RNFBUtilsModule.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4D97BAD323042F2700077358 /* RNFBUtilsModule.mm */; };
|
|
19
19
|
DAA1F28522FCF6AD00F4DEC1 /* RNFBVersion.m in Sources */ = {isa = PBXBuildFile; fileRef = DAA1F28422FCF6AD00F4DEC1 /* RNFBVersion.m */; };
|
|
20
20
|
RNFB00001A2025011100000001 /* RNFBNullSentinelInterceptor.m in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2025011100000002 /* RNFBNullSentinelInterceptor.m */; };
|
|
21
|
+
RNFB00001A2026082000000001 /* RNFBHandleMap.m in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026082000000002 /* RNFBHandleMap.m */; };
|
|
22
|
+
RNFB00001A2026092200000001 /* RNFBHandleMapStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026092200000002 /* RNFBHandleMapStorage.swift */; };
|
|
23
|
+
RNFB00001A2026092200000011 /* RNFBPreferencesStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026092200000012 /* RNFBPreferencesStorage.swift */; };
|
|
24
|
+
RNFB00001A2026092200000021 /* RNFBJSONImplementation.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026092200000022 /* RNFBJSONImplementation.swift */; };
|
|
25
|
+
RNFB00001A2026092200000031 /* RNFBMetaStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026092200000032 /* RNFBMetaStorage.swift */; };
|
|
26
|
+
RNFB00001A2026092200000041 /* RNFBNullSentinelDecoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026092200000042 /* RNFBNullSentinelDecoding.swift */; };
|
|
27
|
+
RNFB00001A2026101500000141 /* RNFBInitializeAppArguments.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026101500000142 /* RNFBInitializeAppArguments.swift */; };
|
|
28
|
+
RNFB00001A2026092200000051 /* RNFBSharedUtilsFormatting.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026092200000052 /* RNFBSharedUtilsFormatting.swift */; };
|
|
29
|
+
RNFB00001A2026092300000061 /* RNFBSharedUtilsConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026092300000062 /* RNFBSharedUtilsConfig.swift */; };
|
|
30
|
+
RNFB00001A2026092300000071 /* RNFBSharedUtilsPromiseRejection.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026092300000072 /* RNFBSharedUtilsPromiseRejection.swift */; };
|
|
31
|
+
RNFB00001A2026092300000081 /* RNFBSharedUtilsFIRApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026092300000082 /* RNFBSharedUtilsFIRApp.swift */; };
|
|
32
|
+
RNFB00001A2026092300000091 /* RCTConvertFIRApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026092300000092 /* RCTConvertFIRApp.swift */; };
|
|
33
|
+
RNFB00001A20260923000000A1 /* RCTConvertFIROptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A20260923000000A2 /* RCTConvertFIROptions.swift */; };
|
|
34
|
+
RNFB00001A20260923000000B1 /* RNFBRCTEventEmitterCore.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A20260923000000B2 /* RNFBRCTEventEmitterCore.swift */; };
|
|
35
|
+
RNFB00001A20260923000000C1 /* RNFBUtilsHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A20260923000000C2 /* RNFBUtilsHelpers.swift */; };
|
|
36
|
+
RNFB00001A20260923000000C3 /* RNFBUtilsModule+Foundation.m in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A20260923000000C4 /* RNFBUtilsModule+Foundation.m */; };
|
|
37
|
+
RNFB00001A20260923000000D1 /* RNFBAppCustomAuthDomains.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A20260923000000D2 /* RNFBAppCustomAuthDomains.swift */; };
|
|
38
|
+
RNFB00001A20260923000000E1 /* RNFBAppLogLevelMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A20260923000000E2 /* RNFBAppLogLevelMapper.swift */; };
|
|
39
|
+
RNFB00001A20260923000000F1 /* RNFBAppInitializeOptionsMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A20260923000000F2 /* RNFBAppInitializeOptionsMapper.swift */; };
|
|
40
|
+
RNFB00001A2026092800000101 /* RNFBAppModuleFirebase.swift in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026092800000102 /* RNFBAppModuleFirebase.swift */; };
|
|
41
|
+
RNFB00001A2026092800000103 /* RNFBAppModule+CustomAuthDomain.m in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026092800000104 /* RNFBAppModule+CustomAuthDomain.m */; };
|
|
42
|
+
RNFB00001A2026093000000111 /* RNFBAppModuleImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026093000000112 /* RNFBAppModuleImplementation.m */; };
|
|
43
|
+
RNFB00001A2026093000000121 /* RNFBUtilsModuleImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026093000000122 /* RNFBUtilsModuleImplementation.m */; };
|
|
44
|
+
RNFB00001A2026093000000131 /* RNFBUtilsModule+PhotoAssets.m in Sources */ = {isa = PBXBuildFile; fileRef = RNFB00001A2026093000000132 /* RNFBUtilsModule+PhotoAssets.m */; };
|
|
21
45
|
/* End PBXBuildFile section */
|
|
22
46
|
|
|
23
47
|
/* Begin PBXCopyFilesBuildPhase section */
|
|
@@ -56,6 +80,33 @@
|
|
|
56
80
|
DAA1F28622FCF6C200F4DEC1 /* RNFBVersion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNFBVersion.h; sourceTree = "<group>"; };
|
|
57
81
|
RNFB00001A2025011100000002 /* RNFBNullSentinelInterceptor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNFBNullSentinelInterceptor.m; sourceTree = "<group>"; };
|
|
58
82
|
RNFB00001A2025011100000003 /* RNFBNullSentinelInterceptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNFBNullSentinelInterceptor.h; sourceTree = "<group>"; };
|
|
83
|
+
RNFB00001A2026082000000002 /* RNFBHandleMap.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNFBHandleMap.m; sourceTree = "<group>"; };
|
|
84
|
+
RNFB00001A2026082000000003 /* RNFBHandleMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNFBHandleMap.h; sourceTree = "<group>"; };
|
|
85
|
+
RNFB00001A2026092200000002 /* RNFBHandleMapStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNFBHandleMapStorage.swift; sourceTree = "<group>"; };
|
|
86
|
+
RNFB00001A2026092200000012 /* RNFBPreferencesStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNFBPreferencesStorage.swift; sourceTree = "<group>"; };
|
|
87
|
+
RNFB00001A2026092200000022 /* RNFBJSONImplementation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNFBJSONImplementation.swift; sourceTree = "<group>"; };
|
|
88
|
+
RNFB00001A2026092200000032 /* RNFBMetaStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNFBMetaStorage.swift; sourceTree = "<group>"; };
|
|
89
|
+
RNFB00001A2026092200000042 /* RNFBNullSentinelDecoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNFBNullSentinelDecoding.swift; sourceTree = "<group>"; };
|
|
90
|
+
RNFB00001A2026101500000142 /* RNFBInitializeAppArguments.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNFBInitializeAppArguments.swift; sourceTree = "<group>"; };
|
|
91
|
+
RNFB00001A2026092200000052 /* RNFBSharedUtilsFormatting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNFBSharedUtilsFormatting.swift; sourceTree = "<group>"; };
|
|
92
|
+
RNFB00001A2026092300000062 /* RNFBSharedUtilsConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNFBSharedUtilsConfig.swift; sourceTree = "<group>"; };
|
|
93
|
+
RNFB00001A2026092300000072 /* RNFBSharedUtilsPromiseRejection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNFBSharedUtilsPromiseRejection.swift; sourceTree = "<group>"; };
|
|
94
|
+
RNFB00001A2026092300000082 /* RNFBSharedUtilsFIRApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNFBSharedUtilsFIRApp.swift; sourceTree = "<group>"; };
|
|
95
|
+
RNFB00001A2026092300000092 /* RCTConvertFIRApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RCTConvertFIRApp.swift; sourceTree = "<group>"; };
|
|
96
|
+
RNFB00001A20260923000000A2 /* RCTConvertFIROptions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RCTConvertFIROptions.swift; sourceTree = "<group>"; };
|
|
97
|
+
RNFB00001A20260923000000B2 /* RNFBRCTEventEmitterCore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNFBRCTEventEmitterCore.swift; sourceTree = "<group>"; };
|
|
98
|
+
RNFB00001A20260923000000C2 /* RNFBUtilsHelpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNFBUtilsHelpers.swift; sourceTree = "<group>"; };
|
|
99
|
+
RNFB00001A20260923000000C4 /* RNFBUtilsModule+Foundation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RNFBUtilsModule+Foundation.m"; sourceTree = "<group>"; };
|
|
100
|
+
RNFB00001A20260923000000D2 /* RNFBAppCustomAuthDomains.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNFBAppCustomAuthDomains.swift; sourceTree = "<group>"; };
|
|
101
|
+
RNFB00001A20260923000000E2 /* RNFBAppLogLevelMapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNFBAppLogLevelMapper.swift; sourceTree = "<group>"; };
|
|
102
|
+
RNFB00001A20260923000000F2 /* RNFBAppInitializeOptionsMapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNFBAppInitializeOptionsMapper.swift; sourceTree = "<group>"; };
|
|
103
|
+
RNFB00001A2026092800000102 /* RNFBAppModuleFirebase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNFBAppModuleFirebase.swift; sourceTree = "<group>"; };
|
|
104
|
+
RNFB00001A2026092800000104 /* RNFBAppModule+CustomAuthDomain.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RNFBAppModule+CustomAuthDomain.m"; sourceTree = "<group>"; };
|
|
105
|
+
RNFB00001A2026093000000113 /* RNFBAppModuleImplementation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNFBAppModuleImplementation.h; sourceTree = "<group>"; };
|
|
106
|
+
RNFB00001A2026093000000112 /* RNFBAppModuleImplementation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNFBAppModuleImplementation.m; sourceTree = "<group>"; };
|
|
107
|
+
RNFB00001A2026093000000123 /* RNFBUtilsModuleImplementation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNFBUtilsModuleImplementation.h; sourceTree = "<group>"; };
|
|
108
|
+
RNFB00001A2026093000000122 /* RNFBUtilsModuleImplementation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNFBUtilsModuleImplementation.m; sourceTree = "<group>"; };
|
|
109
|
+
RNFB00001A2026093000000132 /* RNFBUtilsModule+PhotoAssets.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RNFBUtilsModule+PhotoAssets.m"; sourceTree = "<group>"; };
|
|
59
110
|
/* End PBXFileReference section */
|
|
60
111
|
|
|
61
112
|
/* Begin PBXFrameworksBuildPhase section */
|
|
@@ -82,26 +133,53 @@
|
|
|
82
133
|
children = (
|
|
83
134
|
2748D8112236417700FC8DC8 /* RNFBSharedUtils.h */,
|
|
84
135
|
2748D8102236417700FC8DC8 /* RNFBSharedUtils.m */,
|
|
136
|
+
RNFB00001A2026092200000052 /* RNFBSharedUtilsFormatting.swift */,
|
|
137
|
+
RNFB00001A2026092300000062 /* RNFBSharedUtilsConfig.swift */,
|
|
138
|
+
RNFB00001A2026092300000072 /* RNFBSharedUtilsPromiseRejection.swift */,
|
|
139
|
+
RNFB00001A2026092300000082 /* RNFBSharedUtilsFIRApp.swift */,
|
|
85
140
|
2744B98D21F45E8B004F8E3F /* RNFBRCTEventEmitter.h */,
|
|
86
141
|
2744B99021F46140004F8E3F /* RNFBRCTEventEmitter.m */,
|
|
142
|
+
RNFB00001A20260923000000B2 /* RNFBRCTEventEmitterCore.swift */,
|
|
87
143
|
2744B9A221F48826004F8E3F /* RCTConvert+FIROptions.h */,
|
|
88
144
|
2744B9A321F48A4F004F8E3F /* RCTConvert+FIROptions.m */,
|
|
145
|
+
RNFB00001A20260923000000A2 /* RCTConvertFIROptions.swift */,
|
|
89
146
|
2748D81E2237012B00FC8DC8 /* RNFBMeta.h */,
|
|
90
147
|
2748D81F2237018600FC8DC8 /* RNFBMeta.m */,
|
|
148
|
+
RNFB00001A2026092200000032 /* RNFBMetaStorage.swift */,
|
|
91
149
|
2744B9A521F57BD9004F8E3F /* RCTConvert+FIRApp.h */,
|
|
92
150
|
2744B9A621F57C2F004F8E3F /* RCTConvert+FIRApp.m */,
|
|
151
|
+
RNFB00001A2026092300000092 /* RCTConvertFIRApp.swift */,
|
|
93
152
|
2744B98421F45429004F8E3F /* RNFBAppModule.h */,
|
|
94
153
|
2744B98521F45429004F8E3F /* RNFBAppModule.mm */,
|
|
154
|
+
RNFB00001A2026093000000113 /* RNFBAppModuleImplementation.h */,
|
|
155
|
+
RNFB00001A2026093000000112 /* RNFBAppModuleImplementation.m */,
|
|
156
|
+
RNFB00001A2026092800000104 /* RNFBAppModule+CustomAuthDomain.m */,
|
|
157
|
+
RNFB00001A2026092800000102 /* RNFBAppModuleFirebase.swift */,
|
|
158
|
+
RNFB00001A20260923000000D2 /* RNFBAppCustomAuthDomains.swift */,
|
|
159
|
+
RNFB00001A20260923000000E2 /* RNFBAppLogLevelMapper.swift */,
|
|
160
|
+
RNFB00001A20260923000000F2 /* RNFBAppInitializeOptionsMapper.swift */,
|
|
95
161
|
2748D8162236428100FC8DC8 /* RNFBJSON.h */,
|
|
96
162
|
2748D8142236426300FC8DC8 /* RNFBJSON.m */,
|
|
163
|
+
RNFB00001A2026092200000022 /* RNFBJSONImplementation.swift */,
|
|
97
164
|
2748D81A223674B600FC8DC8 /* RNFBPreferences.h */,
|
|
98
165
|
2748D81B223674CD00FC8DC8 /* RNFBPreferences.m */,
|
|
166
|
+
RNFB00001A2026092200000012 /* RNFBPreferencesStorage.swift */,
|
|
99
167
|
DAA1F28422FCF6AD00F4DEC1 /* RNFBVersion.m */,
|
|
100
168
|
DAA1F28622FCF6C200F4DEC1 /* RNFBVersion.h */,
|
|
101
169
|
4D97BAD223042F0800077358 /* RNFBUtilsModule.h */,
|
|
102
170
|
4D97BAD323042F2700077358 /* RNFBUtilsModule.mm */,
|
|
171
|
+
RNFB00001A2026093000000123 /* RNFBUtilsModuleImplementation.h */,
|
|
172
|
+
RNFB00001A2026093000000122 /* RNFBUtilsModuleImplementation.m */,
|
|
173
|
+
RNFB00001A20260923000000C2 /* RNFBUtilsHelpers.swift */,
|
|
174
|
+
RNFB00001A20260923000000C4 /* RNFBUtilsModule+Foundation.m */,
|
|
175
|
+
RNFB00001A2026093000000132 /* RNFBUtilsModule+PhotoAssets.m */,
|
|
103
176
|
RNFB00001A2025011100000003 /* RNFBNullSentinelInterceptor.h */,
|
|
104
177
|
RNFB00001A2025011100000002 /* RNFBNullSentinelInterceptor.m */,
|
|
178
|
+
RNFB00001A2026092200000042 /* RNFBNullSentinelDecoding.swift */,
|
|
179
|
+
RNFB00001A2026101500000142 /* RNFBInitializeAppArguments.swift */,
|
|
180
|
+
RNFB00001A2026082000000003 /* RNFBHandleMap.h */,
|
|
181
|
+
RNFB00001A2026082000000002 /* RNFBHandleMap.m */,
|
|
182
|
+
RNFB00001A2026092200000002 /* RNFBHandleMapStorage.swift */,
|
|
105
183
|
);
|
|
106
184
|
path = RNFBApp;
|
|
107
185
|
sourceTree = "<group>";
|
|
@@ -184,6 +262,30 @@
|
|
|
184
262
|
2744B9A421F48A4F004F8E3F /* RCTConvert+FIROptions.m in Sources */,
|
|
185
263
|
2748D8152236426300FC8DC8 /* RNFBJSON.m in Sources */,
|
|
186
264
|
RNFB00001A2025011100000001 /* RNFBNullSentinelInterceptor.m in Sources */,
|
|
265
|
+
RNFB00001A2026082000000001 /* RNFBHandleMap.m in Sources */,
|
|
266
|
+
RNFB00001A2026092200000001 /* RNFBHandleMapStorage.swift in Sources */,
|
|
267
|
+
RNFB00001A2026092200000011 /* RNFBPreferencesStorage.swift in Sources */,
|
|
268
|
+
RNFB00001A2026092200000021 /* RNFBJSONImplementation.swift in Sources */,
|
|
269
|
+
RNFB00001A2026092200000031 /* RNFBMetaStorage.swift in Sources */,
|
|
270
|
+
RNFB00001A2026092200000041 /* RNFBNullSentinelDecoding.swift in Sources */,
|
|
271
|
+
RNFB00001A2026101500000141 /* RNFBInitializeAppArguments.swift in Sources */,
|
|
272
|
+
RNFB00001A2026092200000051 /* RNFBSharedUtilsFormatting.swift in Sources */,
|
|
273
|
+
RNFB00001A2026092300000061 /* RNFBSharedUtilsConfig.swift in Sources */,
|
|
274
|
+
RNFB00001A2026092300000071 /* RNFBSharedUtilsPromiseRejection.swift in Sources */,
|
|
275
|
+
RNFB00001A2026092300000081 /* RNFBSharedUtilsFIRApp.swift in Sources */,
|
|
276
|
+
RNFB00001A2026092300000091 /* RCTConvertFIRApp.swift in Sources */,
|
|
277
|
+
RNFB00001A20260923000000A1 /* RCTConvertFIROptions.swift in Sources */,
|
|
278
|
+
RNFB00001A20260923000000B1 /* RNFBRCTEventEmitterCore.swift in Sources */,
|
|
279
|
+
RNFB00001A20260923000000C1 /* RNFBUtilsHelpers.swift in Sources */,
|
|
280
|
+
RNFB00001A20260923000000C3 /* RNFBUtilsModule+Foundation.m in Sources */,
|
|
281
|
+
RNFB00001A20260923000000D1 /* RNFBAppCustomAuthDomains.swift in Sources */,
|
|
282
|
+
RNFB00001A20260923000000E1 /* RNFBAppLogLevelMapper.swift in Sources */,
|
|
283
|
+
RNFB00001A20260923000000F1 /* RNFBAppInitializeOptionsMapper.swift in Sources */,
|
|
284
|
+
RNFB00001A2026092800000101 /* RNFBAppModuleFirebase.swift in Sources */,
|
|
285
|
+
RNFB00001A2026092800000103 /* RNFBAppModule+CustomAuthDomain.m in Sources */,
|
|
286
|
+
RNFB00001A2026093000000111 /* RNFBAppModuleImplementation.m in Sources */,
|
|
287
|
+
RNFB00001A2026093000000121 /* RNFBUtilsModuleImplementation.m in Sources */,
|
|
288
|
+
RNFB00001A2026093000000131 /* RNFBUtilsModule+PhotoAssets.m in Sources */,
|
|
187
289
|
);
|
|
188
290
|
runOnlyForDeploymentPostprocessing = 0;
|
|
189
291
|
};
|
|
@@ -209,6 +311,7 @@
|
|
|
209
311
|
CODE_SIGN_STYLE = Automatic;
|
|
210
312
|
COPY_PHASE_STRIP = NO;
|
|
211
313
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
|
314
|
+
DEFINES_MODULE = YES;
|
|
212
315
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
|
213
316
|
GCC_DYNAMIC_NO_PIC = NO;
|
|
214
317
|
GCC_OPTIMIZATION_LEVEL = 0;
|
|
@@ -225,6 +328,7 @@
|
|
|
225
328
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
226
329
|
SDKROOT = iphoneos;
|
|
227
330
|
SKIP_INSTALL = YES;
|
|
331
|
+
SWIFT_VERSION = 5.10;
|
|
228
332
|
TARGETED_DEVICE_FAMILY = "1,2";
|
|
229
333
|
};
|
|
230
334
|
name = Debug;
|
|
@@ -248,6 +352,7 @@
|
|
|
248
352
|
CODE_SIGN_STYLE = Automatic;
|
|
249
353
|
COPY_PHASE_STRIP = NO;
|
|
250
354
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
|
355
|
+
DEFINES_MODULE = YES;
|
|
251
356
|
ENABLE_NS_ASSERTIONS = NO;
|
|
252
357
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
|
253
358
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
@@ -259,6 +364,7 @@
|
|
|
259
364
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
260
365
|
SDKROOT = iphoneos;
|
|
261
366
|
SKIP_INSTALL = YES;
|
|
367
|
+
SWIFT_VERSION = 5.10;
|
|
262
368
|
TARGETED_DEVICE_FAMILY = "1,2";
|
|
263
369
|
VALIDATE_PRODUCT = YES;
|
|
264
370
|
};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host-only stub for macOS XCTest (IosTest-AD-1). Not shipped in the production pod.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
#import "FirebaseCore.h"
|
|
6
|
+
|
|
7
|
+
@implementation FIROptions
|
|
8
|
+
|
|
9
|
+
- (instancetype)initWithGoogleAppID:(NSString *)googleAppID GCMSenderID:(NSString *)GCMSenderID {
|
|
10
|
+
self = [super init];
|
|
11
|
+
if (self) {
|
|
12
|
+
_googleAppID = [googleAppID copy];
|
|
13
|
+
_GCMSenderID = [GCMSenderID copy];
|
|
14
|
+
}
|
|
15
|
+
return self;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@end
|
|
19
|
+
|
|
20
|
+
@implementation FIRApp
|
|
21
|
+
|
|
22
|
+
static FIRApp *_Nullable RNFBStubDefaultApp;
|
|
23
|
+
static NSMutableDictionary<NSString *, FIRApp *> *_Nullable RNFBStubNamedApps;
|
|
24
|
+
static NSString *_Nullable RNFBStubLastLibraryName;
|
|
25
|
+
static NSString *_Nullable RNFBStubLastLibraryVersion;
|
|
26
|
+
static BOOL RNFBStubRegisterLibraryAvailable = YES;
|
|
27
|
+
|
|
28
|
+
+ (NSMutableDictionary<NSString *, FIRApp *> *)namedAppsRegistry {
|
|
29
|
+
if (RNFBStubNamedApps == nil) {
|
|
30
|
+
RNFBStubNamedApps = [[NSMutableDictionary alloc] init];
|
|
31
|
+
}
|
|
32
|
+
return RNFBStubNamedApps;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
- (instancetype)initWithName:(NSString *)name options:(FIROptions *)options {
|
|
36
|
+
self = [super init];
|
|
37
|
+
if (self) {
|
|
38
|
+
_name = [name copy];
|
|
39
|
+
_options = options ?: [[FIROptions alloc] init];
|
|
40
|
+
_dataCollectionDefaultEnabled = NO;
|
|
41
|
+
}
|
|
42
|
+
return self;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
+ (FIRApp *)defaultApp {
|
|
46
|
+
return RNFBStubDefaultApp;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
+ (FIRApp *)appNamed:(NSString *)name {
|
|
50
|
+
return [self namedAppsRegistry][name];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
+ (NSDictionary<NSString *, FIRApp *> *)allApps {
|
|
54
|
+
NSMutableDictionary<NSString *, FIRApp *> *apps = [[NSMutableDictionary alloc] init];
|
|
55
|
+
if (RNFBStubDefaultApp != nil) {
|
|
56
|
+
apps[RNFBStubDefaultApp.name] = RNFBStubDefaultApp;
|
|
57
|
+
}
|
|
58
|
+
[apps addEntriesFromDictionary:[self namedAppsRegistry]];
|
|
59
|
+
return apps.count > 0 ? apps : nil;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
+ (void)configure {
|
|
63
|
+
FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:@"stub-app-id"
|
|
64
|
+
GCMSenderID:@"stub-sender"];
|
|
65
|
+
[self configureWithOptions:options];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
+ (void)configureWithOptions:(FIROptions *)options {
|
|
69
|
+
if (RNFBStubDefaultApp != nil) {
|
|
70
|
+
// Mirrors FirebaseCore: configuring the default app twice raises.
|
|
71
|
+
[NSException raise:NSInternalInconsistencyException
|
|
72
|
+
format:@"Default app has already been configured."];
|
|
73
|
+
}
|
|
74
|
+
RNFBStubDefaultApp = [[FIRApp alloc] initWithName:@"__FIRAPP_DEFAULT" options:options];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
+ (void)configureWithName:(NSString *)name options:(FIROptions *)options {
|
|
78
|
+
if ([self namedAppsRegistry][name] != nil) {
|
|
79
|
+
// Mirrors FirebaseCore: configuring a named app twice raises.
|
|
80
|
+
[NSException raise:NSInternalInconsistencyException
|
|
81
|
+
format:@"App named %@ has already been configured.", name];
|
|
82
|
+
}
|
|
83
|
+
FIRApp *app = [[FIRApp alloc] initWithName:name options:options];
|
|
84
|
+
[self namedAppsRegistry][name] = app;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
+ (void)registerLibrary:(NSString *)name withVersion:(NSString *)version {
|
|
88
|
+
RNFBStubLastLibraryName = [name copy];
|
|
89
|
+
RNFBStubLastLibraryVersion = [version copy];
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
+ (void)setRegisterLibraryAvailableForTesting:(BOOL)available {
|
|
93
|
+
RNFBStubRegisterLibraryAvailable = available;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
+ (BOOL)respondsToSelector:(SEL)selector {
|
|
97
|
+
if (selector == @selector(registerLibrary:withVersion:) && !RNFBStubRegisterLibraryAvailable) {
|
|
98
|
+
return NO;
|
|
99
|
+
}
|
|
100
|
+
return [super respondsToSelector:selector];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
- (void)deleteApp:(void (^)(BOOL success))completion {
|
|
104
|
+
if (RNFBStubDefaultApp == self) {
|
|
105
|
+
RNFBStubDefaultApp = nil;
|
|
106
|
+
}
|
|
107
|
+
[[self.class namedAppsRegistry] removeObjectForKey:self.name];
|
|
108
|
+
if (completion) {
|
|
109
|
+
completion(YES);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
+ (void)setDefaultAppForTesting:(FIRApp *)app {
|
|
114
|
+
RNFBStubDefaultApp = app;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
+ (void)registerAppForTesting:(FIRApp *)app {
|
|
118
|
+
[self namedAppsRegistry][app.name] = app;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
+ (void)resetRegistryForTesting {
|
|
122
|
+
RNFBStubDefaultApp = nil;
|
|
123
|
+
[RNFBStubNamedApps removeAllObjects];
|
|
124
|
+
RNFBStubLastLibraryName = nil;
|
|
125
|
+
RNFBStubLastLibraryVersion = nil;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
+ (NSString *)lastRegisteredLibraryNameForTesting {
|
|
129
|
+
return RNFBStubLastLibraryName;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
+ (NSString *)lastRegisteredLibraryVersionForTesting {
|
|
133
|
+
return RNFBStubLastLibraryVersion;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@end
|
|
137
|
+
|
|
138
|
+
@implementation FIRConfiguration {
|
|
139
|
+
FIRLoggerLevel _loggerLevel;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
static FIRConfiguration *_Nullable RNFBStubSharedConfiguration;
|
|
143
|
+
|
|
144
|
+
+ (instancetype)sharedInstance {
|
|
145
|
+
if (RNFBStubSharedConfiguration == nil) {
|
|
146
|
+
RNFBStubSharedConfiguration = [[FIRConfiguration alloc] init];
|
|
147
|
+
}
|
|
148
|
+
return RNFBStubSharedConfiguration;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
- (instancetype)init {
|
|
152
|
+
self = [super init];
|
|
153
|
+
if (self) {
|
|
154
|
+
_loggerLevel = FIRLoggerLevelError;
|
|
155
|
+
}
|
|
156
|
+
return self;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
- (FIRLoggerLevel)loggerLevel {
|
|
160
|
+
return _loggerLevel;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
- (void)setLoggerLevel:(FIRLoggerLevel)loggerLevel {
|
|
164
|
+
_loggerLevel = loggerLevel;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
+ (void)resetForTesting {
|
|
168
|
+
RNFBStubSharedConfiguration = nil;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host-only stub for macOS XCTest (IosTest-AD-1). Not shipped in the production pod.
|
|
3
|
+
*/
|
|
4
|
+
#import <Foundation/Foundation.h>
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Mirrors FirebaseCore `FIRLoggerLevel` raw values
|
|
8
|
+
* (`FirebaseCore/Sources/Public/FirebaseCore/FIRLoggerLevel.h`).
|
|
9
|
+
*/
|
|
10
|
+
typedef NS_ENUM(NSInteger, FIRLoggerLevel) {
|
|
11
|
+
FIRLoggerLevelError = 3,
|
|
12
|
+
FIRLoggerLevelWarning = 4,
|
|
13
|
+
FIRLoggerLevelNotice = 5,
|
|
14
|
+
FIRLoggerLevelInfo = 6,
|
|
15
|
+
FIRLoggerLevelDebug = 7,
|
|
16
|
+
} NS_SWIFT_NAME(FirebaseLoggerLevel);
|
|
17
|
+
|
|
18
|
+
NS_SWIFT_NAME(FirebaseOptions)
|
|
19
|
+
@interface FIROptions : NSObject
|
|
20
|
+
- (nonnull instancetype)initWithGoogleAppID:(nullable NSString *)googleAppID
|
|
21
|
+
GCMSenderID:(nullable NSString *)GCMSenderID;
|
|
22
|
+
@property(nonatomic, copy, nullable) NSString *APIKey NS_SWIFT_NAME(apiKey);
|
|
23
|
+
@property(nonatomic, copy, nullable) NSString *googleAppID;
|
|
24
|
+
@property(nonatomic, copy, nullable) NSString *projectID;
|
|
25
|
+
@property(nonatomic, copy, nullable) NSString *databaseURL;
|
|
26
|
+
@property(nonatomic, copy, nullable) NSString *storageBucket;
|
|
27
|
+
@property(nonatomic, copy, nullable) NSString *GCMSenderID NS_SWIFT_NAME(gcmSenderID);
|
|
28
|
+
@property(nonatomic, copy, nullable) NSString *clientID;
|
|
29
|
+
@property(nonatomic, copy, nullable) NSString *bundleID;
|
|
30
|
+
@property(nonatomic, copy, nullable) NSString *appGroupID;
|
|
31
|
+
@end
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Mirrors FirebaseCore `FIRApp` Swift names
|
|
35
|
+
* (`FirebaseCore/Sources/Public/FirebaseCore/FIRApp.h`: `NS_SWIFT_NAME(FirebaseApp)`,
|
|
36
|
+
* `defaultApp` → `app()`, `appNamed:` → `app(name:)`).
|
|
37
|
+
*/
|
|
38
|
+
NS_SWIFT_NAME(FirebaseApp)
|
|
39
|
+
@interface FIRApp : NSObject
|
|
40
|
+
@property(nonatomic, copy, readonly, nonnull) NSString *name;
|
|
41
|
+
@property(nonatomic, strong, readonly, nonnull) FIROptions *options;
|
|
42
|
+
- (nonnull instancetype)initWithName:(nonnull NSString *)name
|
|
43
|
+
options:(nullable FIROptions *)options;
|
|
44
|
+
@property(nonatomic, readwrite, getter=isDataCollectionDefaultEnabled)
|
|
45
|
+
BOOL dataCollectionDefaultEnabled;
|
|
46
|
+
|
|
47
|
+
+ (nullable FIRApp *)defaultApp NS_SWIFT_NAME(app());
|
|
48
|
+
+ (nullable FIRApp *)appNamed:(nonnull NSString *)name NS_SWIFT_NAME(app(name:));
|
|
49
|
+
@property(class, readonly, nullable) NSDictionary<NSString *, FIRApp *> *allApps;
|
|
50
|
+
|
|
51
|
+
+ (void)configure;
|
|
52
|
+
+ (void)configureWithOptions:(nonnull FIROptions *)options NS_SWIFT_NAME(configure(options:));
|
|
53
|
+
+ (void)configureWithName:(nonnull NSString *)name
|
|
54
|
+
options:(nonnull FIROptions *)options NS_SWIFT_NAME(configure(name:options:));
|
|
55
|
+
|
|
56
|
+
+ (void)registerLibrary:(nonnull NSString *)name withVersion:(nonnull NSString *)version;
|
|
57
|
+
+ (void)setRegisterLibraryAvailableForTesting:(BOOL)available;
|
|
58
|
+
|
|
59
|
+
- (void)deleteApp:(void (^_Nonnull)(BOOL success))completion;
|
|
60
|
+
|
|
61
|
+
+ (void)setDefaultAppForTesting:(nullable FIRApp *)app;
|
|
62
|
+
+ (void)registerAppForTesting:(nonnull FIRApp *)app;
|
|
63
|
+
+ (void)resetRegistryForTesting;
|
|
64
|
+
|
|
65
|
+
+ (nullable NSString *)lastRegisteredLibraryNameForTesting;
|
|
66
|
+
+ (nullable NSString *)lastRegisteredLibraryVersionForTesting;
|
|
67
|
+
@end
|
|
68
|
+
|
|
69
|
+
NS_SWIFT_NAME(FirebaseConfiguration)
|
|
70
|
+
@interface FIRConfiguration : NSObject
|
|
71
|
+
@property(nonatomic, assign, readonly) FIRLoggerLevel loggerLevel;
|
|
72
|
+
|
|
73
|
+
@property(class, nonatomic, readonly, nonnull)
|
|
74
|
+
FIRConfiguration *sharedInstance NS_SWIFT_NAME(shared);
|
|
75
|
+
- (void)setLoggerLevel:(FIRLoggerLevel)loggerLevel;
|
|
76
|
+
|
|
77
|
+
+ (void)resetForTesting;
|
|
78
|
+
@end
|