@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.
Files changed (283) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/README.md +10 -27
  3. package/RNFBApp.podspec +13 -5
  4. package/android/build.gradle +3 -0
  5. package/android/src/main/java/io/invertase/firebase/common/RNFBHandleCollisionException.kt +29 -0
  6. package/android/src/main/java/io/invertase/firebase/common/RNFBHandleMap.kt +146 -0
  7. package/android/src/main/java/io/invertase/firebase/common/TaskExecutorService.kt +156 -0
  8. package/android/src/main/java/io/invertase/firebase/common/UniversalFirebaseModule.kt +44 -0
  9. package/android/src/main/java/io/invertase/firebase/common/UniversalFirebasePreferences.kt +100 -0
  10. package/android/src/reactnative/java/io/invertase/firebase/app/NativeRNFBTurboApp.kt +250 -0
  11. package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseApp.kt +64 -0
  12. package/android/src/reactnative/java/io/invertase/firebase/app/{ReactNativeFirebaseAppInitProvider.java → ReactNativeFirebaseAppInitProvider.kt} +3 -4
  13. package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseAppPackage.kt +47 -0
  14. package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseAppRegistrar.kt +33 -0
  15. package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseVersion.java +1 -1
  16. package/android/src/reactnative/java/io/invertase/firebase/common/RCTConvertFirebase.kt +185 -0
  17. package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseEvent.kt +35 -0
  18. package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseEventEmitter.kt +662 -0
  19. package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseJSON.kt +103 -0
  20. package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseMeta.kt +96 -0
  21. package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseModule.kt +140 -0
  22. package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebasePreferences.kt +109 -0
  23. package/android/src/reactnative/java/io/invertase/firebase/common/SharedUtils.kt +451 -0
  24. package/android/src/reactnative/java/io/invertase/firebase/interfaces/{ContextProvider.java → ContextProvider.kt} +8 -8
  25. package/android/src/reactnative/java/io/invertase/firebase/interfaces/{NativeError.java → NativeError.kt} +8 -8
  26. package/android/src/reactnative/java/io/invertase/firebase/interfaces/{NativeEvent.java → NativeEvent.kt} +6 -6
  27. package/android/src/reactnative/java/io/invertase/firebase/utils/NativeRNFBTurboUtils.kt +219 -0
  28. package/android/src/test/java/expo/core/ModuleRegistry.java +9 -0
  29. package/android/src/test/java/io/invertase/firebase/app/NativeRNFBTurboAppTest.java +208 -60
  30. package/android/src/test/java/io/invertase/firebase/app/ReactNativeFirebaseAppComponentsJavaCompatibilityTest.java +70 -0
  31. package/android/src/test/java/io/invertase/firebase/app/ReactNativeFirebaseAppJavaCompatibilityTest.java +60 -0
  32. package/android/src/test/java/io/invertase/firebase/app/ReactNativeFirebaseAppPackageTest.java +165 -0
  33. package/android/src/test/java/io/invertase/firebase/app/ReactNativeFirebaseAppTest.kt +167 -0
  34. package/android/src/test/java/io/invertase/firebase/common/RCTConvertFirebaseJavaCompatibilityTest.java +112 -0
  35. package/android/src/test/java/io/invertase/firebase/common/RCTConvertFirebaseTest.kt +317 -0
  36. package/android/src/test/java/io/invertase/firebase/common/RNFBHandleMapTest.kt +309 -0
  37. package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebaseEventEmitterJavaCompatibilityTest.java +176 -0
  38. package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebaseEventEmitterTest.java +144 -13
  39. package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebaseEventTest.kt +61 -0
  40. package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebaseJSONJavaCompatibilityTest.java +85 -0
  41. package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebaseJSONTest.kt +296 -0
  42. package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebaseMetaJavaCompatibilityTest.java +67 -0
  43. package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebaseMetaTest.kt +246 -0
  44. package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebaseModuleTest.kt +254 -0
  45. package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebasePreferencesJavaCompatibilityTest.java +87 -0
  46. package/android/src/test/java/io/invertase/firebase/common/ReactNativeFirebasePreferencesTest.kt +260 -0
  47. package/android/src/test/java/io/invertase/firebase/common/SharedUtilsJavaCompatibilityTest.java +255 -0
  48. package/android/src/test/java/io/invertase/firebase/common/SharedUtilsTest.kt +674 -0
  49. package/android/src/test/java/io/invertase/firebase/common/TaskExecutorServiceTest.kt +290 -0
  50. package/android/src/test/java/io/invertase/firebase/common/UniversalFirebaseModuleJavaCompatibilityTest.java +178 -0
  51. package/android/src/test/java/io/invertase/firebase/common/UniversalFirebasePreferencesJavaCompatibilityTest.java +99 -0
  52. package/android/src/test/java/io/invertase/firebase/common/UniversalFirebasePreferencesTest.kt +217 -0
  53. package/android/src/test/java/io/invertase/firebase/commoncompat/ReactNativeFirebaseModuleJavaCompatibilityTest.java +176 -0
  54. package/android/src/test/java/io/invertase/firebase/commoncompat/ReactNativeFirebaseModuleKotlinCompatibilityTest.kt +52 -0
  55. package/android/src/test/java/io/invertase/firebase/interfaces/InterfacesJavaCompatibilityTest.java +144 -0
  56. package/android/src/test/java/io/invertase/firebase/interfaces/NativeEventTest.kt +56 -0
  57. package/android/src/test/java/io/invertase/firebase/utils/NativeRNFBTurboUtilsTest.java +517 -23
  58. package/dist/module/FirebaseApp.js +10 -0
  59. package/dist/module/FirebaseApp.js.map +1 -1
  60. package/dist/module/common/Base64.js +13 -21
  61. package/dist/module/common/Base64.js.map +1 -1
  62. package/dist/module/common/deeps.js +3 -0
  63. package/dist/module/common/deeps.js.map +1 -1
  64. package/dist/module/common/index.js +17 -9
  65. package/dist/module/common/index.js.map +1 -1
  66. package/dist/module/internal/FirebaseModule.js.map +1 -1
  67. package/dist/module/internal/RNFBNativeEventEmitter.js +12 -1
  68. package/dist/module/internal/RNFBNativeEventEmitter.js.map +1 -1
  69. package/dist/module/internal/SharedEventEmitter.js +3 -1
  70. package/dist/module/internal/SharedEventEmitter.js.map +1 -1
  71. package/dist/module/internal/asyncStorage.js +7 -11
  72. package/dist/module/internal/asyncStorage.js.map +1 -1
  73. package/dist/module/internal/index.js +1 -0
  74. package/dist/module/internal/index.js.map +1 -1
  75. package/dist/module/internal/logger.js +44 -40
  76. package/dist/module/internal/logger.js.map +1 -1
  77. package/dist/module/internal/nativeModuleAndroidIos.js +2 -29
  78. package/dist/module/internal/nativeModuleAndroidIos.js.map +1 -1
  79. package/dist/module/internal/nativeModuleDebug.js +74 -0
  80. package/dist/module/internal/nativeModuleDebug.js.map +1 -0
  81. package/dist/module/internal/nativeModuleWeb.js +9 -29
  82. package/dist/module/internal/nativeModuleWeb.js.map +1 -1
  83. package/dist/module/internal/registry/app.js +8 -2
  84. package/dist/module/internal/registry/app.js.map +1 -1
  85. package/dist/module/internal/registry/modular.js +2 -2
  86. package/dist/module/internal/registry/modular.js.map +1 -1
  87. package/dist/module/internal/registry/nativeModule.js +3 -3
  88. package/dist/module/internal/registry/nativeModule.js.map +1 -1
  89. package/dist/module/internal/web/RNFBAppModule.js +16 -15
  90. package/dist/module/internal/web/RNFBAppModule.js.map +1 -1
  91. package/dist/module/internal/web/memidb/lib/FakeEventTarget.js +3 -1
  92. package/dist/module/internal/web/memidb/lib/FakeEventTarget.js.map +1 -1
  93. package/dist/module/types/app.js.map +1 -1
  94. package/dist/module/types/internal.js +2 -0
  95. package/dist/module/version.js +1 -1
  96. package/dist/typescript/lib/FirebaseApp.d.ts +7 -0
  97. package/dist/typescript/lib/FirebaseApp.d.ts.map +1 -1
  98. package/dist/typescript/lib/common/Base64.d.ts.map +1 -1
  99. package/dist/typescript/lib/common/deeps.d.ts.map +1 -1
  100. package/dist/typescript/lib/common/index.d.ts.map +1 -1
  101. package/dist/typescript/lib/internal/FirebaseModule.d.ts +2 -3
  102. package/dist/typescript/lib/internal/FirebaseModule.d.ts.map +1 -1
  103. package/dist/typescript/lib/internal/NativeModules.d.ts +4 -1
  104. package/dist/typescript/lib/internal/NativeModules.d.ts.map +1 -1
  105. package/dist/typescript/lib/internal/RNFBNativeEventEmitter.d.ts +2 -2
  106. package/dist/typescript/lib/internal/RNFBNativeEventEmitter.d.ts.map +1 -1
  107. package/dist/typescript/lib/internal/SharedEventEmitter.d.ts +3 -3
  108. package/dist/typescript/lib/internal/SharedEventEmitter.d.ts.map +1 -1
  109. package/dist/typescript/lib/internal/asyncStorage.d.ts.map +1 -1
  110. package/dist/typescript/lib/internal/index.d.ts +1 -0
  111. package/dist/typescript/lib/internal/index.d.ts.map +1 -1
  112. package/dist/typescript/lib/internal/logger.d.ts.map +1 -1
  113. package/dist/typescript/lib/internal/nativeModuleAndroidIos.d.ts.map +1 -1
  114. package/dist/typescript/lib/internal/nativeModuleDebug.d.ts +2 -0
  115. package/dist/typescript/lib/internal/nativeModuleDebug.d.ts.map +1 -0
  116. package/dist/typescript/lib/internal/nativeModuleWeb.d.ts.map +1 -1
  117. package/dist/typescript/lib/internal/registry/app.d.ts.map +1 -1
  118. package/dist/typescript/lib/internal/web/RNFBAppModule.d.ts +7 -7
  119. package/dist/typescript/lib/internal/web/RNFBAppModule.d.ts.map +1 -1
  120. package/dist/typescript/lib/types/app.d.ts +10 -3
  121. package/dist/typescript/lib/types/app.d.ts.map +1 -1
  122. package/dist/typescript/lib/types/internal.d.ts +12 -0
  123. package/dist/typescript/lib/types/internal.d.ts.map +1 -1
  124. package/dist/typescript/lib/version.d.ts +1 -1
  125. package/firebase-schema.json +5 -1
  126. package/firebase_spm.rb +552 -96
  127. package/ios/RNFBApp/RCTConvert+FIRApp.h +2 -5
  128. package/ios/RNFBApp/RCTConvert+FIRApp.m +11 -6
  129. package/ios/RNFBApp/RCTConvert+FIROptions.h +2 -5
  130. package/ios/RNFBApp/RCTConvert+FIROptions.m +11 -10
  131. package/ios/RNFBApp/RCTConvertFIRApp.swift +86 -0
  132. package/ios/RNFBApp/RCTConvertFIROptions.swift +259 -0
  133. package/ios/RNFBApp/RNFBAppCustomAuthDomains.swift +63 -0
  134. package/ios/RNFBApp/RNFBAppInitializeOptionsMapper.swift +113 -0
  135. package/ios/RNFBApp/RNFBAppLogLevelMapper.swift +53 -0
  136. package/ios/RNFBApp/RNFBAppModule+CustomAuthDomain.m +35 -0
  137. package/ios/RNFBApp/RNFBAppModule.h +6 -2
  138. package/ios/RNFBApp/RNFBAppModule.mm +67 -204
  139. package/ios/RNFBApp/RNFBAppModuleFirebase.swift +439 -0
  140. package/ios/RNFBApp/RNFBAppModuleImplementation.h +68 -0
  141. package/ios/RNFBApp/RNFBAppModuleImplementation.m +195 -0
  142. package/ios/RNFBApp/RNFBHandleMap.h +73 -0
  143. package/ios/RNFBApp/RNFBHandleMap.m +87 -0
  144. package/ios/RNFBApp/RNFBHandleMapStorage.swift +90 -0
  145. package/ios/RNFBApp/RNFBInitializeAppArguments.swift +82 -0
  146. package/ios/RNFBApp/RNFBJSON.m +22 -38
  147. package/ios/RNFBApp/RNFBJSONImplementation.swift +71 -0
  148. package/ios/RNFBApp/RNFBMeta.m +24 -26
  149. package/ios/RNFBApp/RNFBMetaStorage.swift +76 -0
  150. package/ios/RNFBApp/RNFBNullSentinelDecoding.swift +135 -0
  151. package/ios/RNFBApp/RNFBNullSentinelInterceptor.h +30 -3
  152. package/ios/RNFBApp/RNFBNullSentinelInterceptor.m +28 -5
  153. package/ios/RNFBApp/RNFBPreferences.m +22 -20
  154. package/ios/RNFBApp/RNFBPreferencesStorage.swift +101 -0
  155. package/ios/RNFBApp/RNFBRCTEventEmitter.m +36 -93
  156. package/ios/RNFBApp/RNFBRCTEventEmitterCore.swift +161 -0
  157. package/ios/RNFBApp/RNFBSharedUtils.h +2 -5
  158. package/ios/RNFBApp/RNFBSharedUtils.m +109 -197
  159. package/ios/RNFBApp/RNFBSharedUtilsConfig.swift +72 -0
  160. package/ios/RNFBApp/RNFBSharedUtilsFIRApp.swift +271 -0
  161. package/ios/RNFBApp/RNFBSharedUtilsFormatting.swift +59 -0
  162. package/ios/RNFBApp/RNFBSharedUtilsPromiseRejection.swift +88 -0
  163. package/ios/RNFBApp/RNFBUtilsHelpers.swift +116 -0
  164. package/ios/RNFBApp/RNFBUtilsModule+Foundation.m +44 -0
  165. package/ios/RNFBApp/RNFBUtilsModule+PhotoAssets.m +47 -0
  166. package/ios/RNFBApp/RNFBUtilsModule.h +11 -1
  167. package/ios/RNFBApp/RNFBUtilsModule.mm +10 -85
  168. package/ios/RNFBApp/RNFBUtilsModuleImplementation.h +32 -0
  169. package/ios/RNFBApp/RNFBUtilsModuleImplementation.m +56 -0
  170. package/ios/RNFBApp/RNFBVersion.m +1 -1
  171. package/ios/RNFBApp.xcodeproj/project.pbxproj +106 -0
  172. package/ios/RNFBAppUnitTests/HostStubs/FirebaseCore/FIRApp.m +171 -0
  173. package/ios/RNFBAppUnitTests/HostStubs/FirebaseCore/FirebaseCore.h +78 -0
  174. package/ios/RNFBAppUnitTests/HostStubs/FirebaseInstallations/FIRInstallations.m +7 -0
  175. package/ios/RNFBAppUnitTests/HostStubs/FirebaseInstallations/FirebaseInstallations.h +8 -0
  176. package/ios/RNFBAppUnitTests/HostStubs/RNFBAppModuleHostStub.m +55 -0
  177. package/ios/RNFBAppUnitTests/HostStubs/RNFBAppTurboModules.h +89 -0
  178. package/ios/RNFBAppUnitTests/HostStubs/RNFBAppTurboModules.mm +30 -0
  179. package/ios/RNFBAppUnitTests/HostStubs/React/RCTBridge.h +19 -0
  180. package/ios/RNFBAppUnitTests/HostStubs/React/RCTBridge.m +32 -0
  181. package/ios/RNFBAppUnitTests/HostStubs/React/RCTBridgeModule.h +19 -0
  182. package/ios/RNFBAppUnitTests/HostStubs/React/RCTConvert.h +28 -0
  183. package/ios/RNFBAppUnitTests/HostStubs/React/RCTConvert.m +23 -0
  184. package/ios/RNFBAppUnitTests/HostStubs/React/RCTEventEmitter.h +9 -0
  185. package/ios/RNFBAppUnitTests/HostStubs/React/RCTInvalidating.h +24 -0
  186. package/ios/RNFBAppUnitTests/HostStubs/React/RCTUtils.h +9 -0
  187. package/ios/RNFBAppUnitTests/HostStubs/module.modulemap +13 -0
  188. package/ios/RNFBAppUnitTests/RCTConvertFIRAppFacadeTests.m +61 -0
  189. package/ios/RNFBAppUnitTests/RCTConvertFIRAppTests.swift +73 -0
  190. package/ios/RNFBAppUnitTests/RCTConvertFIROptionsFacadeTests.m +57 -0
  191. package/ios/RNFBAppUnitTests/RCTConvertFIROptionsTests.swift +243 -0
  192. package/ios/RNFBAppUnitTests/RNFBAppCustomAuthDomainsFacadeTests.m +73 -0
  193. package/ios/RNFBAppUnitTests/RNFBAppCustomAuthDomainsTests.swift +70 -0
  194. package/ios/RNFBAppUnitTests/RNFBAppInitializeOptionsMapperTests.swift +190 -0
  195. package/ios/RNFBAppUnitTests/RNFBAppLogLevelFacadeTests.m +76 -0
  196. package/ios/RNFBAppUnitTests/RNFBAppLogLevelMapperTests.swift +59 -0
  197. package/ios/RNFBAppUnitTests/RNFBAppModuleFirebaseFacadeTests.m +215 -0
  198. package/ios/RNFBAppUnitTests/RNFBAppModuleFirebaseTests.swift +430 -0
  199. package/ios/RNFBAppUnitTests/RNFBAppModuleLifecycleTests.m +206 -0
  200. package/ios/RNFBAppUnitTests/RNFBAppModuleShellTests.mm +367 -0
  201. package/ios/RNFBAppUnitTests/RNFBAppUnitTests.xcodeproj/project.pbxproj +590 -0
  202. package/ios/RNFBAppUnitTests/RNFBAppUnitTests.xcodeproj/xcshareddata/xcschemes/RNFBAppUnitTests.xcscheme +69 -0
  203. package/ios/RNFBAppUnitTests/RNFBFirebaseAppClientTests.swift +165 -0
  204. package/ios/RNFBAppUnitTests/RNFBHandleMapStorageTests.swift +121 -0
  205. package/ios/RNFBAppUnitTests/RNFBHandleMapTests.m +238 -0
  206. package/ios/RNFBAppUnitTests/RNFBInitializeAppArgumentsTests.swift +256 -0
  207. package/ios/RNFBAppUnitTests/RNFBJSONImplementationTests.swift +126 -0
  208. package/ios/RNFBAppUnitTests/RNFBJSONTests.m +172 -0
  209. package/ios/RNFBAppUnitTests/RNFBMetaStorageTests.swift +106 -0
  210. package/ios/RNFBAppUnitTests/RNFBMetaTests.m +65 -0
  211. package/ios/RNFBAppUnitTests/RNFBNullSentinelDecodingTests.swift +286 -0
  212. package/ios/RNFBAppUnitTests/RNFBNullSentinelInterceptorTests.m +312 -0
  213. package/ios/RNFBAppUnitTests/RNFBPreferencesStorageTests.swift +105 -0
  214. package/ios/RNFBAppUnitTests/RNFBPreferencesTests.m +110 -0
  215. package/ios/RNFBAppUnitTests/RNFBRCTEventEmitterCoreTests.swift +163 -0
  216. package/ios/RNFBAppUnitTests/RNFBRCTEventEmitterFacadeTests.m +141 -0
  217. package/ios/RNFBAppUnitTests/RNFBSharedUtilsConfigFacadeTests.m +100 -0
  218. package/ios/RNFBAppUnitTests/RNFBSharedUtilsConfigTests.swift +234 -0
  219. package/ios/RNFBAppUnitTests/RNFBSharedUtilsFIRAppFacadeTests.m +145 -0
  220. package/ios/RNFBAppUnitTests/RNFBSharedUtilsFIRAppTests.swift +173 -0
  221. package/ios/RNFBAppUnitTests/RNFBSharedUtilsFormattingFacadeTests.m +38 -0
  222. package/ios/RNFBAppUnitTests/RNFBSharedUtilsFormattingTests.swift +82 -0
  223. package/ios/RNFBAppUnitTests/RNFBSharedUtilsNullSentinelTests.m +35 -0
  224. package/ios/RNFBAppUnitTests/RNFBSharedUtilsPromiseRejectionFacadeTests.m +107 -0
  225. package/ios/RNFBAppUnitTests/RNFBSharedUtilsPromiseRejectionTests.swift +133 -0
  226. package/ios/RNFBAppUnitTests/RNFBUtilsHelpersTests.swift +144 -0
  227. package/ios/RNFBAppUnitTests/RNFBUtilsModuleFacadeTests.m +72 -0
  228. package/ios/RNFBAppUnitTests/RNFBUtilsModuleShellTests.mm +282 -0
  229. package/ios/RNFBFirebase/Package.swift +53 -0
  230. package/ios/RNFBFirebase/Sources/RNFBFirebase/RNFBFirebase.swift +285 -0
  231. package/ios/RNFBFirebase/Sources/RNFBFirebaseBridge/Public/.gitkeep +0 -0
  232. package/ios/RNFBFirebase/Sources/RNFBFirebaseBridge/RNFBFirebaseBridge.m +169 -0
  233. package/ios/RNFBFirebase/Sources/RNFBFirebaseBridge/include/RNFBFirebaseBridge.h +52 -0
  234. package/ios/RNFBFirebaseUnitTests/RNFBAppDynamicFacadeTests.swift +240 -0
  235. package/{android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseAppRegistrar.java → ios/RNFBFirebaseUnitTests/RNFBFirebaseClientImport.swift} +22 -17
  236. package/ios/RNFBFirebaseUnitTests/RNFBFirebaseUnitTests.xcodeproj/project.pbxproj +588 -0
  237. package/ios/RNFBFirebaseUnitTests/RNFBFirebaseUnitTests.xcodeproj/xcshareddata/xcschemes/RNFBFirebaseUnitTests.xcscheme +83 -0
  238. package/ios_config.sh +50 -22
  239. package/lib/FirebaseApp.ts +10 -0
  240. package/lib/common/Base64.ts +10 -16
  241. package/lib/common/deeps.ts +3 -0
  242. package/lib/common/index.ts +20 -9
  243. package/lib/internal/FirebaseModule.ts +6 -3
  244. package/lib/internal/NativeModules.ts +4 -1
  245. package/lib/internal/RNFBNativeEventEmitter.ts +14 -5
  246. package/lib/internal/SharedEventEmitter.ts +5 -1
  247. package/lib/internal/asyncStorage.ts +7 -11
  248. package/lib/internal/index.ts +1 -0
  249. package/lib/internal/logger.ts +53 -43
  250. package/lib/internal/nativeModuleAndroidIos.ts +2 -40
  251. package/lib/internal/nativeModuleDebug.ts +97 -0
  252. package/lib/internal/nativeModuleWeb.ts +10 -40
  253. package/lib/internal/react-native-vendor-emitter.d.ts +11 -0
  254. package/lib/internal/registry/app.ts +8 -2
  255. package/lib/internal/registry/modular.ts +2 -2
  256. package/lib/internal/registry/nativeModule.ts +3 -3
  257. package/lib/internal/web/RNFBAppModule.ts +16 -15
  258. package/lib/internal/web/memidb/lib/FakeEventTarget.js +3 -1
  259. package/lib/types/app.ts +10 -3
  260. package/lib/types/internal.ts +19 -0
  261. package/lib/version.ts +1 -1
  262. package/package.json +9 -8
  263. package/plugin/build/ios/appDelegate.js +19 -9
  264. package/plugin/build/ios/podfile.js +16 -16
  265. package/plugin/build/pluginConfig.d.ts +4 -2
  266. package/plugin/src/ios/appDelegate.ts +45 -15
  267. package/plugin/src/ios/podfile.ts +20 -23
  268. package/plugin/src/pluginConfig.ts +4 -2
  269. package/android/src/main/java/io/invertase/firebase/common/TaskExecutorService.java +0 -124
  270. package/android/src/main/java/io/invertase/firebase/common/UniversalFirebaseModule.java +0 -62
  271. package/android/src/main/java/io/invertase/firebase/common/UniversalFirebasePreferences.java +0 -91
  272. package/android/src/reactnative/java/io/invertase/firebase/app/NativeRNFBTurboApp.java +0 -222
  273. package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseApp.java +0 -46
  274. package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseAppPackage.java +0 -49
  275. package/android/src/reactnative/java/io/invertase/firebase/common/RCTConvertFirebase.java +0 -191
  276. package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseEvent.java +0 -53
  277. package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseEventEmitter.java +0 -606
  278. package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseJSON.java +0 -107
  279. package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseMeta.java +0 -101
  280. package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseModule.java +0 -146
  281. package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebasePreferences.java +0 -96
  282. package/android/src/reactnative/java/io/invertase/firebase/common/SharedUtils.java +0 -441
  283. package/android/src/reactnative/java/io/invertase/firebase/utils/NativeRNFBTurboUtils.java +0 -223
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Host-only stub for macOS XCTest (IosTest-AD-1). Not shipped in the production pod.
3
+ */
4
+ #import "FirebaseInstallations.h"
5
+
6
+ @implementation FIRInstallations
7
+ @end
@@ -0,0 +1,8 @@
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
+ NS_SWIFT_NAME(Installations)
7
+ @interface FIRInstallations : NSObject
8
+ @end
@@ -0,0 +1,55 @@
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 "FirebaseCore/FirebaseCore.h"
18
+ #import "RNFBAppModule.h"
19
+
20
+ #if __has_include(<RNFBApp/RNFBApp-Swift.h>)
21
+ #import <RNFBApp/RNFBApp-Swift.h>
22
+ #elif __has_include("RNFBApp-Swift.h")
23
+ #import "RNFBApp-Swift.h"
24
+ #elif __has_include("RNFBHandleMapStorage-Swift.inc")
25
+ #import "RNFBHandleMapStorage-Swift.inc"
26
+ #else
27
+ #error "RNFBApp Swift interface not found"
28
+ #endif
29
+
30
+ const NSString *RNFBVersionString = @"unit-test";
31
+
32
+ @interface RNFBAppModule (Testing)
33
+ + (void)setCustomDomain:(nullable NSString *)authDomain forAppName:(NSString *)appName;
34
+ + (void)setCustomDomainForTesting:(NSString *)domain forAppName:(NSString *)appName;
35
+ + (void)resetCustomDomainsForTesting;
36
+ @end
37
+
38
+ @implementation RNFBAppModule (Testing)
39
+
40
+ + (void)setCustomDomain:(nullable NSString *)authDomain forAppName:(NSString *)appName {
41
+ if (appName == nil) {
42
+ return;
43
+ }
44
+ [RNFBAppCustomAuthDomains setCustomDomain:authDomain forAppName:appName];
45
+ }
46
+
47
+ + (void)setCustomDomainForTesting:(NSString *)domain forAppName:(NSString *)appName {
48
+ [self setCustomDomain:domain forAppName:appName];
49
+ }
50
+
51
+ + (void)resetCustomDomainsForTesting {
52
+ [RNFBAppCustomAuthDomains resetCustomDomainsForTesting];
53
+ }
54
+
55
+ @end
@@ -0,0 +1,89 @@
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
+ /**
18
+ * Host-only stub for the codegen `RNFBAppTurboModules.h` (macOS XCTest). It models only the
19
+ * TurboModule types the shipped `RNFBAppModule.mm` / `RNFBUtilsModule.mm` shells name, so
20
+ * those files compile unchanged in the unit-test target. Not shipped in the production pod.
21
+ */
22
+ #import <Foundation/Foundation.h>
23
+ #import <React/RCTBridgeModule.h>
24
+
25
+ #include <memory>
26
+
27
+ namespace facebook {
28
+ namespace react {
29
+
30
+ class TurboModule {
31
+ public:
32
+ virtual ~TurboModule() = default;
33
+ };
34
+
35
+ class ObjCTurboModule : public TurboModule {
36
+ public:
37
+ struct InitParams {
38
+ const char *moduleName = "";
39
+ };
40
+ explicit ObjCTurboModule(const InitParams &params) : moduleName_(params.moduleName) {}
41
+ const char *moduleName() const { return moduleName_; }
42
+
43
+ private:
44
+ const char *moduleName_;
45
+ };
46
+
47
+ class NativeRNFBTurboAppSpecJSI : public ObjCTurboModule {
48
+ public:
49
+ explicit NativeRNFBTurboAppSpecJSI(const InitParams &params) : ObjCTurboModule(params) {}
50
+ };
51
+
52
+ class NativeRNFBTurboUtilsSpecJSI : public ObjCTurboModule {
53
+ public:
54
+ explicit NativeRNFBTurboUtilsSpecJSI(const InitParams &params) : ObjCTurboModule(params) {}
55
+ };
56
+
57
+ /** Untyped storage the host `_RCTTypedModuleConstants` returns. */
58
+ struct ModuleConstantsStorage {
59
+ NSDictionary *dictionary = nil;
60
+ };
61
+
62
+ template <typename T>
63
+ struct ModuleConstants {
64
+ NSDictionary *dictionary = nil;
65
+ ModuleConstants() = default;
66
+ ModuleConstants(const ModuleConstantsStorage &storage) : dictionary(storage.dictionary) {}
67
+ };
68
+
69
+ } // namespace react
70
+ } // namespace facebook
71
+
72
+ namespace JS {
73
+ namespace NativeRNFBTurboApp {
74
+ struct Constants {};
75
+ } // namespace NativeRNFBTurboApp
76
+ namespace NativeRNFBTurboUtils {
77
+ struct Constants {};
78
+ } // namespace NativeRNFBTurboUtils
79
+ } // namespace JS
80
+
81
+ @interface _RCTTypedModuleConstants : NSObject
82
+ + (facebook::react::ModuleConstantsStorage)newWithUnsafeDictionary:(NSDictionary *)dictionary;
83
+ @end
84
+
85
+ @protocol NativeRNFBTurboAppSpec <RCTBridgeModule>
86
+ @end
87
+
88
+ @protocol NativeRNFBTurboUtilsSpec <RCTBridgeModule>
89
+ @end
@@ -0,0 +1,30 @@
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
+ /**
18
+ * Host-only stub for macOS XCTest. Not shipped in the production pod.
19
+ */
20
+ #import "RNFBAppTurboModules.h"
21
+
22
+ @implementation _RCTTypedModuleConstants
23
+
24
+ + (facebook::react::ModuleConstantsStorage)newWithUnsafeDictionary:(NSDictionary *)dictionary {
25
+ facebook::react::ModuleConstantsStorage storage;
26
+ storage.dictionary = dictionary;
27
+ return storage;
28
+ }
29
+
30
+ @end
@@ -0,0 +1,19 @@
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
+ @interface RCTBridge : NSObject
7
+
8
+ @property(nonatomic, readonly, nullable) NSString *lastModule;
9
+ @property(nonatomic, readonly, nullable) NSString *lastMethod;
10
+ @property(nonatomic, readonly, nullable) NSArray *lastArgs;
11
+
12
+ - (void)enqueueJSCall:(NSString *)module
13
+ method:(NSString *)method
14
+ args:(NSArray *)args
15
+ completion:(void (^)(void))completion;
16
+
17
+ - (void)resetLastJSCallForTesting;
18
+
19
+ @end
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Host-only stub for macOS XCTest (IosTest-AD-1). Not shipped in the production pod.
3
+ */
4
+ #import "RCTBridge.h"
5
+
6
+ @interface RCTBridge ()
7
+ @property(nonatomic, copy, readwrite, nullable) NSString *lastModule;
8
+ @property(nonatomic, copy, readwrite, nullable) NSString *lastMethod;
9
+ @property(nonatomic, strong, readwrite, nullable) NSArray *lastArgs;
10
+ @end
11
+
12
+ @implementation RCTBridge
13
+
14
+ - (void)enqueueJSCall:(NSString *)module
15
+ method:(NSString *)method
16
+ args:(NSArray *)args
17
+ completion:(void (^)(void))completion {
18
+ self.lastModule = [module copy];
19
+ self.lastMethod = [method copy];
20
+ self.lastArgs = [args copy];
21
+ if (completion) {
22
+ completion();
23
+ }
24
+ }
25
+
26
+ - (void)resetLastJSCallForTesting {
27
+ self.lastModule = nil;
28
+ self.lastMethod = nil;
29
+ self.lastArgs = nil;
30
+ }
31
+
32
+ @end
@@ -0,0 +1,19 @@
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
+ typedef void (^RCTPromiseResolveBlock)(id result);
7
+ typedef void (^RCTPromiseRejectBlock)(NSString *code, NSString *message, NSError *error);
8
+
9
+ @protocol RCTBridgeModule <NSObject>
10
+ @end
11
+
12
+ /**
13
+ * Real macro also registers the class with the bridge in `+load`. Host tests only need
14
+ * the module name the shipped TurboModule shells export.
15
+ */
16
+ #define RCT_EXPORT_MODULE(js_name) \
17
+ +(NSString *)moduleName { \
18
+ return @ #js_name; \
19
+ }
@@ -0,0 +1,28 @@
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
+ #ifndef RCT_DEBUG
7
+ #define RCT_DEBUG 0
8
+ #endif
9
+
10
+ #ifndef RCT_DYNAMIC
11
+ #define RCT_DYNAMIC
12
+ #endif
13
+
14
+ #ifndef RCTLogConvertError
15
+ #define RCTLogConvertError(json, type) \
16
+ do { \
17
+ } while (0)
18
+ #endif
19
+
20
+ #define RCT_CUSTOM_CONVERTER(type, name, code) \
21
+ +(type)name : (id)json RCT_DYNAMIC { \
22
+ return code; \
23
+ }
24
+
25
+ @interface RCTConvert : NSObject
26
+ + (NSString *)NSString:(id)json;
27
+ + (NSDictionary *)NSDictionary:(id)json;
28
+ @end
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Host-only stub for macOS XCTest (IosTest-AD-1). Not shipped in the production pod.
3
+ */
4
+
5
+ #import "RCTConvert.h"
6
+
7
+ @implementation RCTConvert
8
+
9
+ + (NSString *)NSString:(id)json {
10
+ if ([json isKindOfClass:[NSString class]]) {
11
+ return json;
12
+ }
13
+ return [json description];
14
+ }
15
+
16
+ + (NSDictionary *)NSDictionary:(id)json {
17
+ if ([json isKindOfClass:[NSDictionary class]]) {
18
+ return json;
19
+ }
20
+ return nil;
21
+ }
22
+
23
+ @end
@@ -0,0 +1,9 @@
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
+ @class RCTBridge;
7
+
8
+ @interface RCTEventEmitter : NSObject
9
+ @end
@@ -0,0 +1,24 @@
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
+ /**
18
+ * Host-only stub for macOS XCTest (IosTest-AD-1). Not shipped in the production pod.
19
+ */
20
+ #import <Foundation/Foundation.h>
21
+
22
+ @protocol RCTInvalidating <NSObject>
23
+ - (void)invalidate;
24
+ @end
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Host-only stub for macOS XCTest (IosTest-AD-1). Not shipped in the production
3
+ * pod.
4
+ */
5
+ #import <Foundation/Foundation.h>
6
+
7
+ static inline void RCTUnsafeExecuteOnMainQueueSync(dispatch_block_t block) {
8
+ block();
9
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Host-only Clang module so production Swift (`import FirebaseCore`) compiles against
3
+ * HostStubs in the macOS XCTest target. Not shipped in the production pod.
4
+ */
5
+ module FirebaseCore {
6
+ header "FirebaseCore/FirebaseCore.h"
7
+ export *
8
+ }
9
+
10
+ module FirebaseInstallations {
11
+ header "FirebaseInstallations/FirebaseInstallations.h"
12
+ export *
13
+ }
@@ -0,0 +1,61 @@
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 <XCTest/XCTest.h>
18
+
19
+ #import "FirebaseCore/FirebaseCore.h"
20
+ #import "RCTConvert+FIRApp.h"
21
+ #import "RNFBSharedUtils.h"
22
+
23
+ @interface RCTConvertFIRAppFacadeTests : XCTestCase
24
+ @end
25
+
26
+ @implementation RCTConvertFIRAppFacadeTests
27
+
28
+ - (void)tearDown {
29
+ [FIRApp resetRegistryForTesting];
30
+ [super tearDown];
31
+ }
32
+
33
+ - (void)testFacadeDefaultDisplayNameUsesDefaultApp {
34
+ FIRApp *defaultApp = [[FIRApp alloc] initWithName:DEFAULT_APP_NAME
35
+ options:[[FIROptions alloc] init]];
36
+ [FIRApp setDefaultAppForTesting:defaultApp];
37
+
38
+ FIRApp *result = [RCTConvert firAppFromString:DEFAULT_APP_DISPLAY_NAME];
39
+
40
+ XCTAssertEqual(result, defaultApp);
41
+ }
42
+
43
+ - (void)testFacadeNamedAppUsesAppNamed {
44
+ FIRApp *named = [[FIRApp alloc] initWithName:@"secondary" options:[[FIROptions alloc] init]];
45
+ [FIRApp registerAppForTesting:named];
46
+
47
+ FIRApp *result = [RCTConvert firAppFromString:@"secondary"];
48
+
49
+ XCTAssertEqual(result, named);
50
+ }
51
+
52
+ - (void)testFacadeMissingNamedAppReturnsNil {
53
+ XCTAssertNil([RCTConvert firAppFromString:@"missing"]);
54
+ }
55
+
56
+ - (void)testFacadePublicSelectorsUnchanged {
57
+ XCTAssertTrue([RCTConvert respondsToSelector:@selector(firAppFromString:)]);
58
+ XCTAssertTrue([RCTConvert respondsToSelector:@selector(FIRApp:)]);
59
+ }
60
+
61
+ @end
@@ -0,0 +1,73 @@
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
18
+ import XCTest
19
+
20
+ private final class StubFIRAppToken: NSObject {
21
+ let label: String
22
+ init(label: String) {
23
+ self.label = label
24
+ }
25
+ }
26
+
27
+ private final class StubFIRAppRegistry: NSObject, RNFBFIRAppLookingUp {
28
+ var defaultAppValue: AnyObject?
29
+ var namedApps: [String: AnyObject] = [:]
30
+ var lastNamedLookup: String?
31
+
32
+ func defaultApp() -> AnyObject? {
33
+ defaultAppValue
34
+ }
35
+
36
+ func appNamed(_ name: String) -> AnyObject? {
37
+ lastNamedLookup = name
38
+ return namedApps[name]
39
+ }
40
+ }
41
+
42
+ final class RCTConvertFIRAppTests: XCTestCase {
43
+ func testDefaultDisplayNameReturnsDefaultApp() {
44
+ let registry = StubFIRAppRegistry()
45
+ let defaultApp = StubFIRAppToken(label: "default")
46
+ registry.defaultAppValue = defaultApp
47
+ registry.namedApps["[DEFAULT]"] = StubFIRAppToken(label: "should-not-use")
48
+
49
+ let result = RCTConvertFIRApp.firApp(fromString: "[DEFAULT]", registry: registry)
50
+
51
+ XCTAssertTrue(result === defaultApp)
52
+ XCTAssertNil(registry.lastNamedLookup)
53
+ }
54
+
55
+ func testNamedAppUsesAppNamed() {
56
+ let registry = StubFIRAppRegistry()
57
+ let named = StubFIRAppToken(label: "secondary")
58
+ registry.namedApps["secondary"] = named
59
+ registry.defaultAppValue = StubFIRAppToken(label: "default")
60
+
61
+ let result = RCTConvertFIRApp.firApp(fromString: "secondary", registry: registry)
62
+
63
+ XCTAssertTrue(result === named)
64
+ XCTAssertEqual(registry.lastNamedLookup, "secondary")
65
+ }
66
+
67
+ func testMissingNamedAppReturnsNil() {
68
+ let registry = StubFIRAppRegistry()
69
+ let result = RCTConvertFIRApp.firApp(fromString: "missing", registry: registry)
70
+ XCTAssertNil(result)
71
+ XCTAssertEqual(registry.lastNamedLookup, "missing")
72
+ }
73
+ }
@@ -0,0 +1,57 @@
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 <XCTest/XCTest.h>
18
+
19
+ #import "FirebaseCore/FirebaseCore.h"
20
+ #import "RCTConvert+FIROptions.h"
21
+
22
+ @interface RCTConvertFIROptionsFacadeTests : XCTestCase
23
+ @end
24
+
25
+ @implementation RCTConvertFIROptionsFacadeTests
26
+
27
+ - (void)testFacadeConvertRawOptionsMapsFieldsAndBundleID {
28
+ NSDictionary *raw = @{
29
+ @"appId" : @"app-id",
30
+ @"messagingSenderId" : @"sender-id",
31
+ @"apiKey" : @"api-key",
32
+ @"projectId" : @"project-id",
33
+ @"clientId" : @"client-id",
34
+ @"databaseURL" : @"https://example.firebaseio.com",
35
+ @"storageBucket" : @"example.appspot.com",
36
+ };
37
+
38
+ FIROptions *options = [RCTConvert convertRawOptions:raw];
39
+ NSString *expectedBundleID =
40
+ [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"];
41
+
42
+ XCTAssertEqualObjects(options.googleAppID, @"app-id");
43
+ XCTAssertEqualObjects(options.GCMSenderID, @"sender-id");
44
+ XCTAssertEqualObjects(options.APIKey, @"api-key");
45
+ XCTAssertEqualObjects(options.projectID, @"project-id");
46
+ XCTAssertEqualObjects(options.clientID, @"client-id");
47
+ XCTAssertEqualObjects(options.databaseURL, @"https://example.firebaseio.com");
48
+ XCTAssertEqualObjects(options.storageBucket, @"example.appspot.com");
49
+ XCTAssertEqualObjects(options.bundleID, expectedBundleID);
50
+ }
51
+
52
+ - (void)testFacadePublicSelectorsUnchanged {
53
+ XCTAssertTrue([RCTConvert respondsToSelector:@selector(convertRawOptions:)]);
54
+ XCTAssertTrue([RCTConvert respondsToSelector:@selector(FIROptions:)]);
55
+ }
56
+
57
+ @end