Skip to content

Commit

Permalink
feat: BREAKING forward-port to firebase-android-sdk v26 / firebase-io…
Browse files Browse the repository at this point in the history
…s-sdk v7

This drops a large number of deprecated APIs and separates MLKit into cloud APIs (supported) vs on-device (moved to react-native-mlkit)

- on-device MLKit model APIs are in `@react-native-mlkit` now
- cloud ml-vision APIs have moved to just 'ml', in general change all 'vision' to 'ml' (following casing)
- deprecated remote-config APIs are purged
- many other changes, please refer to the upstream release notes for details:
  - https://firebase.google.com/support/release-notes/android#2020-10-27
  - https://firebase.google.com/support/release-notes/ios#version_700_-_october_26_2020

This also may give you options on how you link firebase-ios-sdk. If you have special linking needs, read:
  - https://firebase.google.com/docs/ios/link-firebase-static-dynamic

BREAKING CHANGE: alter ML imports, check iOS linking, remove old API as noted
  • Loading branch information
mikehardy committed Nov 10, 2020
1 parent 0ba1df7 commit 70974d4
Show file tree
Hide file tree
Showing 176 changed files with 1,843 additions and 10,633 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ jobs:
timeout_minutes: 10
retry_wait_seconds: 60
max_attempts: 3
command: echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-28;google_apis;x86_64"
command: echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-30;google_apis;x86_64"

- name: Create Emulator
run: echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd --force --name TestingAVD --device "Nexus 5X" -k 'system-images;android-28;google_apis;x86_64' -g google_apis
run: echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd --force --name TestingAVD --device "Nexus 5X" -k 'system-images;android-30;google_apis;x86_64' -g google_apis

# These Emulator start steps are the current best practice to do retries on multi-line commands with persistent (nohup) processes
- name: Start Android Emulator
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ app.admob.js
app.smartreply.js
eslint-report.json
yarn.lock
spelling.json

