-
Notifications
You must be signed in to change notification settings - Fork 8.2k
[firebase-core] Add core functionality for supporting native Firebase packages #7013
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
Conversation
cb9ea49
to
8035eeb
Compare
...w/src/main/java/versioned/host/exp/exponent/modules/universal/ScopedFirebaseCoreService.java
Outdated
Show resolved
Hide resolved
...w/src/main/java/versioned/host/exp/exponent/modules/universal/ScopedFirebaseCoreService.java
Outdated
Show resolved
Hide resolved
...w/src/main/java/versioned/host/exp/exponent/modules/universal/ScopedFirebaseCoreService.java
Outdated
Show resolved
Hide resolved
...w/src/main/java/versioned/host/exp/exponent/modules/universal/ScopedFirebaseCoreService.java
Outdated
Show resolved
Hide resolved
...w/src/main/java/versioned/host/exp/exponent/modules/universal/ScopedFirebaseCoreService.java
Outdated
Show resolved
Hide resolved
ios/Exponent/Versioned/Core/UniversalModules/EXScopedFirebaseCore.m
Outdated
Show resolved
Hide resolved
ios/Exponent/Versioned/Core/UniversalModules/EXScopedFirebaseCore.m
Outdated
Show resolved
Hide resolved
...expo-firebase-core/android/src/main/java/expo/modules/firebase/core/FirebaseCoreService.java
Outdated
Show resolved
Hide resolved
in addition to the above, be sure to update the CHANGELOG with a summary of the changes from this PR :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overall result looks pretty solid! Thanks for taking care of that! Left some comments mostly about coding style. 💅 👍
|
||
export default { | ||
get DEFAULT_APP_NAME(): string { | ||
if (!ExpoFirebaseCore) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting idea to move these if
s here, I think it is more common in the codebase to do:
// ExpoFirebaseCore.ts
export default NativeModulesProxy.ExpoFirebaseCore;
// ExpoFirebaseCore.web.ts
export default {
DEFAULT_APP_NAME: '[default]',
DEFAULT_APP_OPTIONS: …,
};
and
// FirebaseCore.ts
export function getDefaultAppName() {
if (!ExpoFirebaseCore.DEFAULT_APP_NAME) {
throw...
}
return ExpoFirebaseCore.DEFAULT_APP_NAME;
}
// ...
Is there a specific reason for why you structured this like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I should refactor that. It probably happened as I was moving code & init-functionality and later ended up with something that didn't require any special init-handling in ExpoFirebaseCore.ts
.
Thanks! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated it to:
import ExpoFirebaseCore from './ExpoFirebaseCore';
export * from './FirebaseOptions';
if (!ExpoFirebaseCore) {
console.warn(
'No native ExpoFirebaseCore module found, are you sure the expo-firebase-core module is linked properly?'
);
}
export const { DEFAULT_APP_NAME, DEFAULT_APP_OPTIONS } = ExpoFirebaseCore;
Would you reckon this to be inline with the codebase?
packages/expo-firebase-core/ios/EXFirebaseCore/EXFirebaseCore.m
Outdated
Show resolved
Hide resolved
packages/expo-firebase-core/ios/EXFirebaseCore/EXFirebaseCore+FIROptions.m
Outdated
Show resolved
Hide resolved
packages/expo-firebase-core/ios/EXFirebaseCore/EXFirebaseCore+FIROptions.m
Outdated
Show resolved
Hide resolved
...w/src/main/java/versioned/host/exp/exponent/modules/universal/ScopedFirebaseCoreService.java
Outdated
Show resolved
Hide resolved
|
||
// Get experience key & unique app name | ||
String experienceKey = getEncodedExperienceId(experienceId); | ||
mAppName = "__sandbox_" + experienceKey; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't experienceKey
work as well? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe. The core reason I did this was to be coherent with the iOS implementation. On iOS using the experienceId
failed, because it could contain '%' and '/' characters. The Android implementation seems less restrictive, but I'd rather be on the safe side here and not have any "special" characters in the name, especially if some firebase service may use it for persistent storage.
…ive sandboxed firebase apps
…e loaded on Android
9bfe1a9
to
6be28f8
Compare
// Mark this Firebase App as deleted. Don't delete it straight | ||
// away, but mark it for deletion. When loading a new project | ||
// a check is performed that will cleanup the deleted Firebase apps. | ||
// This ensures that Firebase Apps don't get deleted/recreated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not totally clear on the implications of this but we may want to revisit this in the future if/when we add scoped native firebase modules in the client to give each reload a clean slate similar to if you re-open a standalone app. i don't think it matters much right now though so i'm ok with this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct. This is an optimisation, but also aimed at performance and safety. The safety part would be that there are no unnecessary tear-downs that could affect the app, e.g. when it is closed down. I do agree that this may mask underlying problems in case they exist. At the moment, the native project specific Firebase app is not really used indeed, so we can revisit this later when we have actual native services running in the Expo client.
I made some updates to the guide for using custom fonts. Changes include: - Using Snacks for examples - Using the `useFonts` hook for a simpler example - Example of loading a remote font - Discussion of font formats Squashed commits below * [android] 🤏 Update react-native-gesture-handler to 1.6.0 (#7121) # Why Part of #7006 # How - Used `et update-vendored-module` to update `react-native-gesture-handler`. - Updated versions in some apps. - Tried to run it on Android... and it turned out there is a new `RNGHModalUtils` file scoped under `com.facebook.react` package so I've copied this file manually to appropriate directory in `expoview`. - Added a warning saying that `com.facebook.react` needs to be manually updated, we already do the same in `react-native-reanimated`. - Added changelog entry. # Test Plan Tested examples in `native-component-list`. * [constants] make installationId available in bare (#6906) * [constants] make available in bare * make filename constant * remove installationId from scoped android module * remove installationId from scoped ios * fix ios_test_suite * fix app auth code block (#7138) * fix app auth code block * Update app-auth.md * Update app-auth.md * [ios][expo-constants] remove duplicate symbol kEXDeviceInstallUUIDKey to fix iOS client build * Updated linking.md (#7136) * Updated linking.md Updated description for WebBrowser to follow latest changes. * Tidy up docs Less `const fn = () => `, function keyword is usually better Co-authored-by: James Ide <ide@users.noreply.github.com> * [android][home] 🤖 Add DevMenu on Android (#6829) # Why Fixes #6521 # How - Created unversioned `DevMenuManager` class which mostly just delegates calls to versioned `DevMenuModule` modules specific for SDK version. These modules are responsible for providing initial props, dev menu options and actions to run when these options are selected. The manager creates a new `ReactRootView` that bases on kernel's (home's) React instance manager and starts `HomeMenu` app which is registered as a second entry point in `home` and then, manager adds this root view to the currently used activity (it must implement `ExperienceActivity`). As I needed to know which experience activity is the current one, I've added `sCurrentActivity` static member to that class and just track it using activity's lifecycle methods. - Backported `DevMenuModule` to all SDK versions included in the client. Including some changes between them - for example hot and fast reloading. - Added support for back button and Android's menu press (which can be simulated by `adb shell input keyevent 82`). - Removed some unused code related to `Nux` and replaced it with new onboarding screen (see #6793). - Created new `ShakeDetector` which works more like on iOS. The one provided by React Native is annoying in most cases as it actually requires two shakes. - Updated `ReactAndroidCodeTransformer` to turn off showing React Native dev menu in non-standalone apps. - **To do after merging:** Rebuild versioned expoviews. # Test Plan - [x] Test on experience in debug mode - [x] Test on experience in production mode - [x] Test on snacks - [x] Test on older SDKs - [x] Test on simulators - [x] Test that onboarding shows up once you open the experience for the first time or you didn't accept it yet (clicked `Got it` button). - [x] Test that using dev menu still works once we kill home's activity. * [home] 🏠 Publish new dev home * [auth-session] Extract AuthSession into unimodule (#6989) * [expo-auth-session] Extract * [expo-auth-session] Remove from the expo package * [expo-auth-session] Add bare support * [expo-auth-session] Refactor * [expo-auth-session] Fix CI * [expo-auth-session] Update CHANGELOG * [expo-auth-session] Apply requested changes * [expo-auth-session] Update README * [expo-auth-session] Update documentation * [expo-auth-session] apply requested changes * [auth-session] Fix CI * run yarn * [expo-screen-orientation] Update documentation (#6838) * [expo-screen-orientation] Update docs & add checks to lockPlatfomAsync on iOS * [expo-screen-orientation] Update installation instruction * [expo-screen-orientation] Fix quotations marks * [expo-screen-orientation] Update changelog * [expo-screen-orientation] Apply requested changes * [screen-orientation] Apply requested changes * [screen-orientation] Apply requested changes * [screen-orientation] Apply requested changes * [firebase-core] Add core functionality for supporting native Firebase packages (#7013) * [bare-expo] Fix database-url in GoogleService-Info.plist * [firebase-core] Add `expo-firebase-core` package * [firebase-core] Add tests to test-suite * [firebase-core] Add scoped firebase-core to Expo client to create native sandboxed firebase apps * [firebase-core] Update bare-expo BasePackageList * [firebase-core] Add firebase-core to bundledNativeModules.json * [firebase-core] Add SDK documentation * [firebase-core] Add firebase-core to Expo client iOS project file * [firebase-core] Add js build files * [firebase-core] Update SDK doc to refer to native firebase guide * [firebase-core] Add web-support & code cleanup * [docs] Fixes to firebase-core docs * [firebase-core] Update build files * [firebase-core] Fix test in test-suite * [fireabase-core] Cleanup COMPARISON.md * [firebase-core] Improve google-services.json parsing and client selection * [firebase-core] Updated SDK docs * [fireabse-core] Update readme description * [firebase-core] Removed outcommented line on Android * [firebase-core] Minor iOS code improvements after review * [firebase-core] Fixes after review to unit tests * [firebase-core] Updated iOS code after review feedback * [firebase-core] Fix tests * [firebase-core] Simplify JS code * [firebase-core] Update js build output * [fireabse-core] Add DEFAULT_WEB_APP_OPTIONS constant + doc improvements * [firebase-core] Update JS build files * [firebase-core] Fix unimodulePeerDependencies in package.json * [firebase-core] Android build.gradle fixes * [firebase-core] Android base64 encoding code improvement * [firebase-core] Prevent hard javascript import error when native lib not linked * [firebase-core] Update various Android methods to be protected i.s.o. public * [firebase-core] Android protected DEFAULT_APP_NAME and re-use in scoped * [firebase-core] Update changelog * [fireabse-core] Update JS build files * [firebase-android] Fix Firebase App cleanup when multiple projects are loaded on Android * [ios] Update pods * [firebase-analytics] Add native Firebase Analytics (#7017) * [firebase-core] Add tests to test-suite * [fireabse-analytics] Add expo-firebase-analytics package * [firebase-core] Add firebase-core to Expo client iOS project file * [firebase-analytics] Add tests to test-suite * [bare-expo] Update iOS app-icon assets * [firebase-analytics] Add expo-firebase-analytics to Expo client * [bare-expo] Add firebase-analytics to BasePackageList.java * [firebase-analytics] Add firebase-analytics to bundleNativeModules.json * [docs] Add firebase-analytics docs * [firebase-analytics] Update yarn.lock after adding `firebase` (js sdk) dependency * [firebase-analytics] Add js build output * [firebase-analytics] Update sdk docs * [firebase-analytics] Update SDK docs * [firebase-analytics] Remove firebase JS dep to check CI * [docs] Update SDK docs & readme for expo-firebase-analytics * [expo-analytics] Remove firebase peer-dependency * [firebase-analytics] Add web-support & code cleanup * [docs] Update firebase-analytics docs * [firebase-analytics] Update build files * [firebase-analytics] Fix outdated build files * [firebase-analytics] Fix lint warnings * [firebase-analytics] Fixed code-style errors & typos after review * [firebase-analytics] Moved `unimodulePeerDependencies` to regular peerDependencies in package.json * [firebase-analytics] Update js build output * [fireabse-analytics] Update changelog * [firebse-analytics] Update Android build.gradle * [ios] Update pods * [firebase-analytics] Add recording of `screen_view` event when calling `setCurrentScreen` On web, calling `setCurrentScreen` does not automatically record a screen_view event as it does on native. We therefore record the 'screen_view' event manually. https://stackoverflow.com/questions/59330467/how-to-track-page-view-with-firebase-analytics-in-a-web-single-page-app * [firebase-analytics] Update JS build files * [firebase-analytics] Remove @unimodules/core peerDependency from package.json * [docs] Add firebase web-config to app.json docs (#7086) * [firebase-analytics] Add pure JS analytics for use on Expo Client (#7093) * [firebase-analytics] WIP js analytics * [firebase-analytics] Add Pure JS FirebaseAnalytics (wip, 80% done) * [firebase-analytics] Add pure JS Firebase Analytics (done) * [firebase-analytics] Update & integrate Pure JS Analytics tracker * [docs] Add instruction on how to use firebase analytics on Expo Client * [firebase-analytics] Fixes after review feedback * [firebase-analytics] Update JS build files * [firebase-analytics] Update analytics-js to use DEFAULT_WEB_APP_OPTIONS * [firebase-analytics] Update JS build files * [firebase-analytics] Add recording of `screen_view` events on Expo client, when calling `setCurrentScreen` This mimics the behavior on Native, when calling setCurrentScreen also records a screen-view event. Note that this is different from the Firebase JS SDK, which does not record a screen-view event, and requires `logEvent` to be called manually. * [firebase-analytics] Update JS build files * [iOS][notifications] feature: customize notification preview placeholders (#7052) * [ios] add handling for previewPlaceholder * fix on android * update docs * feedback: mark api availability * resolve conflict * Update docs/pages/versions/unversioned/sdk/notifications.md Co-Authored-By: James Ide <ide@users.noreply.github.com> * fix typo * fix ci errors for expo package Co-authored-by: James Ide <ide@users.noreply.github.com> * [camera][iOS] Reject from takePictureAsync if camera is not ready (#7144) # Why Resolves #3020 Calling [camera#takePictureAsync](https://docs.expo.io/versions/latest/sdk/camera/#takepictureasync) should reject if [camera#onCameraReady](https://docs.expo.io/versions/latest/sdk/camera/#oncameraready) callback wasn't called before (native camera isn't ready yet), while now call is silently lost and promise is neither resolved nor rejected. # How Reject from `camera.takePictureAsync` if native camera is not ready yet. # Test Plan [snack](https://snack.expo.io/@bbarthec/github---camera---ios---takepictureasync) * [android][ncl] Update @react-native-community/masked-view to 0.1.6 * [android][ios][ncl] Update @react-native-community/viewpager to 3.3.0 * [android][ios][ncl][bare-expo] Update react-native-reanimated to 1.7.0 * [android][ios][ncl] Update react-native-svg to 11.0.1 * [android][ios][ncl] Updated react-native-webview to 8.1.1 * [expo] Update react-native-view-shot to 3.1.2 * [expotools] fix update-vendored-module for react-native-appearance * [android][ncl][home] Update react-native-appearance to 0.3.2 * [android][ios][ncl][bare-expo] Update react-native-safe-area-context to 0.7.3 * [ios] fix improperly namespaced import in RNSVGForeignObject * [bare-expo] reinstall pods * [android][location] Fixed NPE crash when mTask is made null mid-process. (#7147) * Remove ANY_HOSTNAME_VERIFIER from Android app-auth debug connection builder (#7152) * Change constant declaration to static ot aviod duplication of symbols. (#7161) * [image-picker] Prevent from reloading on OnePlus 7 (#7162) # Why Resolves #5804. # How Create the output file before open the camera intent. # Test Plan - NCL ✅ - #5804 (comment) ✅ * [test-suite] Fix test-suite error on start (#7163) # Why Dismissing error screen on every refresh can be daunting after some time (when running in `bare-expo`). # How - added `try`-`catch` around calls to missing Facebook Ads module - added `if (ExpoTaskManager)` around `eventEmitter.addListener`, since event name is fetched as a constant of the module which may be `undefined` - moved `require(testScreen)` which define tasks to _initialization phase_ - moved `require(cameraScreen)` to global scope since I feel `optionalRequire` only works in global scope (and well, it let me get rid of red screen) # Test Plan Running `bare-expo` does not show error screen. * [image-picker] Remove unused header import (#7168) # Why Resolves #7167. # How Remove unused import. # Test Plan - ios build ✅ * [docs] add permissions methods to api list (#7053) * add permissions methods to api list * add requestPermissionsAsync and getPermissionsAsync methods to TOC * Suggestion in sentry guide (#7157) * Suggestion in sentry guide * identical changes to v36.0.0 docs * [android][task-manager] Task manager for bare in Expo (#6828) Task manager for bare android and iOS applications. * [docs] fix app signing page (#7171) * [docs] fix app signing page * unversioned * typo * [android] remove SDK 33 code re-committed after 38ccf62 * [docs] Update ‘using-firebase’ guide with Analytics section (#7145) * [docs] Update ‘using-firebase’ guide with Analytics section * [docs] Add missing `expo-firebase-core` dep to ‘usinig-firebase’ doc * Update docs/pages/versions/unversioned/guides/using-firebase.md Co-Authored-By: Brent Vatne <brentvatne@gmail.com> * [jest-expo-enzyme] publish 1.0.0 * Update expo-module-scripts dependency (#7175) * [docs] Custom fonts guide update Work in progress * [docs] Updating guide to using custom fonts I made some updates to the guide for using custom fonts. Changes include: - Using Snacks for examples - Using the `useFonts` hook for a simpler example - Example of loading a remote font - Discussion of font formats * Update docs/pages/versions/unversioned/guides/using-custom-fonts.md Co-Authored-By: Brent Vatne <brentvatne@gmail.com> * Update docs/pages/versions/unversioned/guides/using-custom-fonts.md Co-Authored-By: Cedric van Putten <me@bycedric.com> * Update docs/pages/versions/unversioned/guides/using-custom-fonts.md Co-Authored-By: Brent Vatne <brentvatne@gmail.com> Co-authored-by: Tomasz Sapeta <1714764+tsapeta@users.noreply.github.com> Co-authored-by: Charlie Cruzan <35579283+cruzach@users.noreply.github.com> Co-authored-by: Evan Bacon <baconbrix@gmail.com> Co-authored-by: Eric Samelson <esamelson@users.noreply.github.com> Co-authored-by: Saumya Sharma <saumyasharma010@gmail.com> Co-authored-by: James Ide <ide@users.noreply.github.com> Co-authored-by: Łukasz Kosmaty <lukasz.kosmaty@student.uj.edu.pl> Co-authored-by: Dominik Sokal <dominiksokal@gmail.com> Co-authored-by: Hein Rutjes <IjzerenHein@users.noreply.github.com> Co-authored-by: Bartłomiej Bukowski <bartlomiejbukowski.b@gmail.com> Co-authored-by: briefjudofox <1484049+briefjudofox@users.noreply.github.com> Co-authored-by: Michał Czernek <czernekmichal@gmail.com> Co-authored-by: Stanisław Chmiela <sjchmiela@users.noreply.github.com> Co-authored-by: Ziv Levy <zivl@users.noreply.github.com> Co-authored-by: Nishant Singh <saysnishant@gmail.com> Co-authored-by: Brent Vatne <brentvatne@gmail.com> Co-authored-by: Cedric van Putten <me@bycedric.com>
I made some updates to the guide for using custom fonts. Changes include: - Using Snacks for examples - Using the `useFonts` hook for a simpler example - Example of loading a remote font - Discussion of font formats Squashed commits below * [android] 🤏 Update react-native-gesture-handler to 1.6.0 (#7121) # Why Part of #7006 # How - Used `et update-vendored-module` to update `react-native-gesture-handler`. - Updated versions in some apps. - Tried to run it on Android... and it turned out there is a new `RNGHModalUtils` file scoped under `com.facebook.react` package so I've copied this file manually to appropriate directory in `expoview`. - Added a warning saying that `com.facebook.react` needs to be manually updated, we already do the same in `react-native-reanimated`. - Added changelog entry. # Test Plan Tested examples in `native-component-list`. * [constants] make installationId available in bare (#6906) * [constants] make available in bare * make filename constant * remove installationId from scoped android module * remove installationId from scoped ios * fix ios_test_suite * fix app auth code block (#7138) * fix app auth code block * Update app-auth.md * Update app-auth.md * [ios][expo-constants] remove duplicate symbol kEXDeviceInstallUUIDKey to fix iOS client build * Updated linking.md (#7136) * Updated linking.md Updated description for WebBrowser to follow latest changes. * Tidy up docs Less `const fn = () => `, function keyword is usually better Co-authored-by: James Ide <ide@users.noreply.github.com> * [android][home] 🤖 Add DevMenu on Android (#6829) # Why Fixes #6521 # How - Created unversioned `DevMenuManager` class which mostly just delegates calls to versioned `DevMenuModule` modules specific for SDK version. These modules are responsible for providing initial props, dev menu options and actions to run when these options are selected. The manager creates a new `ReactRootView` that bases on kernel's (home's) React instance manager and starts `HomeMenu` app which is registered as a second entry point in `home` and then, manager adds this root view to the currently used activity (it must implement `ExperienceActivity`). As I needed to know which experience activity is the current one, I've added `sCurrentActivity` static member to that class and just track it using activity's lifecycle methods. - Backported `DevMenuModule` to all SDK versions included in the client. Including some changes between them - for example hot and fast reloading. - Added support for back button and Android's menu press (which can be simulated by `adb shell input keyevent 82`). - Removed some unused code related to `Nux` and replaced it with new onboarding screen (see #6793). - Created new `ShakeDetector` which works more like on iOS. The one provided by React Native is annoying in most cases as it actually requires two shakes. - Updated `ReactAndroidCodeTransformer` to turn off showing React Native dev menu in non-standalone apps. - **To do after merging:** Rebuild versioned expoviews. # Test Plan - [x] Test on experience in debug mode - [x] Test on experience in production mode - [x] Test on snacks - [x] Test on older SDKs - [x] Test on simulators - [x] Test that onboarding shows up once you open the experience for the first time or you didn't accept it yet (clicked `Got it` button). - [x] Test that using dev menu still works once we kill home's activity. * [home] 🏠 Publish new dev home * [auth-session] Extract AuthSession into unimodule (#6989) * [expo-auth-session] Extract * [expo-auth-session] Remove from the expo package * [expo-auth-session] Add bare support * [expo-auth-session] Refactor * [expo-auth-session] Fix CI * [expo-auth-session] Update CHANGELOG * [expo-auth-session] Apply requested changes * [expo-auth-session] Update README * [expo-auth-session] Update documentation * [expo-auth-session] apply requested changes * [auth-session] Fix CI * run yarn * [expo-screen-orientation] Update documentation (#6838) * [expo-screen-orientation] Update docs & add checks to lockPlatfomAsync on iOS * [expo-screen-orientation] Update installation instruction * [expo-screen-orientation] Fix quotations marks * [expo-screen-orientation] Update changelog * [expo-screen-orientation] Apply requested changes * [screen-orientation] Apply requested changes * [screen-orientation] Apply requested changes * [screen-orientation] Apply requested changes * [firebase-core] Add core functionality for supporting native Firebase packages (#7013) * [bare-expo] Fix database-url in GoogleService-Info.plist * [firebase-core] Add `expo-firebase-core` package * [firebase-core] Add tests to test-suite * [firebase-core] Add scoped firebase-core to Expo client to create native sandboxed firebase apps * [firebase-core] Update bare-expo BasePackageList * [firebase-core] Add firebase-core to bundledNativeModules.json * [firebase-core] Add SDK documentation * [firebase-core] Add firebase-core to Expo client iOS project file * [firebase-core] Add js build files * [firebase-core] Update SDK doc to refer to native firebase guide * [firebase-core] Add web-support & code cleanup * [docs] Fixes to firebase-core docs * [firebase-core] Update build files * [firebase-core] Fix test in test-suite * [fireabase-core] Cleanup COMPARISON.md * [firebase-core] Improve google-services.json parsing and client selection * [firebase-core] Updated SDK docs * [fireabse-core] Update readme description * [firebase-core] Removed outcommented line on Android * [firebase-core] Minor iOS code improvements after review * [firebase-core] Fixes after review to unit tests * [firebase-core] Updated iOS code after review feedback * [firebase-core] Fix tests * [firebase-core] Simplify JS code * [firebase-core] Update js build output * [fireabse-core] Add DEFAULT_WEB_APP_OPTIONS constant + doc improvements * [firebase-core] Update JS build files * [firebase-core] Fix unimodulePeerDependencies in package.json * [firebase-core] Android build.gradle fixes * [firebase-core] Android base64 encoding code improvement * [firebase-core] Prevent hard javascript import error when native lib not linked * [firebase-core] Update various Android methods to be protected i.s.o. public * [firebase-core] Android protected DEFAULT_APP_NAME and re-use in scoped * [firebase-core] Update changelog * [fireabse-core] Update JS build files * [firebase-android] Fix Firebase App cleanup when multiple projects are loaded on Android * [ios] Update pods * [firebase-analytics] Add native Firebase Analytics (#7017) * [firebase-core] Add tests to test-suite * [fireabse-analytics] Add expo-firebase-analytics package * [firebase-core] Add firebase-core to Expo client iOS project file * [firebase-analytics] Add tests to test-suite * [bare-expo] Update iOS app-icon assets * [firebase-analytics] Add expo-firebase-analytics to Expo client * [bare-expo] Add firebase-analytics to BasePackageList.java * [firebase-analytics] Add firebase-analytics to bundleNativeModules.json * [docs] Add firebase-analytics docs * [firebase-analytics] Update yarn.lock after adding `firebase` (js sdk) dependency * [firebase-analytics] Add js build output * [firebase-analytics] Update sdk docs * [firebase-analytics] Update SDK docs * [firebase-analytics] Remove firebase JS dep to check CI * [docs] Update SDK docs & readme for expo-firebase-analytics * [expo-analytics] Remove firebase peer-dependency * [firebase-analytics] Add web-support & code cleanup * [docs] Update firebase-analytics docs * [firebase-analytics] Update build files * [firebase-analytics] Fix outdated build files * [firebase-analytics] Fix lint warnings * [firebase-analytics] Fixed code-style errors & typos after review * [firebase-analytics] Moved `unimodulePeerDependencies` to regular peerDependencies in package.json * [firebase-analytics] Update js build output * [fireabse-analytics] Update changelog * [firebse-analytics] Update Android build.gradle * [ios] Update pods * [firebase-analytics] Add recording of `screen_view` event when calling `setCurrentScreen` On web, calling `setCurrentScreen` does not automatically record a screen_view event as it does on native. We therefore record the 'screen_view' event manually. https://stackoverflow.com/questions/59330467/how-to-track-page-view-with-firebase-analytics-in-a-web-single-page-app * [firebase-analytics] Update JS build files * [firebase-analytics] Remove @unimodules/core peerDependency from package.json * [docs] Add firebase web-config to app.json docs (#7086) * [firebase-analytics] Add pure JS analytics for use on Expo Client (#7093) * [firebase-analytics] WIP js analytics * [firebase-analytics] Add Pure JS FirebaseAnalytics (wip, 80% done) * [firebase-analytics] Add pure JS Firebase Analytics (done) * [firebase-analytics] Update & integrate Pure JS Analytics tracker * [docs] Add instruction on how to use firebase analytics on Expo Client * [firebase-analytics] Fixes after review feedback * [firebase-analytics] Update JS build files * [firebase-analytics] Update analytics-js to use DEFAULT_WEB_APP_OPTIONS * [firebase-analytics] Update JS build files * [firebase-analytics] Add recording of `screen_view` events on Expo client, when calling `setCurrentScreen` This mimics the behavior on Native, when calling setCurrentScreen also records a screen-view event. Note that this is different from the Firebase JS SDK, which does not record a screen-view event, and requires `logEvent` to be called manually. * [firebase-analytics] Update JS build files * [iOS][notifications] feature: customize notification preview placeholders (#7052) * [ios] add handling for previewPlaceholder * fix on android * update docs * feedback: mark api availability * resolve conflict * Update docs/pages/versions/unversioned/sdk/notifications.md Co-Authored-By: James Ide <ide@users.noreply.github.com> * fix typo * fix ci errors for expo package Co-authored-by: James Ide <ide@users.noreply.github.com> * [camera][iOS] Reject from takePictureAsync if camera is not ready (#7144) # Why Resolves #3020 Calling [camera#takePictureAsync](https://docs.expo.io/versions/latest/sdk/camera/#takepictureasync) should reject if [camera#onCameraReady](https://docs.expo.io/versions/latest/sdk/camera/#oncameraready) callback wasn't called before (native camera isn't ready yet), while now call is silently lost and promise is neither resolved nor rejected. # How Reject from `camera.takePictureAsync` if native camera is not ready yet. # Test Plan [snack](https://snack.expo.io/@bbarthec/github---camera---ios---takepictureasync) * [android][ncl] Update @react-native-community/masked-view to 0.1.6 * [android][ios][ncl] Update @react-native-community/viewpager to 3.3.0 * [android][ios][ncl][bare-expo] Update react-native-reanimated to 1.7.0 * [android][ios][ncl] Update react-native-svg to 11.0.1 * [android][ios][ncl] Updated react-native-webview to 8.1.1 * [expo] Update react-native-view-shot to 3.1.2 * [expotools] fix update-vendored-module for react-native-appearance * [android][ncl][home] Update react-native-appearance to 0.3.2 * [android][ios][ncl][bare-expo] Update react-native-safe-area-context to 0.7.3 * [ios] fix improperly namespaced import in RNSVGForeignObject * [bare-expo] reinstall pods * [android][location] Fixed NPE crash when mTask is made null mid-process. (#7147) * Remove ANY_HOSTNAME_VERIFIER from Android app-auth debug connection builder (#7152) * Change constant declaration to static ot aviod duplication of symbols. (#7161) * [image-picker] Prevent from reloading on OnePlus 7 (#7162) # Why Resolves #5804. # How Create the output file before open the camera intent. # Test Plan - NCL ✅ - #5804 (comment) ✅ * [test-suite] Fix test-suite error on start (#7163) # Why Dismissing error screen on every refresh can be daunting after some time (when running in `bare-expo`). # How - added `try`-`catch` around calls to missing Facebook Ads module - added `if (ExpoTaskManager)` around `eventEmitter.addListener`, since event name is fetched as a constant of the module which may be `undefined` - moved `require(testScreen)` which define tasks to _initialization phase_ - moved `require(cameraScreen)` to global scope since I feel `optionalRequire` only works in global scope (and well, it let me get rid of red screen) # Test Plan Running `bare-expo` does not show error screen. * [image-picker] Remove unused header import (#7168) # Why Resolves #7167. # How Remove unused import. # Test Plan - ios build ✅ * [docs] add permissions methods to api list (#7053) * add permissions methods to api list * add requestPermissionsAsync and getPermissionsAsync methods to TOC * Suggestion in sentry guide (#7157) * Suggestion in sentry guide * identical changes to v36.0.0 docs * [android][task-manager] Task manager for bare in Expo (#6828) Task manager for bare android and iOS applications. * [docs] fix app signing page (#7171) * [docs] fix app signing page * unversioned * typo * [android] remove SDK 33 code re-committed after 38ccf62 * [docs] Update ‘using-firebase’ guide with Analytics section (#7145) * [docs] Update ‘using-firebase’ guide with Analytics section * [docs] Add missing `expo-firebase-core` dep to ‘usinig-firebase’ doc * Update docs/pages/versions/unversioned/guides/using-firebase.md Co-Authored-By: Brent Vatne <brentvatne@gmail.com> * [jest-expo-enzyme] publish 1.0.0 * Update expo-module-scripts dependency (#7175) * [docs] Custom fonts guide update Work in progress * [docs] Updating guide to using custom fonts I made some updates to the guide for using custom fonts. Changes include: - Using Snacks for examples - Using the `useFonts` hook for a simpler example - Example of loading a remote font - Discussion of font formats * Update docs/pages/versions/unversioned/guides/using-custom-fonts.md Co-Authored-By: Brent Vatne <brentvatne@gmail.com> * Update docs/pages/versions/unversioned/guides/using-custom-fonts.md Co-Authored-By: Cedric van Putten <me@bycedric.com> * Update docs/pages/versions/unversioned/guides/using-custom-fonts.md Co-Authored-By: Brent Vatne <brentvatne@gmail.com> Co-authored-by: Tomasz Sapeta <1714764+tsapeta@users.noreply.github.com> Co-authored-by: Charlie Cruzan <35579283+cruzach@users.noreply.github.com> Co-authored-by: Evan Bacon <baconbrix@gmail.com> Co-authored-by: Eric Samelson <esamelson@users.noreply.github.com> Co-authored-by: Saumya Sharma <saumyasharma010@gmail.com> Co-authored-by: James Ide <ide@users.noreply.github.com> Co-authored-by: Łukasz Kosmaty <lukasz.kosmaty@student.uj.edu.pl> Co-authored-by: Dominik Sokal <dominiksokal@gmail.com> Co-authored-by: Hein Rutjes <IjzerenHein@users.noreply.github.com> Co-authored-by: Bartłomiej Bukowski <bartlomiejbukowski.b@gmail.com> Co-authored-by: briefjudofox <1484049+briefjudofox@users.noreply.github.com> Co-authored-by: Michał Czernek <czernekmichal@gmail.com> Co-authored-by: Stanisław Chmiela <sjchmiela@users.noreply.github.com> Co-authored-by: Ziv Levy <zivl@users.noreply.github.com> Co-authored-by: Nishant Singh <saysnishant@gmail.com> Co-authored-by: Brent Vatne <brentvatne@gmail.com> Co-authored-by: Cedric van Putten <me@bycedric.com>
Why
This PR adds the
expo-firebase-core
package which provides generic functionality for using Native Firebase SDK packages in the Expo client (and custom clients, stand-alone & bare).It houses the following functionality:
googleServicesFile
config from the app.json of the loaded project).Test Plan
Testing in Expo client
The tests in the test-suite are conditional and will run different checks whether a
googleServicesFile
is found in app.json or not. By default the test-suite does not (yet, this requiresapp.config.js
support) have agoogleServicesFile
config for iOS or Android. To run the the other tests, addgoogleServicesFile
configs toapp.json
of test-suite.After adding the
gooogleServicesConfig
, the Tests will now report that a sandboxed app was created.