Ok, looks like I figured out how to do this, so following steps are needed:
npx expo prebuildopen ios/YourProject.xcworkspace- Go to project settings "Signing & Capabilities" and select your team
- Go to project settings "Signing & Capabilities" and remove "Push Notifications"
- Click on top bar your project name, select "Edit Scheme", select "Build Configuration" - Release
- Build bundle with
npx expo export:embed --entry-file='node_modules/expo/AppEntry.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios' - In Xcode in Build phases -> Bundle React Native code and images -> Check off "For install builds only" if it's checked
- Go to Xcode, select your connected device and run the project
I did many iterations, but this looks like fixed the problem for me.
Now I can test my app on my iPhone in release mode without need to connect to dev server.
I see still that `npx eact-native run-ios --mode Release --terminal terminal`` not working for some reason, fails to build.
ios - How to build expo app with Xcode, without metro - Stack Overflow
How to build ios app with expo(not for appstore)
xcode - npx expo run:ios build failed - Stack Overflow
Is there really no simple way to build and run an Expo app locally via Xcode?
Videos
With the current Expo SDK 50, using npx expo prebuild is the right starting point. After you did this, you need to build your project without relying on the metro server. This means, you have to build a standalone .ipa file for ios. You can do all of the following in Xcode by opening your ios/*.xcworkspace file.
- Change the Build Configuration: In Xcode -> Product -> Scheme -> Edit Scheme -> choose "Debug" -> Close
- Build the app: Product -> Build
- Archive your app: if there are no building errors -> Product -> Archive
- Export archived app: Window -> Organiser (this should open up automatically after step 3) -> select the archived build -> Distribute App -> Debug -> Perform signing procedure -> Select destination for .ipa file
- Install app on connected device: Connect device to your Mac -> Window -> Devices and Simulators -> Under "Installed Apps", click on "+" -> Select .ipa file
If you want to run your Expo app on your physical device without using the Expo Go app and an Expo server, you would need to create a standalone app binary (an IPA file for iOS).
This process involves "ejecting" from the managed Expo workflow to gain more control over the build process. Here's the general process:
Run expo eject in your project directory. This will create native iOS and Android project directories and configuration files.
For iOS, you'll now have an ios folder in your project directory. You can open this in Xcode by navigating to the directory and opening the .xcworkspace file.
From Xcode, you can run your app on a connected device by selecting the device from the target device list and clicking the "play" button.
Please note: In order to install the app on a physical device, you'll still need an Apple Developer account, even if it's just the free version. You'll have to sign your app with a development certificate. The app will also only run as long as the development certificate is valid, which is typically 7 days for a free Apple Developer account. After this period, you'll need to re-sign and re-install the app.
If you're looking for a way to run your app on your physical device indefinitely without an Apple Developer account, unfortunately, this is not possible due to Apple's policies.
Hey guys, I am building an expense tracker app for myself with expo sdk50. Now is it possible to use the app without submitting the app to app store or for testflight. I do have apple developer account.
I'm trying to follow what I thought would be a straightforward local workflow:
Start the Expo dev server with
expo startDevelop the app on the iOS simulator
Once ready, open the Xcode project, build, and run it on the simulator
Unfortunately, step 3 fails because the app expects the Expo dev server (Metro) to be running to fetch the JS bundle. This seems like a hard requirement.
I suppose you could manually tweak the Xcode project to load the bundle as a local resource, but that feels counterintuitive and messy.
Also, eas build --local still requires both Expo build tools and an Apple developer account, so it's not a pure local solution either.
Am I missing something obvious here, or is this just how it works with Expo right now? Any tips or clarification would be appreciated — thanks!
EDIT:
When I say step 3 fails, I meant that is running the expo dashboard which requires the dev server to run. I just want to run it without the server i.e. as the production build.
hello, I'm new to expo and react native, I made an app and I want to test it on an actual iPhone device, can someone tell me the steps?
I heard using 'eas build' is the way, but it require a paid account and I don't want to pay before I'm sure it works. :)
I have nearly finished making an app for tracking my nutrition – basically a better version of MyFitnessPal custom made to my own needs. I never intend on distributing it. I want a local build, with its own dedicated app icon on my home screen, not the tedium of opening Expo Go and tapping through to my build.
Is there a way to accomplish this without having to go through App Review? I'm afraid it will fail review because it's a blatant copycat, even though I only made it for personal use.
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
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.
I'm really confused on the following topics,
1.expo-dev-client (why not expo go?)
2.npx expo prebuild
3.npx expo run:ios/android
I'm coming from react-native-cli background and I really feel overwhelming after finding documentations and videos for the above topics. I didn't understand what the documentation says too. Can somebody tell me the purpose of the above topics. I know what npx expo prebuild does. but I'm not sure whether other things do or doing the same thing as prebuild does. And why I saw some people have commented better using expo-dev-client than expo go. Can somebody briefly explain. Thanks. I really appreciate