# Gatsby / Website
website/.cache
Expand Down
3 changes: 3 additions & 0 deletions .spellcheck.dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ launchProperties
learnt
Lerna
MDX
MLKit
mlkit
mono-repo
Multidex
multidex
Expand Down Expand Up @@ -96,6 +98,7 @@ PRs
PubSub
qa
react-native-firebase
react-native-mlkit
realtime
Realtime
remarketing
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ The main package that you interface with is `App` (`@react-native-firebase/app`)
| [Dynamic Links](/packages/dynamic-links) | [![badge](https://img.shields.io/npm/dm/@react-native-firebase/dynamic-links.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@react-native-firebase/dynamic-links) |
| [In-app Messaging](/packages/in-app-messaging) | [![badge](https://img.shields.io/npm/dm/@react-native-firebase/in-app-messaging.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@react-native-firebase/in-app-messaging) |
| [Instance ID](/packages/iid) | [![badge](https://img.shields.io/npm/dm/@react-native-firebase/iid.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@react-native-firebase/iid) |
| [ML Kit Natural Language](/packages/ml-natural-language) | [![badge](https://img.shields.io/npm/dm/@react-native-firebase/ml-natural-language.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@react-native-firebase/ml-natural-language) |
| [ML Kit Vision](/packages/ml-vision) | [![badge](https://img.shields.io/npm/dm/@react-native-firebase/ml-vision.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@react-native-firebase/ml-vision) |
| [ML](/packages/ml) | [![badge](https://img.shields.io/npm/dm/@react-native-firebase/ml.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@react-native-firebase/ml) |
| [Performance Monitoring](/packages/perf) | [![badge](https://img.shields.io/npm/dm/@react-native-firebase/perf.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@react-native-firebase/perf) |
| [Realtime Database](/packages/database) | [![badge](https://img.shields.io/npm/dm/@react-native-firebase/database.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@react-native-firebase/database) |
| [Remote Config](/packages/remote-config) | [![badge](https://img.shields.io/npm/dm/@react-native-firebase/remote-config.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@react-native-firebase/remote-config) |
Expand Down
3 changes: 1 addition & 2 deletions docs/app/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ Currently, the native Firebase SDKs only provide functionality for creating seco
- [Cloud Functions](/functions)
- [Cloud Storage](/storage).
- [Instance ID](/iid).
- [ML Kit Natural Language](/ml-language).
- [ML Kit Vision](/ml-vision).
- [ML](/ml).
- [Remote Config](/remote-config).

## Initializing secondary apps
Expand Down
2 changes: 1 addition & 1 deletion docs/in-app-messaging/usage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: In App Messaging
description: Installation and getting started with In App Messaging.
icon: //static.invertase.io/assets/firebase/in-app-messaging.svg
next: /ml-natural-language/usage
next: /ml/usage
previous: /iid/usage
---

Expand Down
10 changes: 5 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@ project.ext {
// Overriding Build/Android SDK Versions
android : [
minSdk : 16,
targetSdk : 29,
compileSdk: 29,
buildTools: "29.0.3"
targetSdk : 30,
compileSdk: 30,
buildTools: "30.0.2"
],
// Overriding Library SDK Versions
firebase: [
// Override Firebase SDK Version
bom : "25.12.0"
bom : "26.0.0"
],
],
])
Expand All @@ -209,7 +209,7 @@ Open your projects `/ios/Podfile` and add any of the globals shown below to the

```ruby
# Override Firebase SDK Version
$FirebaseSDKVersion = '6.34.0'
$FirebaseSDKVersion = '7.0.0'
```

Once changed, reinstall your projects pods via pod install and rebuild your project with `npx react-native run-ios`.
Expand Down
55 changes: 24 additions & 31 deletions docs/migrating-to-v6.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ been approved before being released.
We have also ensured the release is compatible with some of the popular tooling in the React Native community, such as
[autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md) & [TypeScript](https://facebook.github.io/react-native/blog/2018/05/07/using-typescript-with-react-native).

Version 6 also brings support for previously unsupported modules such as [Firebase ML Kit](https://firebase.google.com/docs/ml-kit).
Version 6 also brings support for previously unsupported modules such as [Firebase ML](https://firebase.google.com/docs/ml).

## NPM dependency changes

Expand Down Expand Up @@ -238,26 +238,25 @@ yarn add @react-native-firebase/auth

Install the modules required for your application:

| Module | NPM Package |
| ------------------------------------------------------------ | ------------------------------------------ |
| <Anchor href="v6/admob">AdMob</Anchor> | @react-native-firebase/admob |
| <Anchor href="v6/analytics">Analytics</Anchor> | @react-native-firebase/analytics |
| <Anchor href="v6/app">App</Anchor> | @react-native-firebase/app |
| <Anchor href="v6/invites">App Invites</Anchor> | @react-native-firebase/invites |
| <Anchor href="v6/auth">Authentication</Anchor> | @react-native-firebase/auth |
| <Anchor href="v6/firestore">Cloud Firestore</Anchor> | @react-native-firebase/firestore |
| <Anchor href="v6/functions">Cloud Functions</Anchor> | @react-native-firebase/functions |
| <Anchor href="v6/messaging">Cloud Messaging</Anchor> | @react-native-firebase/messaging |
| <Anchor href="v6/storage">Cloud Storage</Anchor> | @react-native-firebase/storage |
| <Anchor href="v6/crashlytics">Crashlytics</Anchor> | @react-native-firebase/crashlytics |
| <Anchor href="v6/links">Dynamic Links</Anchor> | @react-native-firebase/dynamic-links |
| <Anchor href="v6/in-app-messaging">In-app Messaging</Anchor> | @react-native-firebase/in-app-messaging |
| <Anchor href="v6/iid">Instance ID</Anchor> | @react-native-firebase/iid |
| <Anchor href="v6/mlkit">ML Kit Natural Language</Anchor> | @react-native-firebase/ml-natural-language |
| <Anchor href="v6/mlkit">ML Kit Vision</Anchor> | @react-native-firebase/ml-vision |
| <Anchor href="v6/perf">Performance Monitoring</Anchor> | @react-native-firebase/perf |
| <Anchor href="v6/database">Realtime Database</Anchor> | @react-native-firebase/database |
| <Anchor href="v6/remote-config">Remote Config</Anchor> | @react-native-firebase/remote-config |
| Module | NPM Package |
| ------------------------------------------------------------ | --------------------------------------- |
| <Anchor href="v6/admob">AdMob</Anchor> | @react-native-firebase/admob |
| <Anchor href="v6/analytics">Analytics</Anchor> | @react-native-firebase/analytics |
| <Anchor href="v6/app">App</Anchor> | @react-native-firebase/app |
| <Anchor href="v6/invites">App Invites</Anchor> | @react-native-firebase/invites |
| <Anchor href="v6/auth">Authentication</Anchor> | @react-native-firebase/auth |
| <Anchor href="v6/firestore">Cloud Firestore</Anchor> | @react-native-firebase/firestore |
| <Anchor href="v6/functions">Cloud Functions</Anchor> | @react-native-firebase/functions |
| <Anchor href="v6/messaging">Cloud Messaging</Anchor> | @react-native-firebase/messaging |
| <Anchor href="v6/storage">Cloud Storage</Anchor> | @react-native-firebase/storage |
| <Anchor href="v6/crashlytics">Crashlytics</Anchor> | @react-native-firebase/crashlytics |
| <Anchor href="v6/links">Dynamic Links</Anchor> | @react-native-firebase/dynamic-links |
| <Anchor href="v6/in-app-messaging">In-app Messaging</Anchor> | @react-native-firebase/in-app-messaging |
| <Anchor href="v6/iid">Instance ID</Anchor> | @react-native-firebase/iid |
| <Anchor href="v6/ml">ML</Anchor> | @react-native-firebase/ml |
| <Anchor href="v6/perf">Performance Monitoring</Anchor> | @react-native-firebase/perf |
| <Anchor href="v6/database">Realtime Database</Anchor> | @react-native-firebase/database |
| <Anchor href="v6/remote-config">Remote Config</Anchor> | @react-native-firebase/remote-config |

Users on React Native version 0.60+, the modules will be automatically linked. For users on a lower version,
see the module specific pages for manual installation guides.
Expand Down Expand Up @@ -394,9 +393,9 @@ No breaking changes.

### Notifications

Device-local notification APIs are not actually Firebase APIs at the same time they are very difficult to maintain.
Device-local notification APIs are not actually Firebase APIs at the same time they are very difficult to maintain.

For these reasons the notifications package has been removed from react-native-firebase for versions 6 and higher.
For these reasons the notifications package has been removed from react-native-firebase for versions 6 and higher.

How to migrate: If you use device-local notification APIs and user-visible notifications in your app you will want to integrate a separate library that gives you access to device-local notification APIs. Many people have reported success with each of https://notifee.app, https://wix.github.io/react-native-notifications and https://github.com/zo0r/react-native-push-notification

Expand Down Expand Up @@ -454,14 +453,8 @@ How to migrate: If you use device-local notification APIs and user-visible notif
- `firebase.utils.Native` is now deprecated and will be removed in a later release, please rename usages of this to `firebase.utils.FilePath`.
- `firebase.utils.Native.*` some properties have been renamed and deprecated and will be removed in a later release, follow the in-app console warnings on how to migrate.

### ML Kit Natural Language
### ML

`@react-native-firebase/ml-natural-language`

This is a new module. See documentation for usage.

### ML Kit Vision

`@react-native-firebase/ml-vision`
`@react-native-firebase/ml`

This is a new module. See documentation for usage.
3 changes: 0 additions & 3 deletions docs/ml-natural-language/index.md

This file was deleted.

154 changes: 0 additions & 154 deletions docs/ml-natural-language/usage/index.md

This file was deleted.

59 changes: 0 additions & 59 deletions docs/ml-natural-language/usage/installation/android.md

This file was deleted.

Loading

0 comments on commit 70974d4

Please sign in to comment.