Photo by William Hook on Unsplash
How to install React native app in one iPhone without an Apple Developer Account
#React native, #IOS, #Expo
Problem
When creating one app, we want to install the application on our physical device such as an iPhone or iPad to test it on a real device, however, without an Apple Developer Account, the test flight service can't be used therefore we can't test it.
It will work for simple applications, if your app is using notifications, you may need an Apple Developer account
Solution
There is one option the build the app using XCode and install it on the iOs device
Steps
Have a react-native app created, perhaps using Expo
Connect the iOs device to the laptop using a cable
build the app using the command
expo run:ios
. It will create the ios folderOpen the
project_name.xcworkspace
using XCode e.gtrackwallet.xcworkspace
Once the project is opened using XCode, Click on
Product
>Archive
it will start building the project
Once finished, it will display one window with the built file
Right-click on the built file, and click on Show in the finder, it will display one folder with the .xcarchive file as below
Right-click and select the option
Show package content
as belowIt will display one folder as below
Rename the folder Application to
Payload
so, it will look like as belowCompress the
Payload
folderReplace the name of the compressed file from
Payload.zip
toPayload.ipa
as belowThe next step is to install the app on the device, go to
XCode
>Window
>Devices and Simulators
and drag thePayload.ipa
file to the Installed app zone or you can click in + icon and import thePayload.ipa
Once done the prev step, it will display the top banner which says the it is preparing the install the app
Once it is completed, you can see the app on the installed app list as below
Now, you can see the app installed on your phone, when opening the app on the phone, you may see one alert as below
To fix it, you must go to
Settings
>General
>VPN & Device Management
, click in the Developer App option , and click onTrust Apple Development
Once done with the previous step, you can open the app on your iOS device.
Happy Coding ๐๐๐