Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add analytics peerDependency to remote-config, dynamic-links, in-app-messaging #4850

Merged
merged 3 commits into from
Feb 2, 2021

Conversation

mikehardy
Copy link
Collaborator

@mikehardy mikehardy commented Feb 2, 2021

Description

Turns out that analytics is actually required for certain modules, or you get startup crashes - #4821

When analytics is optional the documents say so, like crashlytics

For an optimal experience with Firebase Crashlytics, we recommend enabling Google Analytics in your project by adding the Firebase pod for Analytics to your app as well

But for these ones it is not listed as optional, and a crash was observed

Dynamic Links

Remote Config

Note: When installing the iOS SDK, you have the option of adding the dependency for Analytics. Analytics is required for Remote Config's conditional targeting of app instances to user properties, audiences, and Firebase Predictions.

For Remote Config, Google Analytics is required for the conditional targeting of app instances to user properties, audiences, and Firebase Predictions. Make sure that you enable Google Analytics in your project.

In App Messaging

Related issues

Fixes #4821

Release Summary

This should be rebase merged so that each module get its own changelog entry, in my opinion, otherwise I'd use:

fix(dependencies): add required analytics peerDependency to in-app-messaging, remote-config, dynamic-links

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No - the dependency was actually always needed, this is just a fix to add it

Test Plan


Think react-native-firebase is great? Please consider supporting the project with any of the below:

…ency

Visible in integration guides upstream

Related #4821
…dependency

Visible in integration guides upstream

Related #4821
…ency

Visible in integration guides upstream

Related #4821
@vercel
Copy link

vercel bot commented Feb 2, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/invertase/react-native-firebase/dmahqx0b9
✅ Preview: https://react-native-firebase-git-mikehardy-package-peerdeps.invertase.vercel.app

@codecov
Copy link

codecov bot commented Feb 2, 2021

Codecov Report

Merging #4850 (7f186a6) into master (51edf96) will increase coverage by 0.44%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4850      +/-   ##
==========================================
+ Coverage   88.66%   89.09%   +0.44%     
==========================================
  Files         109      109              
  Lines        3712     3712              
  Branches      347      347              
==========================================
+ Hits         3291     3307      +16     
+ Misses        379      363      -16     
  Partials       42       42              

@mikehardy mikehardy added Workflow: Needs Review Pending feedback or review from a maintainer. Workflow: Pending Merge Waiting on CI or similar labels Feb 2, 2021
@mikehardy
Copy link
Collaborator Author

I've asked for review (always helps!) but default stance is to merge and release in a couple days in absence of review

@Salakar Salakar changed the title Add analytics peerDependency to remote-config, dynamic-links, in-app-messaging fix: add analytics peerDependency to remote-config, dynamic-links, in-app-messaging Feb 2, 2021
@mikehardy mikehardy merged commit 06c2a18 into master Feb 2, 2021
@mikehardy mikehardy deleted the @mikehardy/package-peerdeps branch February 2, 2021 17:00
@mikehardy mikehardy removed Workflow: Needs Review Pending feedback or review from a maintainer. Workflow: Pending Merge Waiting on CI or similar labels Feb 2, 2021
mikehardy added a commit that referenced this pull request Feb 4, 2021
…o one commit

previously it only updated the app module, but now we have packages that depend on
analytics after #4850

previously it did one commit per module, which was effectively a git log spam
@nfcampos
Copy link

@mikehardy
Copy link
Collaborator Author

Yeah, I was a bit iffy on that one - thanks for providing deeper information - you'll note from my link in the PR that no optionality is mentioned (https://firebase.google.com/docs/dynamic-links/ios/create#set-up-firebase-and-the-dynamic-links-sdk) - makes it hard to reason about! Also there may be platform differences between ios and android - hopefully not as I am not sure how I would express that when the peerDependency is for both.

At any rate, based on your documentation I will remove the peer dependency on analytics from dynamic links

mikehardy added a commit that referenced this pull request Feb 10, 2021
Per @nfcampos analytics is actually optional for dynamic links
This information is not mentioned in main documentation but present in some supporting docs
#4850 (comment)
mikehardy added a commit that referenced this pull request Feb 10, 2021
Per @nfcampos analytics is actually optional for dynamic links
This information is not mentioned in main documentation but present in some supporting docs
#4850 (comment)
@nfcampos
Copy link

Yeah the documentation is a bit of a maze

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🔥[🐛] Crash - Using in-app-messaging (or remote-config) without analytics
3 participants