invertase / react-native-firebase

πŸ”₯ A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
https://rnfirebase.io
Other
11.54k stars 2.19k forks source link

✨ v6.0.0 ✨ #2025

Closed Salakar closed 4 years ago

Salakar commented 5 years ago

Hey everybody πŸ’›

Super excited to announce that we're just over halfway through our v5 -> v6 migration + overhaul, and; there are so many great things there already for you to try out. We say this every time but really; this is our 'largest release yet' xπŸ’―

So please πŸ™ check out the changelog and if all the Firebase services that you use are already listed there then you are good to migrate to the new individual npm packages. They are only released as patch versions for now until all packages are ready - at which point they'll be published as v6.0.0 - I'd recommend locking your package versions until this time.

Instructions can be found on the changelog. Please bare with us well we work towards v6, you have not been forgotten.

I will update this issue with currently being worked on modules and modules next in line, so subscribe to be notified of that and other announcements.

Blog posts about v6.0.0


React Native Firebase is built and maintained with πŸ’› by Invertase.


Salakar commented 5 years ago

In-progress:

Next-up:

Salakar commented 5 years ago

New Website

We also have a new documentation hub/website that we're hoping to have open to early public feedback in a couple of weeks. We'll update this comment as & when it becomes available.

πŸŽ‰ EDIT: πŸŽ‰ It's up - see the comment below. https://github.com/invertase/react-native-firebase/issues/2025#issuecomment-487090173

Salakar commented 5 years ago

Temporary Discord Server

We have a Discord Server up temporarily to discuss v6.0.0 and post announcements to without the noise of the main Discord server.

If you'd like to join and discuss it please do so: https://discord.gg/rHjpxts

paolospag commented 5 years ago

This is a good news @Salakar ! I have two questions:

1) why are Authentication and Cloud Firestore services missing in the changelog despite being available in npm? 2) what is the release estimation for the Cloud Messaging service?

Salakar commented 5 years ago

@paolospag hey, sure;

  1. they're just placeholder packages, changelog is the source of truth on what is available
  2. it's last in line just because of it's size and didn't want to hold up the others too much, can't give an ETA on that yet because of that and that I need to scope out how far to go with it change and feature wise - might make an issue to discuss that in a few days
paolospag commented 5 years ago

Thanks for clarifying. So, what is the ETA for Authentication and Cloud Firestore?

Salakar commented 5 years ago

So, what is the ETA for Authentication and Cloud Firestore?

These are being worked alongside the other modules in a separate change list. Can't give you an ETA right now but they're definitely in progress πŸ™ƒ

loga4 commented 5 years ago

Hi! It's a great work! Waiting for a RC :)

I would like to know when it is planned to migrate remote push notification?

Salakar commented 5 years ago

@loga4 it's last on the list just because it needs the most attention and I didn't want to hold up all the other modules because of it

mazenchami commented 5 years ago

@Salakar when will v6 be pushed? I am currently looking to migrate away from Google Analytics and trying to decide if I should just wait for v6 as the latest version installation seems to be MUCH longer than v6...

Salakar commented 5 years ago

@mazenchami if you just need Firebase Analytics then v6 is ready to go for you, see the change log for more info.

pratikadyalkar commented 5 years ago

Are these methods for storage available now? // Pause the upload uploadTask.pause();

// Resume the upload uploadTask.resume();

// Cancel the upload uploadTask.cancel()

Salakar commented 5 years ago

@addu1 yes they are πŸŽ‰ PR still in progress though here: https://github.com/invertase/react-native-firebase/pull/2043 - but check the changelog for storage: https://github.com/invertase/react-native-firebase/blob/%40salakar/v6/storage/CHANGELOG.md#storage - many new things.

mazenchami commented 5 years ago

@mazenchami if you just need Firebase Analytics then v6 is ready to go for you, see the change log for more info.

@Salakar thank you very much for the info. Is Crashlytics also ready in v6? Additionally, if I wanted to manually install the package, if I follow the RN iOS Manual and the usual Android files MainApplication, settings.gradle, & /app/build.gradle?

Salakar commented 5 years ago

@mazenchami yes it is. You can install using RN link as well:

yarn add @react-native-firebase/app@alpha
yarn add @react-native-firebase/crashlytics@alpha

react-native link @react-native-firebase/app
react-native link @react-native-firebase/crashlytics

(app is required by all modules)

We're still working through the docs but it will be fully documented.

mazenchami commented 5 years ago

@Salakar thanks for the detail. don't mean to be a pest, please let me know if there is another place to post my questions. My guess is that the only other item needed is the downloaded GoogleService-Info.plist file?

Salakar commented 5 years ago

Yes, you'll need the Google Services plist/json for iOS/Android as well sorry.

If you have any more questions feel free to join the v6 discord server mentioned in the 4th comment above - will be easier :)

