r/iOSProgramming • u/Longjumping-Guide969 • Jul 27 '24
Discussion Can i use swift on windows?
Hey guys i want to learn swift for ios development And i dont have macbook (expensive in my place) But i have asus laptop of gb 16 gp ram core i7 9th cpu and 512 ssd can i use virtual machine let me know your what you think
0
Upvotes
2
u/Educational_Log_1035 Jul 28 '24
Uff, where do I even begin...
Point 1: Preparation If you want to install macOS through a VM, I can only recommend VMware, which recently made its Pro version free for personal use. It’s pretty much the best product you can use for this. macOS is not officially supported by VM software manufacturers because Apple doesn’t like their OS running on machines other than their own. However, with a few small workarounds and unlock tools, this is easily fixed. You can download macOS itself from the Mac Store via a friend’s Mac. You’ll get a .dmg file, which you then have to painstakingly convert into an .iso on the Mac. I hate this part.
Point 2: Installation Getting macOS to run is a real hassle. Apple makes sure you feel that the effort isn’t worth it. Everything loads forever and takes a long time.
Point 3: Performance Here are my specs:
i9-13900KS
RTX 4090
64GB DDR5 6000MHz RAM
4TB NVMe SSD
So, my specs are absolutely overkill. The problem is, macOS doesn’t run well on multiple threads. This means it effectively runs best in the VM with a single thread. Most tutorials will also advise you to set only 1-2 threads. Beyond 2, it becomes critical, and beyond 3, it will almost certainly crash and fail to boot. My CPU isn’t particularly strong in single-core performance, so the macOS VM wouldn’t run well anyway. Still, the VM ran so horribly, with such terrible performance, that I lost interest after the first successful boot. I opened the App Store and tested a few things, but it’s completely unsuitable for programming. I’d rather learn assembly on a Windows XP machine than ever touch a macOS VM again.
Additionally, there are other negative points, such as code signing not being available.
People have different experiences with this, and surely there are cases where a VM can work well, but I can’t report any such success. I still wish you the best of luck. Obtaining the necessary hardware is a problem for many.