我已经在Mac上开发了React本机应用程序,这是我的第一个应用程序。我想将其部署到iPhone,以便可以对其进行测试。我还不想放到应用商店上。我不确定如何编译该应用程序并准备将其安装到iPhone上。我尝试过这个网站 https://www.diawi.com/,但不确定我需要上传哪个.ipa或a.pk文件。我也可以尝试使用expo,但不确定如何使用它。谁能给我逐步说明如何在iPhone上上传此应用程序。
任何帮助将不胜感激。
答案 0 :(得分:2)
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 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