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

[face-detector] Make Firebase pods version customisable, so it can be used with bare projects #7141

Merged
merged 3 commits into from May 14, 2020

Conversation

IjzerenHein
Copy link
Contributor

Why

This PR makes the Firebase Pods version for expo-face-detector customisable through a FirebaseSDKVersion constant. This allows for using this package in bare projects side by side with other packages such as react-native-firebase or expo-firebase-analytics, that possibly specify a different version in their Pod file.

How

This adds the optional use of a constant called FirebaseSDKVersion to your podfile. When existent, it uses the firebase version as defined in the constant. Otherwise it uses the default version. This constant is the same as defined in react-native-firebase making interop & configuration easier.

// Override Firebase SDK version
$FirebaseSDKVersion = '6.7.0'

...

use_unimodules!
use_native_modules!

This PR also removes the explicit pod references to FirebaseMLVision and FirebaseMLCommon, which are imported implicitly by Firebase/MLVision and were added in #5685. Explicitly defining these kinds of implicit dependencies seems like a bad strategy and gives only partial guarantees. If you would want a full guarantee, then you would need to explicitly define every implicitly imported Pod dependency, which is not a feasible thing to do (imo).

Test Plan

  • Add both expo-face-detector and @react-native-firebase/app to a bare project
  • Link pods (cd ios && pod install)
  • Error occurs when linking
  • Define $FirebaseSDKVersion = 'x.x.x' at the top of the Podfile
  • Link pods (cd ios && pod install)
  • No link errors

@IjzerenHein IjzerenHein force-pushed the @hein/expo-firebase/facedetector-version branch 2 times, most recently from 1144653 to 8656166 Compare April 2, 2020 11:35
Copy link
Contributor

@sjchmiela sjchmiela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👌 Would you also, please, reinstall pods in bare-expo? 🙏

packages/expo-face-detector/CHANGELOG.md Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

Native Component List for this branch is ready

IjzerenHein and others added 2 commits May 14, 2020 12:21
This makes the firebase pod version overridable so that this package can be used in bare projects, together with other firebase packages. When Firebase versions differ accross multiple packages, pod install will fail. This follows the `$FirebaseSDKVersion` constants also used by react-native-firebase to maximize interop and make it easier for users to configure.

[face-detector] Remove explicit FirebaseMLVision dependencies

[face-detector] Update changelog

Update packages/expo-face-detector/CHANGELOG.md

Co-authored-by: Stanisław Chmiela <sjchmiela@users.noreply.github.com>
@IjzerenHein IjzerenHein force-pushed the @hein/expo-firebase/facedetector-version branch from 9f3034b to 61f169a Compare May 14, 2020 10:25
@IjzerenHein
Copy link
Contributor Author

LGTM! 👌 Would you also, please, reinstall pods in bare-expo? 🙏

@sjchmiela Rebased on master and re-installed pods 👍

Copy link
Contributor

@sjchmiela sjchmiela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Let's merge it! 👌

packages/expo-face-detector/CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Stanisław Chmiela <sjchmiela@users.noreply.github.com>
@IjzerenHein IjzerenHein merged commit ba7564f into master May 14, 2020
@IjzerenHein IjzerenHein deleted the @hein/expo-firebase/facedetector-version branch May 14, 2020 18:30
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.

None yet

3 participants