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.
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.
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 use expo, then we build the iOS app for you on our machines. You can test the app on your local Android device.
You need a macOS machine to build your application. On Expo, they have macOS machines that build your app. But now you can also build non-expo applications, by remotely accessing a macOS build machine as part of Codemagic's product. Currently, you can get 500 build minutes for free per month.
- Generate .ipa file by running expo build:ios
- Download .ipa file from your expo account projects.
- Upload downloaded .ipa file to Diawi.
- Send the link to testers e.i. yourself
Note
The client device or tester device UUID should be added in trusted device or device list on Apple appstore only then they will able to install the application.
There is a brand new tool provided by Expo: Orbit
With Orbit you can drag and drop any .ipa or .apk to your device or to any simulator.
Beware, for iOS device, its UDID should be referenced within the provisioning profile (but that sould be the case if you build your .ipa with Expo and follow their instructions).