Developping & Building for IOS from Windows or Linux

This thread is intended to summaries how to build for IOS from Windows or Linux, it follow this Original discussion

Developping for IOS require a Mac OS, there are four choices :

  • Mac computer
  • Hackintosh
  • Mac in Cloud
  • Mac in Virtual Machine

Once you got one of them, you need to do the following three steps into the Mac OS:

  • Install XCode
  • Install Titanium SDK
  • Enable SSH connection

No matter the choice you have made (logical or physical Mac OS device), you have now a Mac OS with its own IP and SSH connection enabled.

Now add a pair of private/public key from your main computer (Windows or Linux) to the Mac OS (without passphrase) to enable easy remote command using ssh.

You can now develop on your main computer (Windows or Linux) and build/launch your app on the remote Mac OS using just thoses two steps :

  • synchronize source code : rsync ProjectFolder macOSUser@remoteMacIP:.
  • remote build, launch, … : ssh macOSUser@remoteMacIP "ti build --project-dir ProjectFolder"

Example with :

  • Mac OS IP : 192.168.10.10
  • Mac OS user : tom
  • Local Folder : MyTiProject
rsync MyTiProject tom@192.168.10.10:.
ssh tom@192.168.10.10 "ti build --project-dir ./MyTiProject"

rsync maybe replaced by scp but scp will copy the whole project files while rsync will only copy modified ones. After first run rsync is nearly instantaneous on a LAN.

Obviously you can embed those two lines in a script.

For Windows users :

  • You may have to install/enable ssh & rsync, on recent Windows ssh is embeded but rsync must be installed by some other ways like Cygwin, MinGW, …

A note about Mac VM on Windows :

  • After several attempts, and at the date of this post, May 2022, I found that the best working VM solution for Mac OS on Windows is VMWare (VirtualBox works too but is way slower because for now, Guest additions cannot be added).

It require :

  • installing VMWare Player/Workstation (free)
  • unlock script for Mac OS VM for VMWare (required to create Mac VM on WMWare)
  • Monterey ISO disk file
  • VMWare guest addition for MacOS (make the VM run a lot smoother)

An alternative to rsync is to mount the remote Mac OS project or drive folder on the main computer (or vice versa), there are multiple of solution for that SSHFS, Samba. But this solution is less scalable, more risky, and have IMHO no real benefits

Last notes :

  • If you are working on two separated devices you may want to look at tools enabling keyboard & mouse sharing across differents OS, this way you can interact with the MacOS / IOS Simulators on another screen with your main keyborad & mouse. One good software for this is Synergy

  • I am in the process of studying how to embed this (sync & building) in a tool (rti or ti remote or what else…)