Salakar commented 5 years ago

Hey everyone πŸ‘‹

I think we're in a comfortable place to open up the new site.

URL: https://invertase.io/oss/react-native-firebase

There's still on-going work to improve it and a lot of content missing (or needs re-working); however, we're making it public so that we can get your feedback and also open it up to anyone wanting to submit content (PRs πŸ’―)

Submitting Feedback

If you have any feedback please either submit it here, on the RNFB v6 discord or using the Send Feedback button that appears on most pages:

image

The more detail you provide the better.

Contributing

If you'd like to contribute to the documentation here's a quick overview of how it works.

If you have any questions or queries on how to contribute please get in touch, we'd be happy to help or mentor if required.

Salakar commented 5 years ago

Cloud Storage is now up, published in alpha10.

[View the Cloud Storage changelog]

Salakar commented 5 years ago

Authentication Part 1 in progress: https://github.com/invertase/react-native-firebase/pull/2107

EDIT: complete.

Salakar commented 5 years ago

Dynamic Links in progress: https://github.com/invertase/react-native-firebase/pull/2103

Salakar commented 5 years ago

ML-Kit in progress: https://github.com/invertase/react-native-firebase/pull/2117

Salakar commented 5 years ago

πŸ‘‹ 6.0.0-alpha.11 published to NPM - now with Authentication (TS types support only - flow and other things in another alpha, see https://github.com/invertase/react-native-firebase/pull/2113).

hellpirat commented 5 years ago

Hi, Is this ready for using firebase/Messaging? I would like to try it :) I have a use_frameworks in my pod, so will it work for me? πŸ€”

salmazov commented 5 years ago

I want to use only Firebase Auth/Storage. What is the Pod configuration I need when I use react-native-firebase v.6?

Salakar commented 5 years ago

@salmazov I'd recommend following through the new projects guide: https://invertase.io/oss/react-native-firebase/quick-start/new-project and then these guides:

If you want to see a reference Podfile you can check out the tests project one: https://github.com/invertase/react-native-firebase/blob/master/tests/ios/Podfile (note lines 2 & 26, this automatically adds the pods for you based on which packages you've installed via npm/yarn)

ouabing commented 5 years ago

Hey guys, I'm managed to migrate my app from old Fabric Crashlytics to Firebase, I just wonder why the Crashlytics Podspec targets iOS 10.0? I know App Store may reject apps targeting 9.0 later, but there are still 1% iOS 9.x users using our app for now.

Salakar commented 5 years ago

@ouabing we'll probably lower it down in another alpha, the decision was mainly for Notifications - but we can just make that one specifically iOS10

ouabing commented 5 years ago

@Salakar Got it, thanks for the quick reply!

HuuNguyen312 commented 5 years ago

Hi guys, I can't add firebase message to my project.

yarn add @react-native-firebase/messaging@alpha yarn add v1.9.4 warning ../../../../package.json: No license field [1/4] πŸ” Resolving packages... error An unexpected error occurred: "https://registry.yarnpkg.com/@react-native-firebase%2fmessaging: Not found". info If you think this is a bug, please open a bug report with the information provided in "/Users/huunn/WorkSpace/React-Native/Asio/Upde/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command. Please help me resolve it. Thanks

mikehardy commented 5 years ago

@HuuNguyen312 open a new issue, follow the issue template carefully

Salakar commented 5 years ago

@HuuNguyen312 , and also, messaging doesn't exist yet as mentioned at the top of this issue

sibelius commented 5 years ago

npx @react-native-community/cli@next init --template=@react-native-firebase/template@alpha Awesome

is throwing the following error

βœ” Downloading template
βœ” Copying template
βœ” Processing template
β ‹ Installing all required dependenciesUsing React Native Firebase version '6.0.0-alpha.22'
 -> Detecting Firebase modules...
    βœ“ Discovered 'app' (+ build script)
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
Fetching podspec for `RNFBApp` from `../node_modules/@react-native-firebase/app`
Fetching podspec for `React` from `../node_modules/react-native`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `yoga` from `../node_modules/react-native/ReactCommon/yoga`
[!] CocoaPods could not find compatible versions for pod "Firebase/Core":
  In Podfile:
    RNFBApp (from `../node_modules/@react-native-firebase/app`) was resolved to 6.0.0-alpha.22, which depends on
      Firebase/Core (~> 5.20.2)

