React-native:如何从 Windows 构建 ios

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/40587265/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 10:46:33  来源:igfitidea点击:

React-native: How to build for ios from windows

ioswindowsbuildreact-native

提问by simon Le Ster

We are starting to work with react-native at my company. We have one mac and the rest of the team is running on windows.

我们开始在我的公司使用 react-native。我们有一台 mac,团队的其他成员在 Windows 上运行。

Is there a way to write the app on windows with the ios device connected to the windows machine or local wifi. Then launch the build on the mac (from the windows pc) and get the app launched on the ios device ? So it would like using the mac only as a build/package server.

有没有办法在 ios 设备连接到 windows 机器或本地 wifi 的情况下在 windows 上编写应用程序。然后在 mac 上启动构建(从 windows pc)并在 ios 设备上启动应用程序?所以它只想将 mac 用作构建/包服务器。

Hope i am clear enought.

希望我很清楚。

Thanks.

谢谢。

回答by fullofsid

React Native has released the " Create React Native App" tool which lets you build Android and iOS app on your windows/linux machine without having to install Xcode or Android Studio, using the Expo SDK and app.

React Native 发布了“ Create React Native App”工具,它可以让你在你的 windows/linux 机器上构建 Android 和 iOS 应用程序,而无需安装 Xcode 或 Android Studio,使用 Expo SDK 和应用程序。

Announcement- https://facebook.github.io/react-native/blog/2017/03/13/introducing-create-react-native-app.html

公告- https://facebook.github.io/react-native/blog/2017/03/13/introducing-create-react-native-app.html

Alternate Suggestions

替代建议

If in case you needMacOS (for native code stuff) then checkout MacinCloud.com, I am on the Managed server plan and the experience has been upto the mark.

如果您需要MacOS(用于本机代码内容),请查看 MacinCloud.com,我在托管服务器计划中,并且体验达到了标准。

回答by KrishnaCA

We can launch the build on windows using Virtual Machine, the detailed steps for doing that can be found in the following link:

我们可以使用虚拟机在 Windows 上启动构建,详细步骤可以在以下链接中找到:

https://blog.udemy.com/xcode-on-windows/

https://blog.udemy.com/xcode-on-windows/

回答by ljmocic

You should explore the option of running macOS in VMWare on Windows machines for building purposes.

您应该探索在 Windows 机器上的 VMWare 中运行 macOS 的选项以用于构建目的。

EDIT: Now using:

编辑:现在使用:

expo build:android
expo build:ios

Way simpler.

方式更简单。

回答by tolga

You can use expo cli. Create react native app was merged with Expo CLI

您可以使用 expo cli。Create react native app 与Expo CLI合并

expo build:android
expo build:ios

From the github page of create native app:

从创建本机应用程序的 github 页面:

Note: Create React Native App has been merged with Expo CLI You can now use expo init to create your project. See Quick Start in the Expo documentation for instructions on getting started using Expo CLI.