Can we use Realm in React Native project with Expo? - react-native

I am making a Mobile app in React Native with Expo.
Now I am thinking that I will use Realm to manage state in my project.
However, I am not sure that I can use Realm on Expo or not.
Expo is quite useful to create React Native Mobile Apps easily and quickly, but sometimes there are some conflict with some modules and libraries.
So, could you teach me that Realm can work on Expo or not?
Thank you,

Update 24 Jan 2022
The feature request was marked as Complete today.
I can confirm that Realm works with custom dev clients.
Here is an expo/example you can use to get started today --courtesy of the Realm team.
We won't be adding Realm to the Expo Go app (that you download from the App Store or Google Play Store) since we are limiting the amount of native third-party services that we include by default.
Update 2 July 2021
The feature request has been marked it as In Progress by the Expo team.
https://expo.canny.io/feature-requests/p/realm
It should be included as part of a custom development client, you can read more about custom development clients here https://blog.expo.dev/introducing-custom-development-clients-5a2c79a9ddf8
Previous answer
From the realm docs
Expo does not support Realm
Unfortunately, Expo does not support Realm. If you use the Expo CLI or create-react-native-app to create your React Native project, you will need to "eject" your Expo project to use Realm. The installation steps on this page do not use the Expo CLI.
https://docs.mongodb.com/realm/sdk/react-native/install/
It has been a feature request for expo since 2017 https://expo.canny.io/feature-requests/p/support-for-realm

Finally, Expo now works with realm.
Expo Announcement
Guide

not yet
you can check for support state from here:
https://expo.canny.io/feature-requests/p/support-for-realm

Yes, Expo now has a way of doing this using Custom Dev clients. Here is an example app from the Realm team.
https://github.com/expo/examples/tree/master/with-realm
You can also see this request is marked as complete on the Expo feature request site.
https://expo.canny.io/feature-requests/p/realm

Related

How to configure react native app for SKAdNetwork FB/IG ads?

It is my first time deplying FB/IG ads to increase app installs. As part of the process, the Ads Manager, however, is prompting me to "Update the Facebook SDK for iOS" which I assume to mean integrate it into my react native app. Given that FB dropped support for react-native-fbsdk back in 2021, I'm wondering how I should be configuring my react native app in this case? — there doesn't seem to be much documentation online for whatever reason ...
Would appreciate any help and guidance from folks who have deployed FB/IG ads for app installs with a react native app!

Expo Push Notification

I am using Expo Push Notification. I proceeded according to the instructions on the Expo site expo-push-notifications, but I realized that in order to receive the Expo Push Token, we must have an Expo account, and before running the project, we must log in to our account using the Expo Login command and then run the project.My question is, when the build project is taken out and put into production mode, do these services still work properly or do we have to apply certain settings and the Expo site tips are only for the development phase? I am a beginner in developing React Native programs and I have no special experience in this field. Please share your experiences with Expo Push Notification with me. Thanks.
When you build your app on Expo servers for example by expo build:ios command, it is handled by Expo services, but if you decided to build your app through, for example, Github Actions, you have to deliver APN keys to Expo by your own through expo credentials:manager. On your Expo account are stored credential files to use by Expo PUSH Broadcaster, so this connection between the app and your account is required.
Here you can find more details about signing your applications:
https://docs.expo.io/distribution/app-signing/#push-notification-keys

How to measure react native (Expo) app startup time?

I have an Expo hybrid app (Managed workflow), running on Expo SDK v37 (React Native v0.61).
I'm struggling to find the best way to measure the time it takes from the moment when the user starts the app until the splash screen disappears.
How would you approach this?
PS: I would use Firebase Performance Monitoring instead, if it was available for Expo Managed apps. But it isn't yet.
Basically I see two approaches:
For pure react-native projects you can use react-native-startup-time library.
However I'm not sure, whether you can just add this library and start to use it, since it's required linking.
But in any case you can eject your project and add this library.
If you don't want to eject expo project I can suggest you to update your project to SDK 38. It has support for RN 0.62.2 and flipper integration as well. So you can setup flipper-plugin-react-native-performance and check the performance.
I hope I helped a bit.

Expo AuthSession alternative

After eject expo, AuthSession doesn't work (because is not supported in bare workflow yet). Which is the alternative of this library for a pure react-native application?
If you have made Expo a stand-alone app, you should set it up further.
Usage in standalone apps
In order to be able to deep link back into your app, you will need to set a scheme in your project app.json, and then build your standalone app (it can't be updated with an OTA update). If you do not include a scheme, the authentication flow will complete but it will be unable to pass the information back into your application and the user will have to manually exit the authentication modal.

React Native: How do you find PRODUCT_BUNDLE_IDENTIFIER using expo?

I am trying to implement Auth0 on my react native app and right off the bat you need to identify your PRODUCT_BUNDLE_IDENTIFIER for the callback the server uses through this template URL.
{PRODUCT_BUNDLE_IDENTIFIER}://{app_name}/ios/{PRODUCT_BUNDLE_IDENTIFIER}/callback
But since I'm using an Expo project I don't have the ios or android project folders. Am I missing something here or is it just impossible to configure an Auth0 with Expo created project?
The Auth0 React Native package uses native code; therefore, it's not compatible with Expo.
It looks like you may be able to work around this by using the web version instead, though. Expo has a repo (possibly out of date) which demonstrates this.