None of your spec sources contain a spec satisfying the dependency: `Firebase/Core (~> 5.20.2)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

βœ– Installing all required dependencies
error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
Please try again manually: "cd ./Awesome/ios && pod install".
CocoaPods documentation: https://cocoapods.org/
/Users/sibelius/.npm/_npx/70520/lib/node_modules/@react-native-community/cli/node_modules/graceful-fs/polyfills.js:10
    cwd = origCwd.call(process)
                  ^

Error: ENOENT: no such file or directory, uv_cwd
    at process.cwd (/Users/sibelius/.npm/_npx/70520/lib/node_modules/@react-native-community/cli/node_modules/graceful-fs/polyfills.js:10:19)
    at setopts (/Users/sibelius/.nvm/versions/node/v10.15.0/lib/node_modules/npm/node_modules/glob/common.js:93:21)
    at new Glob (/Users/sibelius/.nvm/versions/node/v10.15.0/lib/node_modules/npm/node_modules/glob/glob.js:135:3)
    at Function.glob.hasMagic (/Users/sibelius/.nvm/versions/node/v10.15.0/lib/node_modules/npm/node_modules/glob/glob.js:101:11)
    at Function.rimrafSync [as sync] (/Users/sibelius/.nvm/versions/node/v10.15.0/lib/node_modules/npm/node_modules/rimraf/rimraf.js:273:36)
    at process.on (/Users/sibelius/.nvm/versions/node/v10.15.0/lib/node_modules/npm/node_modules/libnpx/index.js:151:37)
    at process.emit (events.js:182:13)
    at processEmit [as emit] (/Users/sibelius/.npm/_npx/70520/lib/node_modules/@react-native-community/cli/node_modules/signal-exit/index.js:149:35)
Salakar commented 5 years ago

@sibelius you might need to run pod repo update on your terminal first, I think your specs may be out of date - seems to runs fine for me on latest versions

sibelius commented 5 years ago

I need to run pod repo update before creating a new project?

Salakar commented 5 years ago

@sibelius just once for this time, should be fine going forward.

cc @thymikee - I think the CLI should probably be running pod install --repo-update instead of just install, otherwise this happens, which fails the template creation also as the pod specs repo is out of date, thoughts?

Guess the options are:

thymikee commented 5 years ago

Yep! Send PRs pretty pls

Salakar commented 5 years ago

Yep! Send PRs pretty pls

maybe gif

🀣 but sure, won't be able to until next week, busy at the moment - which approach do you think is best, --repo-update by default may be a bit intense given that RN only uses local Pods.

thymikee commented 5 years ago

Let's find out! cc @orta @alloy

sibelius commented 5 years ago

not sure if this is a problem with react-native-firebase template or cli, but most files are executables

image

I don''t think App.js should be executable

orta commented 5 years ago

Yep, as the firebase pods you're depending on comes from the main CocoaPods trunk specs repo - then you'll need to update your local specs in order to resolve a copy of them

alternative is to bundle the pod specs but that's gonna be a lot of maintaining

mikehardy commented 5 years ago

In general would you agree: the only way to be sure, during a pod link, is to update the specs first before any new link? (I would assert that statement is true but my XCode dev experience is still so shallow)

orta commented 5 years ago

Nope, most RN libs wouldn't need it - only libs with dependencies outside of the node_modules would need that.

mikehardy commented 5 years ago

Oh - that makes perfect sense. Thanks for the reply! I suppose there is some CLI magic that can figure it out and only update if it makes sense but my CLI-fu is also weak so I'll listen and see.

sibelius commented 5 years ago

I'm checking the docs here:

https://github.com/invertase/react-native-firebase/tree/master/packages/app

does react-native link still makes sense? as we are moving to autolinking?

sibelius commented 5 years ago

I've got another error when using platform: 9.0

[!] CocoaPods could not find compatible versions for pod "RNFBApp":
  In Podfile:
    RNFBApp (from `../node_modules/@react-native-firebase/app`)

Specs satisfying the `RNFBApp (from `../node_modules/@react-native-firebase/app`)` dependency were found, but they required a higher minimum deployment target.

is iOS 10.0 the mininum version on react-native-firebase 6.x?

sibelius commented 5 years ago

Based on this https://github.com/invertase/react-native-firebase/pull/1864

can we mix v6 with v5 until all packages are migrated to v6?

is there a status for all the packages?

mikehardy commented 5 years ago

@sibelius ios10 is the minimum, apparently the notifications changes in iOS 10 (vs 9) were pretty large, and carrying them in to the next major version here is painful so they're out for now - I asked the same earlier. I wouldn't place a bet, and I did ask in other locations, but I'd be surprised if react-native supported iOS 9 that much longer, though retiring it will require removing entire devices from compatibility lists whereas the previous minimum iOS supported change did not remove support for any devices, so who knows

As for mixing, I thought the same but haven't tried it. I will be a little surprised if it works, but who knows.

If it's a strong need, maybe porting the ios 9 notifications to react-native-firebase v6 is easiest...

Salakar commented 5 years ago

πŸ‘‹ 6.0.0-alpha.25 published to NPM;


[changelog]


Examples in Changelog.




Ehesp commented 5 years ago

Hi all - 6.0.0-alpha.25 published to NPM.

This fixes the known Database issues above: