如何构建React Native iOS应用,获取.app文件并部署到设备上? [英] How to build React Native iOS app, get an .app file and deploy to device?

查看:54
本文介绍了如何构建React Native iOS应用,获取.app文件并部署到设备上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在查看以下信息: https://facebook.github.io/react-native/docs/running-on-device-ios.html#content

I'm going by this information: https://facebook.github.io/react-native/docs/running-on-device-ios.html#content

我执行了react-native bundle命令,更改了AppDelegate.m,并且我可以成功构建.尽管我不确定最终构建的位置. .app文件放在哪里?当我要将.app文件复制到手机上时,应该通过iTunes进行同步,还是有一种更快的方法?

I did the react-native bundle command, changed AppDelegate.m, and I can build with success. Though I'm not sure where it's putting the final build. Where is it putting the .app file, and when I want to copy that .app file to my phone, should I sync it via iTunes, or is there a quicker way?

基本上,我只是在尝试创建和部署不需要React打包器服务器的独立应用程序.

Basically I'm just trying to create and deploy a standalone app that doesn't need the React packager server.

推荐答案

我不知道是否可以通过iTunes将内置的应用程序侧面加载到手机中,但是如果可能的话,实现它的步骤将是就像您以相同的方式部署常规iOS应用一样.

I don't know if it is possible to sideload a built app into a phone via iTunes - but if it is possible, the steps to to achieve it would be the same as if you were to deploy a regular iOS app in the same way.

通常,您将通过常规应用商店提交过程,使用TestFlight将独立应用部署到设备上:

Typically you would deploy a standalone app to a device using TestFlight, via the regular app store submission process:

  1. 登录到 Apple Developer Member Center ,并将Apple ID绑定到您的开发人员帐户(或注册)一个新的开发者帐户)
  2. 为Ad-Hoc部署和App Store部署生成配置文件
  3. 通过在OSX finder中双击它们来下载并安装配置文件.
  4. 使用react-native bundle
  5. 打包javascript捆绑软件
  6. 在Xcode项目属性中,在Build Settings选项卡下选择您的App Store分发配置文件.在General标签下突出显示版本和内部版本号.
  7. 在屏幕顶部,选择您的生产构建方案,并选择Generic iOS Device(或任何已插入iDevice的)作为构建目标.
  8. 运行Product > Archive
  9. 打开Window > Organizer,选择您的构建,然后按Upload to App Store...
  10. 使用您的开发者帐户登录 iTunes Connect ,然后在TestFlight标签下单击Select Version to Test(新版本可能需要一段时间才能进行测试).
  11. 等待Apple批准您的应用程序进行测试(内部测试应用程序应该快速,外部测试应用程序需要通过轻量级的批准过程).
  12. 一旦该应用程序获准用于TestFlight测试,请将链接复制到您的测试应用程序,然后按照给定的说明进行操作.
  1. Log into Apple Developer Member Center with the Apple ID tied to your developer account (or register for a new developer account)
  2. Generate provisioning profiles for Ad-Hoc deployment and App Store deployment
  3. Download and install the provisioning profiles by double clicking them in OSX finder.
  4. Package javascript bundle with react-native bundle
  5. In Xcode project properties select your App Store distribution profile under the Build Settings tab. Bump Version and Build numbers under the General tab.
  6. In the top of the screen, select your production build scheme, and Generic iOS Device (or any plugged in iDevice) as build target.
  7. Run Product > Archive
  8. Open Window > Organizer, choose your build and press Upload to App Store...
  9. Log in to iTunes Connect with your developer account, and under TestFlight tab click Select Version to Test (it might take a while for your new build be be available for testing).
  10. Wait for Apple to approve your app for testing (Internal Testing apps should be quick, External Testing apps need to go through a lightweight approval process).
  11. Once app is approved for TestFlight testing, copy the link to your test app and follow the given instructions.

如果这看起来很麻烦-是的.但是,通过此过程是值得的,因为这是能够在App Store中提交要下载的应用程序的先决条件,并且早日完成此过程,就可以更轻松地向公众发布该应用程序.

If this seems like a lot of hassle - it is. But going through this process is worth it, as it is the prerequisite to be able to submit the app for download in the App Store, and the sooner get this process in place, the easier it will be to release the app to the public.

这篇关于如何构建React Native iOS应用,获取.app文件并部署到设备上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