Expo client on ios is not working to the QR code - react-native

I have tried a lot to build a mobile app using expo with react native. Although I want to run the app using npm start command it outputs the QR code. But when I scan it using my expo client app on iphone. My app is not rendering.

I recommend to create an expo account and login in your terminal
expo login
Then login in your app and your project will appear, no need to scan qr code each time and your builds will be accessible everytime.

Run following in your terminal:
expo-cli start --tunnel
Your project will appear in Expo App.
Both devices must be connected to the same Wi-Fi though.

there is a workaround for the QR way of getting things done. Below worked for me.
Run the Expo server on an EC2 (or any VM). On AWS i used T2Micro
Expose the port 19000
go to www.the-qrcode-generator.com get QR code for the url: exp://<public ip of the ec2/ VM>:19000 . Send the QR code to people.
This QR code can be scanned by iPhone Camera app which will open Expo app. On Android the Expo QR scanner can scan and download

Related

React Native App Crashing when opening React Native Developer Tools

I have Custom Development Client App build with EAS and it is always crashing when I try to open React Native Debbuger without any log.
Steps to reproduce:
eas build --profile development --platform android
Start Emulator and download build from link produced in step 1. Open the App.
expo start --dev-client
Press a │ open Android
Press m │ toggle menu
Press "Debug Remote JS" on device/emulator
React Native Debugger opens in th browser but app is crashing and does it everytime I try to open it again.
Same thing happens on the physical device.
React Native application might be using a library that uses JSI, e.g React Native Reanimated 2 (https://docs.swmansion.com/react-native-reanimated/docs/#known-problems-and-limitations) or React Native MMKV (https://github.com/mrousavy/react-native-mmkv#limitations).
With these libraries, remote debugging won't execute properly. I'd start on checking of known limitations on your project's 3rd party libs.
I noticed that connecting expo-dev-client via localhost automatically crashes the app.
Try to use LAN network and make sure that your device and computer are on the same network.

difference between standalone Expo app and expo go

I want to implement google sign in expo app.
But while reading doc, it says expo-google-sign-in cannot be used in Expo Go. but it only works for standalone Expo apps
https://docs.expo.dev/versions/latest/sdk/google-sign-in/#usage-with-firebase
I don't understand what this means.
I have created expo app using expo init command.
Is this standalone app or Expo go?
Please let me clear about this.
Wild guess here :
Expo Go is an app where you can test your app in it (when you scan the QR Code after expo start, your app is launched inside Expo Go app).
Standalone Expo app is your application when you upload it on the store.
I had the same issue for notifications : inside Expo Go app, notifications didn't work for my app but when I uploaded my app on the AppStore, notifications worked fine.

React Native application deployment

I have already developed a React native application on my mac book, this is myfirst application. I want to deploy it to iPhone so that I can test it. I don't want to put it on appstore yet. I am not sure how to compile the application and get it ready to put it on iPhone. I tried this web site
https://www.diawi.com/, but not sure which .ipa or a.pk file, I need to upload. I can also try using expo, but not sure how to use it. Can anyone give me step by step instruction on how to upload this application on iPhone.
any help will be greatly appreciated.
For iPhone
For react-native-init you will probably need Apple developer account to test your app on your phone
Since you are using react-native-init, You should checkout this article by Facebook
https://facebook.github.io/react-native/docs/running-on-device
In the second point, it says Register for an Apple developer account if you don't have one yet
For create-react-native-app you need to do following
Download expo client from App store
Scan the QR code expo generate when you run your app using terminal (npm run start in terminal )
Note: Both Laptop and your phone should be on the same network
According to this thread, You can't use expo with react-native-init but alternatively you can create an expo project using create-react-native-app and then copy, paste files from your init project
For Android
For running your App on Android, You can directly generate/build an apk, send it to your device and just open it to see how it works (In Android you don't need a console or developer account to run your app)
Again, Open this link https://facebook.github.io/react-native/docs/running-on-device
And click on Android Tab to see how you can generate an Apk

Can I not use Expo (cloud service) at all using React Native

I have build an app using react native(detached) but the thing is I would want to completely get rid of Expo. The reason is, what if one day EXPO service get shut down or no more supported.
So in this case I would not want the app to be affected.
Currently I need to publish my app thru ExpoKit to see the latest changes, how would I build my android app so it would not have any reference to Expo but still be able to work properly
Currently this is how I understand how the react native and expo works: first u build ur app using react native code and then a bundle.js is generated somewhere on cloud(EXPO) using publish command so the app communicate with that bundle.js.
Note I am not using any feature from Expo so why would I need Expo in this case?
Edited: If I am detaching my app from expo, I mean why would I still need Expo? Can't I just build the app and run the app without expo at all?
You can build your whole application without using expo, just follow the steps from facebook documentation in "Building Projects with Native Code" tab.
or
you can run "npm run eject" in your project root directory folder.
After this, you can build your appliaction using react-native cli commands, like
react-native run-android.
edited :--
For building apk for production, you can follow steps given in facebook documentation as generating signed apk and for released IPA for iOS yo can follow building your app for production for IOS.

Can I use any other app instead of Expo to run react native app?

Can I use any other app instead of Expo to run react native app?
Expo is not compatible with my phone.
Yes, you can use the way suggested in the react-native docs under using a real device. You'll need adb installed, then just enable USB debugging on your phone and plug it in. Run react-native run-android in the command line to send your program to your phone.
Note that these steps may differ depending on how far you've followed to the directions for either expo or react-native.