Reputation: 3150
I am using Expo to run my application. I am able to see two options in Expo XDE:
I want to run my app by directly connecting to my device. Is it possible with Expo?
Upvotes: 37
Views: 70416
Reputation: 3050
If you are looking to run a native build without using Expo Go
on a physical iOS device (not a simulator), you can plug in your device to your computer by cable and use the following code:
npx expo run:ios --device
This is useful in cases when you need to test notifications, native code, etc.
Alternatively, if you're using yarn
, try:
yarn expo run:ios --device
Upvotes: 39
Reputation: 54212
As the Expo Client App is updated due to new Apple's approval requirements, please follow the steps below to launch the App in a real iOS device:
Hope it helps.
Upvotes: 14
Reputation: 6103
Yes, it is possible, and quite easy to get it running.
Step 1: Open Expo XDE, and click on the gray cog to change host mode to LAN. Make sure you enabled Development Mode. You'll see an URL right in front of you. Wait until packager to start running.
Step 2: Open Expo App in your mobile device, and click on the second tab 'Explore' and enter the URL that starts with exp://192.168...
This is a local connection to your computer. You will see your app running in a minute.
Make sure your phone and computer are on the same WiFi!
For further information, you may refer to official documents here.
Upvotes: 23