Home/Q&A/I write React Native on Windows or Linux. Can I build the iOS app on a remote Mac?

I write React Native on Windows or Linux. Can I build the iOS app on a remote Mac?

Updated · airankrush

Direct answer

Yes. Pull the repository onto the remote Mac, install Node, CocoaPods and Xcode, and you can compile, run the simulator, archive and upload. If the project uses Expo, cloud builds may be enough and you may not need a Mac at all.

Basis

  • React Native's JavaScript code can be written on any system, but the ios folder is a real Xcode project. Native dependencies are integrated through CocoaPods, and compiling and signing can only be done by Xcode on macOS.
  • According to Expo's documentation, its cloud build service runs iOS builds on its own macOS cloud machines, can create and manage distribution certificates and provisioning profiles for you, and can submit to the store automatically after a successful build. A pure Expo project can take this route without touching a Mac at all. Check Expo's website for quotas and billing.
  • Typical cases that do need a remote Mac: the project has native modules you wrote or modified; a third-party library fails to compile on iOS and you need to see the full error in Xcode; you want to look at how the UI really behaves on iOS in the simulator; or you are not willing to hand signing credentials to a third party.
  • When debugging, the Metro dev server has to be on the same machine as the simulator, which means it runs on the remote Mac. There are two ways to change code: edit in an editor on the remote Mac, where hot reload takes effect immediately; or edit on your own computer, push, and pull on the remote side, which is slower but keeps your typing unaffected by the remote picture.

Information as of .

Boundaries: when the answer is different

If your React Native app needs native modules debugged while attached to a physical iPhone, such as bridge code for Bluetooth, push or the camera, a remote Mac cannot do it and you need a Mac at hand. Do not count on pointing a development client on your own phone at Metro on the remote Mac either: the two are not on the same local network, and customers are not allowed to change the machine's network configuration. iOS-specific build errors are yours to work through with the official guidance of the framework and the libraries, and we do not provide technical support.

How to do it

  1. Install Xcode, Homebrew, Node and CocoaPods on the remote Mac, using the versions given in the project's documentation.
  2. Clone the repository, install the JavaScript dependencies, then go into the ios folder and run pod install.
  3. Run the framework's iOS start command so the app installs into the simulator and connects to Metro.
  4. Once screens and flows look right, open the .xcworkspace in Xcode, configure signing and archive.
  5. Upload to App Store Connect and install on your own phone through TestFlight to verify.

Use case

This question belongs to the use case: iOS without a Mac: a remote Mac mini can build, sign and upload, but not debug on a real device

Other questions in the same use case:

Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support

Back to home · All Q&A