From 6a64c478dd4be914d59e90c5cc4515219713fa37 Mon Sep 17 00:00:00 2001 From: Sandro Machado Date: Fri, 20 Dec 2019 10:42:15 +0000 Subject: [PATCH 01/16] docs(messaging): fix broken Firebase link (#3028) Fix the link to the cloud messaging product on the README.md --- packages/messaging/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/messaging/README.md b/packages/messaging/README.md index 3a06ebb2..cd2f6f47 100644 --- a/packages/messaging/README.md +++ b/packages/messaging/README.md @@ -26,7 +26,7 @@ cost free service, allowing for server-device and device-device communication. The React Native Firebase Messaging module provides a simple JavaScript API to interact with FCM. -[> Learn More](https://firebase.google.com/products/messaging/) +[> Learn More](https://firebase.google.com/products/cloud-messaging/) ## Installation From e7fced7348e85938a3bb1aebecc7554a2244aea8 Mon Sep 17 00:00:00 2001 From: Gustavo Date: Mon, 30 Dec 2019 10:21:05 -0300 Subject: [PATCH 02/16] fix(app): typo (#3047) --- packages/app/lib/internal/registry/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/lib/internal/registry/app.js b/packages/app/lib/internal/registry/app.js index da195a8c..f11a4423 100644 --- a/packages/app/lib/internal/registry/app.js +++ b/packages/app/lib/internal/registry/app.js @@ -173,7 +173,7 @@ export function initializeApp(options = {}, configOrName) { return getAppModule() .initializeApp(options, { name }) .then(() => { - app._intialized = true; + app._initialized = true; return app; }); } From 2e2b24e51d43524c9ec5c7becd75b7dcbaca30be Mon Sep 17 00:00:00 2001 From: Joel Gallant Date: Mon, 30 Dec 2019 06:22:15 -0700 Subject: [PATCH 03/16] chore(app): refactor default re-export syntax (#3036) --- packages/app/lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/lib/index.js b/packages/app/lib/index.js index 02a67789..55fc1ca3 100644 --- a/packages/app/lib/index.js +++ b/packages/app/lib/index.js @@ -18,6 +18,6 @@ import { getFirebaseRoot } from './internal/registry/namespace'; export const firebase = getFirebaseRoot(); -export utils from './utils'; +export { default as utils } from './utils'; export default firebase; From da0408ca4eb254042fc10322597829094f7fab00 Mon Sep 17 00:00:00 2001 From: Anderson Addo <34724755+andersonaddo@users.noreply.github.com> Date: Mon, 30 Dec 2019 05:28:52 -0800 Subject: [PATCH 04/16] docs(storage): add note about errors #3033 (#3034) This is a suggested way to improve the error documentation of this package. I've talked more about my feelings about the current state of the error documentation in #3033 --- docs/storage/index.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/storage/index.md b/docs/storage/index.md index 9145f289..e235ec4f 100644 --- a/docs/storage/index.md +++ b/docs/storage/index.md @@ -40,6 +40,14 @@ directly from your device and from your Firebase Cloud Storage bucket. +## Errors +The functions in this module can throw two different types of errors. If ill-formed urls are passed into them, they will throw +[generic Errors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) with messages +explaining the problem that caused them. + +If error was thrown by Firebase itself, then the function will throw a [NativeFirebaseError](https://invertase.io/oss/react-native-firebase/v6/app/reference/nativefirebaseerror). The codes for these errors are the same as the codes for [Firebase Cloud Storage Web errors](https://firebase.google.com/docs/storage/web/handle-errors). + + ## Learn more Our documentation is a great place to start, however if you're looking for more help or want to help others, From c5043d1fcffa0902f4521125e3fb5ac2178fe264 Mon Sep 17 00:00:00 2001 From: Pablo Kebees Date: Mon, 13 Jan 2020 18:16:22 +0100 Subject: [PATCH 05/16] fix(auth,ios): remove unnecessary string cast (#3091) * Removed string cast from dynamicLinkDomain Co-authored-by: Mike Diarmid --- packages/auth/ios/RNFBAuth/RNFBAuthModule.m | 2 +- tests/package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/auth/ios/RNFBAuth/RNFBAuthModule.m b/packages/auth/ios/RNFBAuth/RNFBAuthModule.m index 2be522a5..9e24968e 100644 --- a/packages/auth/ios/RNFBAuth/RNFBAuthModule.m +++ b/packages/auth/ios/RNFBAuth/RNFBAuthModule.m @@ -1145,7 +1145,7 @@ RCT_EXPORT_METHOD(verifyPasswordResetCode: } if (actionCodeSettings[keyDynamicLinkDomain]) { - NSString *dynamicLinkDomain = [actionCodeSettings[keyDynamicLinkDomain] stringValue]; + NSString *dynamicLinkDomain = actionCodeSettings[keyDynamicLinkDomain]; [settings setDynamicLinkDomain:dynamicLinkDomain]; } diff --git a/tests/package.json b/tests/package.json index c6ca96a5..1116686e 100644 --- a/tests/package.json +++ b/tests/package.json @@ -80,13 +80,13 @@ "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/testing.app", "build": "xcodebuild -workspace ios/testing.xcworkspace -scheme testing -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES -quiet | xcpretty -k", "type": "ios.simulator", - "name": "iPhone X" + "name": "iPhone X, iOS 12.2" }, "ios.ci": { "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/testing.app", "build": "xcodebuild -workspace ios/testing.xcworkspace -scheme testing -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES \"RCT_METRO_PORT=$RCT_METRO_PORT\" | xcpretty -k", "type": "ios.simulator", - "name": "iPhone X" + "name": "iPhone X, iOS 12.2" }, "android.emu.debug": { "binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk", From 84be0ee2b22bbad4fddfd6bf6b4983cf683bc808 Mon Sep 17 00:00:00 2001 From: Michael Tamm Date: Mon, 13 Jan 2020 18:23:32 +0100 Subject: [PATCH 06/16] fix(crashlytics): handle undefined fileName in stack frames (#3080) --- packages/crashlytics/lib/handlers.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/crashlytics/lib/handlers.js b/packages/crashlytics/lib/handlers.js index 2c8066b1..66184834 100644 --- a/packages/crashlytics/lib/handlers.js +++ b/packages/crashlytics/lib/handlers.js @@ -28,17 +28,22 @@ export function createNativeErrorObj(error, stackFrames, isUnhandledRejection) { nativeObj.frames = []; for (let i = 0; i < stackFrames.length; i++) { const { columnNumber, lineNumber, fileName, functionName, source } = stackFrames[i]; - const subStrLen = fileName.indexOf('?') < 0 ? fileName.length : fileName.indexOf('?'); - const fileNameParsed = - fileName && fileName.length ? fileName.substring(0, subStrLen) : ''; + let fileNameParsed = ''; + if (fileName) { + const subStrLen = fileName.indexOf('?'); + if (subStrLen < 0) { + fileNameParsed = fileName; + } else if (subStrLen > 0) { + fileNameParsed = fileName.substring(0, subStrLen); + } + } nativeObj.frames.push({ src: source, line: lineNumber || 0, col: columnNumber || 0, fn: functionName || '', - file: `${fileNameParsed.length ? fileNameParsed : ''}:${lineNumber || - 0}:${columnNumber || 0}`, + file: `${fileNameParsed}:${lineNumber || 0}:${columnNumber || 0}`, }); } From 39016346e419175119e863b2e2bff10166ddf40c Mon Sep 17 00:00:00 2001 From: Cuneyt Aliustaoglu Date: Tue, 14 Jan 2020 23:59:10 +1300 Subject: [PATCH 07/16] fix(crashlytics,ios): version bump native ios deps (#3013) * version bump: Crashlytics 3.12.0->3.14.0 & Fabric 1.9.0->1.10.2 to prevent deprecated UIWebView issue * update Podfile.lock Co-authored-by: Mike Diarmid --- packages/crashlytics/RNFBCrashlytics.podspec | 4 ++-- tests/ios/Podfile.lock | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/crashlytics/RNFBCrashlytics.podspec b/packages/crashlytics/RNFBCrashlytics.podspec index ed6cbac7..eb58c780 100644 --- a/packages/crashlytics/RNFBCrashlytics.podspec +++ b/packages/crashlytics/RNFBCrashlytics.podspec @@ -10,7 +10,7 @@ if using_custom_firebase_sdk_version end # Fabric SDK Override -fabric_sdk_version = '~> 1.9.0' +fabric_sdk_version = '~> 1.10.2' using_custom_fabric_sdk_version = defined? $FabricSDKVersion if using_custom_fabric_sdk_version Pod::UI.puts "RNFBCrashlytics: Using user specified Fabric SDK version '#{$FabricSDKVersion}'" @@ -18,7 +18,7 @@ if using_custom_fabric_sdk_version end # Crashlytics SDK Override -crashlytics_sdk_version = '~> 3.12.0' +crashlytics_sdk_version = '~> 3.14.0' using_custom_crashlytics_sdk_version = defined? $CrashlyticsSDKVersion if using_custom_crashlytics_sdk_version Pod::UI.puts "RNFBCrashlytics: Using user specified Crashlytics SDK version '#{$CrashlyticsSDKVersion}'" diff --git a/tests/ios/Podfile.lock b/tests/ios/Podfile.lock index 15cdc20c..3e6bd12e 100644 --- a/tests/ios/Podfile.lock +++ b/tests/ios/Podfile.lock @@ -165,10 +165,10 @@ PODS: - BoringSSL-GRPC/Implementation (0.0.3): - BoringSSL-GRPC/Interface (= 0.0.3) - BoringSSL-GRPC/Interface (0.0.3) - - Crashlytics (3.12.0): - - Fabric (~> 1.9.0) + - Crashlytics (3.14.0): + - Fabric (~> 1.10.2) - DoubleConversion (1.1.6) - - Fabric (1.9.0) + - Fabric (1.10.2) - Firebase/AdMob (6.13.0): - Firebase/CoreOnly - Google-Mobile-Ads-SDK (~> 7.50) @@ -556,8 +556,8 @@ PODS: - React - RNFBApp - RNFBCrashlytics (6.2.0): - - Crashlytics (~> 3.12.0) - - Fabric (~> 1.9.0) + - Crashlytics (~> 3.14.0) + - Fabric (~> 1.10.2) - Firebase/Core (~> 6.13.0) - React - RNFBApp @@ -803,9 +803,9 @@ SPEC CHECKSUMS: abseil: 18063d773f5366ff8736a050fe035a28f635fd27 boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c BoringSSL-GRPC: db8764df3204ccea016e1c8dd15d9a9ad63ff318 - Crashlytics: 07fb167b1694128c1c9a5a5cc319b0e9c3ca0933 + Crashlytics: 540b7e5f5da5a042647227a5e3ac51d85eed06df DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2 - Fabric: f988e33c97f08930a413e08123064d2e5f68d655 + Fabric: 706c8b8098fff96c33c0db69cbf81f9c551d0d74 Firebase: 458d109512200d1aca2e1b9b6cf7d68a869a4a46 FirebaseABTesting: 0d10f3cdc3fa00f3f175b5b56c1003c8e888299f FirebaseAnalytics: 45f36d9c429fc91d206283900ab75390cd05ee8a @@ -873,7 +873,7 @@ SPEC CHECKSUMS: RNFBAnalytics: 57dc0bfad4e40f68779757653676699072651218 RNFBApp: 5b215aacc09105a1761de31b9a0eb2abcce06253 RNFBAuth: 61673c0d38ce225c315e7be13a1b494904baedd2 - RNFBCrashlytics: 0469cb96b00904e0c9604b9636d8eeab31115b08 + RNFBCrashlytics: 63bb6e8c450075e2b01b98865911ece999da8ac9 RNFBDatabase: 267f476097111054553ecb99208201945961efa5 RNFBDynamicLinks: fc6a123aaa86dc8745dcb3050ecc9c8e199f64df RNFBFirestore: 5de4ae898df51a3ecc16a45db15019836c5cec87 From 036a50e7b8328ab51ee202300f91069edd2f4cf2 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Tue, 14 Jan 2020 06:08:52 -0500 Subject: [PATCH 08/16] docs(crashlytics): notes on what to expect for crashes (#3092) --- packages/crashlytics/lib/index.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/crashlytics/lib/index.d.ts b/packages/crashlytics/lib/index.d.ts index 71782e16..aad269af 100644 --- a/packages/crashlytics/lib/index.d.ts +++ b/packages/crashlytics/lib/index.d.ts @@ -79,7 +79,7 @@ export namespace FirebaseCrashlyticsTypes { isCrashlyticsCollectionEnabled: true; /** - * Cause your app to crash for testing purposes. + * Cause your app to crash for testing purposes. This is a native crash and will not contain a javascript stack trace. * * #### Example * @@ -107,7 +107,9 @@ export namespace FirebaseCrashlyticsTypes { /** * Record a JavaScript Error. * - * The JavaScript stack trace is converted into a mock native iOS or Android exception before submission. + * The JavaScript stack trace is converted into a mock native iOS or Android exception before submission. + * The line numbers in the stack trace (if available) will be relative to the javascript bundle built by your packager, + * after whatever transpilation or minimization steps happen. You will need to maintain sourcemaps to decode them if desired. * * #### Example * From 760b8f25a22ea13149edc37fd908dd81f0c5688f Mon Sep 17 00:00:00 2001 From: Jeff Gu Kang Date: Thu, 16 Jan 2020 09:33:59 +0900 Subject: [PATCH 09/16] docs(iid): fix typo -> iid.get() to iid().get() (#3098) --- docs/iid/quick-start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/iid/quick-start.md b/docs/iid/quick-start.md index eb7b1c09..e0914fe3 100644 --- a/docs/iid/quick-start.md +++ b/docs/iid/quick-start.md @@ -43,7 +43,7 @@ To retrieve the current instance ID, call the `get` method: import iid from '@react-native-firebase/iid'; async function getInstanceId() { - const id = await iid.get(); + const id = await iid().get(); console.log('Current Instance ID: ', id); } ``` From 8045058b0e6edc58857ad00ec11110a1d7572f50 Mon Sep 17 00:00:00 2001 From: Jack Burgess Date: Sat, 18 Jan 2020 00:06:31 +0000 Subject: [PATCH 10/16] docs(perf): Add HTTP metric.start command to example --- docs/perf/quick-start.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/perf/quick-start.md b/docs/perf/quick-start.md index b108ed04..409a8ff8 100644 --- a/docs/perf/quick-start.md +++ b/docs/perf/quick-start.md @@ -80,13 +80,16 @@ async function getRequest(url) { // Define meta details metric.putAttribute('user', 'abcd'); + // Start the metric + await metric.start(); + // Perform a HTTP request and provide response information const response = await fetch(url); metric.setHttpResponseCode(response.status); metric.setResponseContentType(response.headers.get('Content-Type')); metric.setResponsePayloadSize(response.headers.get('Content-Length')); - // Stop the trace + // Stop the metric await metric.stop(); return response.json(); From d11c4ffe5b8756439526b39da9e44f622d723241 Mon Sep 17 00:00:00 2001 From: Mike Diarmid Date: Mon, 20 Jan 2020 10:21:13 +0000 Subject: [PATCH 11/16] chore(docs): fix linting issue --- packages/crashlytics/lib/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/crashlytics/lib/index.d.ts b/packages/crashlytics/lib/index.d.ts index aad269af..38da376f 100644 --- a/packages/crashlytics/lib/index.d.ts +++ b/packages/crashlytics/lib/index.d.ts @@ -107,7 +107,7 @@ export namespace FirebaseCrashlyticsTypes { /** * Record a JavaScript Error. * - * The JavaScript stack trace is converted into a mock native iOS or Android exception before submission. + * The JavaScript stack trace is converted into a mock native iOS or Android exception before submission. * The line numbers in the stack trace (if available) will be relative to the javascript bundle built by your packager, * after whatever transpilation or minimization steps happen. You will need to maintain sourcemaps to decode them if desired. * From f90217ae9c0c762e157720b92c7761b205fd33b0 Mon Sep 17 00:00:00 2001 From: Ariel Reis Date: Mon, 20 Jan 2020 07:25:21 -0300 Subject: [PATCH 12/16] docs(iid) :fix firebase import from iid module (#3103) --- docs/iid/quick-start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/iid/quick-start.md b/docs/iid/quick-start.md index e0914fe3..179b3c8e 100644 --- a/docs/iid/quick-start.md +++ b/docs/iid/quick-start.md @@ -32,7 +32,7 @@ import iid from '@react-native-firebase/iid'; The package also provides access to the firebase instance: ```js -import { firebase } from '@react-native-firebase/perf'; +import { firebase } from '@react-native-firebase/iid'; ``` ### Retrieving the instance token From c66bfc61db8538cc9c1b15fa8a1c46f4cdbc580b Mon Sep 17 00:00:00 2001 From: Russell Wheatley Date: Mon, 20 Jan 2020 11:49:57 +0000 Subject: [PATCH 13/16] fix(firestore,android): add additional null check to exception handler --- .../firestore/ReactNativeFirebaseFirestoreCommon.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/firestore/android/src/reactnative/java/io/invertase/firebase/firestore/ReactNativeFirebaseFirestoreCommon.java b/packages/firestore/android/src/reactnative/java/io/invertase/firebase/firestore/ReactNativeFirebaseFirestoreCommon.java index 074925f2..3136da16 100644 --- a/packages/firestore/android/src/reactnative/java/io/invertase/firebase/firestore/ReactNativeFirebaseFirestoreCommon.java +++ b/packages/firestore/android/src/reactnative/java/io/invertase/firebase/firestore/ReactNativeFirebaseFirestoreCommon.java @@ -30,7 +30,10 @@ class ReactNativeFirebaseFirestoreCommon { UniversalFirebaseFirestoreException universalException = new UniversalFirebaseFirestoreException((FirebaseFirestoreException) exception, exception.getCause()); rejectPromiseWithCodeAndMessage(promise, universalException.getCode(), universalException.getMessage()); } else if (exception.getCause() != null && exception.getCause() instanceof FirebaseFirestoreException) { - UniversalFirebaseFirestoreException universalException = new UniversalFirebaseFirestoreException((FirebaseFirestoreException) exception.getCause(), exception.getCause().getCause()); + UniversalFirebaseFirestoreException universalException = new UniversalFirebaseFirestoreException( + (FirebaseFirestoreException) exception.getCause(), + exception.getCause().getCause() != null ? exception.getCause().getCause() : exception.getCause() + ); rejectPromiseWithCodeAndMessage(promise, universalException.getCode(), universalException.getMessage()); } else { rejectPromiseWithExceptionMap(promise, exception); From bb68cbf12552d70a2d32a7c467bedf0339923741 Mon Sep 17 00:00:00 2001 From: Anderson Addo <34724755+andersonaddo@users.noreply.github.com> Date: Mon, 20 Jan 2020 09:30:36 -0500 Subject: [PATCH 14/16] docs(crashlytics): improve Crashlytics docs in response to #2724 (#3112) * Improved Crashlytics documentation in response to #2724 * Corrected a typo and made instructions about firebase.json clearer Co-Authored-By: Mike Diarmid Co-authored-by: Mike Diarmid --- docs/crashlytics/quick-start.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/crashlytics/quick-start.md b/docs/crashlytics/quick-start.md index 020cc243..5bb311fa 100644 --- a/docs/crashlytics/quick-start.md +++ b/docs/crashlytics/quick-start.md @@ -119,4 +119,8 @@ Once your user has consented, enable Crashlytics collection via the JavaScript A await firebase.crashlytics().setCrashlyticsCollectionEnabled(true); ``` -To learn more about all the `firebase.json` options, view the documentation here. + +### Enabling Debug Reports +By default, Crashlytics won't report crashes and logs from builds in debug mode. To enable it, set the `crashlytics_debug_enabled` option to `true` in the `react-native` section of your `firebase.json` config file. + +To learn more about all the `firebase.json` options, view the documentation here. From 31d73f408767ade6f3f823c2ec9dacaf60677a84 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 20 Jan 2020 23:32:15 +0900 Subject: [PATCH 15/16] docs(iam): fix gradle settings path in manual linking docs (#3108) --- docs/in-app-messaging/android.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/in-app-messaging/android.md b/docs/in-app-messaging/android.md index 3c6b4667..daeb5958 100644 --- a/docs/in-app-messaging/android.md +++ b/docs/in-app-messaging/android.md @@ -13,8 +13,8 @@ description: Manually integrate Firebase In-App Messaging into your Android appl Add the following to your projects `/android/settings.gradle` file: ```groovy -include ':@react-native-firebase_inAppMessaging' -project(':@react-native-firebase_inAppMessaging').projectDir = new File(rootProject.projectDir, './../node_modules/@react-native-firebase/in-app-messaging/android') +include ':@react-native-firebase_in-app-messaging' +project(':@react-native-firebase_in-app-messaging').projectDir = new File(rootProject.projectDir, './../node_modules/@react-native-firebase/in-app-messaging/android') ``` #### Update Gradle Dependencies From ca2da3e45369c7ab2760f146fb816995871eb33e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20L=C3=A9vai?= Date: Mon, 20 Jan 2020 15:35:20 +0100 Subject: [PATCH 16/16] docs(functions): fix ios manual linking typo (#3105) --- docs/functions/ios.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/functions/ios.md b/docs/functions/ios.md index 485e344c..90b23d52 100644 --- a/docs/functions/ios.md +++ b/docs/functions/ios.md @@ -17,7 +17,7 @@ Add the `RNFBFunctions` Pod to your projects `/ios/Podfile`: ```ruby{3} target 'app' do ... - pod 'RNFBFirestore', :path => '../node_modules/@react-native-firebase/functions' + pod 'RNFBFunctions', :path => '../node_modules/@react-native-firebase/functions' end ```