- Xcode for Windows: Develop iOS Apps on PC
- Xcode for Windows: What & Why
- Rent a Mac in the Cloud
- Learn how to code iOS apps
- Setting up your Mac with Windows 10
- Run Windows on your Mac and use Visual Studio
- Apple Boot Camp
- Parallels Desktop
- VMWare Fusion
- Oracle VirtualBox
- ТОП-3 способа запуска программ Windows в MacOS
- Как пользоваться эмулятором Wine на macOS?
- Достоинства и недостатки Wine
- Виртуальные машины
- Какие бывают виртуальные машины — топ лучших
- Достоинства и недостатки виртуальных машин
- Что такое Boot Camp?
- Достоинства и недостатки Boot Camp
- Что выбрать: эмулятор Wine, виртуальные машины, Boot Camp?
- Заключение
- How to develop Windows app on Visual Studio for Mac
- 3 Answers 3
Xcode for Windows: Develop iOS Apps on PC
Written by Reinder de Vries on February 28 2020 in App Development
How can you run Xcode on Windows and develop iOS apps with a Windows PC? The short answer is: you can’t! You’ve got a few alternatives to get around that, however. In this tutorial, we’ll discuss how you can install Xcode on Windows to build iOS apps.
Here’s what we’ll get into:
- Rent a Mac in the cloud (starting at $20/mo)
- Run and compile Swift directly on Windows/Linux
- Learning to code with a Swift Sandbox
- Build your own “Hackintosh” by installing macOS on a PC
- Run Xcode on Windows by installing macOS on a virtual machine
- Develop iOS apps on Windows with cross-platform tools
- Get your hands on a second-hand Mac (starting at $300)
Xcode for Windows: What & Why
Xcode contains everything you need to build iOS apps, and it only runs on macOS!
That’s when the problems start. You want to make an iOS app with your Windows PC, but you can’t buy a PC or laptop with macOS pre-installed on it. Unlike Windows, Apple doesn’t license its operating system to other computer manufacturers. You can only use macOS on a Mac.
In fact, when you obtain a license to use macOS, which happens when you purchase a Mac computer, you have to agree to only run the operating system on Apple hardware. This effectively limits you to only develop apps on a Mac.
“It’s more fun to be a pirate than to join the navy.”
— Steve Jobs (1983)
But… it’s more fun to be a pirate, than to join the navy, right? Let’s discuss a few alternatives that’ll let you run Xcode on Windows and develop iOS apps on a Windows PC!
Rent a Mac in the Cloud
An even easier way to get your hands on macOS, albeit more expensive, is to rent a Mac “in the Cloud”. You can work with Xcode on Windows with this approach, because you’re essentially connected to a Mac that’s elsewhere.
Here’s how that works:
- Someone connects a bunch of Mac’s to the internet
- You sign in on one of those Macs via a Remote Desktop Connection (RDP)
- Done! You can use this Mac from Windows/Linux and build iOS apps
Services like MacinCloud and MacStadium offer affordable rent-a-Mac products, usually paid on a monthly basis. Prices typically start at $20/month and you can choose from several hardware options, including Mac Mini and Mac Pro.
Starting at | Type | |
---|---|---|
MacinCloud | $20/month | Dedicated, Virtual, Server |
MacStadium | $79/month | Dedicated, Enterprise |
virtualmacosx.com | $9.75/month | Shared (timesharing) |
Mac Cloud | $49/month | Virtual |
Flow | Premium | Dedicated, Enterprise |
HostMyApple | $25/month | Virtual, Dedicated |
You connect to those cloud-based Macs via a Remote Desktop Connection (RDP). Windows includes a stock Remote Desktop Client you can use, and so do most Linux operating systems. Once you’re logged on, you can launch Xcode, and start building your iOS app. That way you’re effectively running Xcode on your Windows PC!
Cloud-based Macs usually come in 3 flavours:
- A dedicated Mac, which means you get access to a physical Mac located in a data center, as if you bought a Mac in the Apple Store and put it on your desk.
- A virtual Mac, which means you get access to a virtual Mac in a data center, much like the VirtualBox solution mentioned earlier. Your Mac won’t run on Apple hardware, but it will run macOS.
- A Mac Build Server, which is a specialized kind of Mac that can be used to compile iOS apps. You’ll create those apps on your Mac, and then instruct the Build Server to compile the app for you.
A dedicated Mac is the most convenient, and the most powerful option. A virtual Mac is OK too, but it typically does not perform as well as a physical Mac computer.
Running Xcode via a Mac in the cloud has a drawback: you can’t easily connect your iPhone to Xcode via USB! With Xcode on your local Mac you can run and debug your app on your own iPhone, via the USB/Lightning cable. This obviously won’t work when your Mac is in the cloud…
Don’t worry! There are plenty of solutions for that:
- A simple approach is to run your app on iPhone Simulator, right from within Xcode. You can launch iPhone Simulator in Xcode, and debug your app with it. This is perfect for the development phase of your project.
- An alternative solution are tools like Flexihub, NoMachine and USB Network Gate. They only work with dedicated Mac hardware, and you need to have a dedicated IP address.
- Install your iOS app on your iPhone via TestFlight, and debug it with a tool like Bugsnag. You can monitor and debug live crashes in your app.
An interesting use case for renting a Mac in the cloud comes from the latest developments in Apple’s hardware. Many designers, developers and desktop-publishers have voiced their concerns over Apple hardware lagging behind, offering low-spec computers for a fairly high price.
If you don’t want to take your $3.000 MacBook Pro with you in a coffee shop, or on your next trip to Thailand, why not purchase a low-end Windows or Linux laptop, and connect to your Mac in the cloud? You can either host it at home yourself, co-locate it in a data center, or rent a dedicated cloud-based Mac.
Do you want to learn how to code iOS apps, but don’t want to invest money in a Mac? Rent a Mac in the cloud for the duration of the iOS development course you’re taking! It’s a great way to bootstrap learning iOS development, and you can always buy your own Mac later.
Learn how to code iOS apps
Get started with Xcode and Swift
Ready to get started with iOS development? Learn how to code iOS apps with Xcode and Swift with our immersive iOS development course. Works both on Mac and PC!
Setting up your Mac with Windows 10
Use your current Mac computer to develop apps for Windows.
Run Windows on your Mac and use Visual Studio
Are you ready to start developing Universal Windows apps, but you don’t have a PC handy? That’s okay — you can use your Mac! With popular third-party solutions like Apple Boot Camp, Oracle VirtualBox, VMware Fusion, and Parallels Desktop, you can install WindowsВ 10 and Microsoft Visual Studio on your Apple computer.
NoteВ В You will need a WindowsВ 10 bootable image on disk or USB flash drive. If you are a MSDN Subscriber, you can download the install image from the MSDN Subscriber Downloads center. If you aren’t a subscriber, the installer can be purchased from the Microsoft Store. You can also download it from this location, which is useful if you are already running Windows and wish to upgrade.
Once you have Windows running, you can then install the latest release of Visual Studio from Developer downloads for WindowsВ 10 and start writing apps!
NoteВ В If you plan to use the Visual Studio device emulators, you must install a 64-bit (x64) version of WindowsВ 10 Pro or better. Unfortunately, some older Macs cannot run 64-bit Windows. Please check with Apple if your hardware is compatible on thisApple support page.
Apple Boot Camp
The Boot Camp Assistant app is pre-installed on every recent Mac, and launching it will walk you through the process of installing WindowsВ 10. All you need is a copy of Windows (from the sources listed above) and at least 30 Gb of free disk space. Once installed, you can choose to boot into Mac OSX or Windows 10. For more info, see Apple’s Boot Camp instructions page.
Parallels Desktop
Using Parallels Desktop 11, you can run Windows apps side-by-side with existing Mac applications, including Visual Studio and Cortana. A pro version is available that includes extra features for developers, including improved debugging, and support for Docker and Jenkins. For more info, and a free trial version, see Parallels Desktop.
VMWare Fusion
Fusion 8 from VMWare will let you run Visual Studio right on your Mac desktop. A pro version is available to offer developers some more advanced features such as vSphere support. For more info, and a free trial version, see VMware Fusion.
Oracle VirtualBox
VirtualBox is a free application for running virtual machines on your computer, and it supports running Windows on Mac. It is a no-frills option, but the price is appealing. For more info, see VirtualBox.
ТОП-3 способа запуска программ Windows в MacOS
Если вам необходимо запустить на Макбуке программу Windows, то придется воспользоваться сторонним софтом. Самым популярным решением станет бесплатный эмулятор Wine. Он отличается высокой производительностью, благодаря которой программы не «тормозят». Минусами эмулятора Windows для mac OS является то, что он не дружит с некоторыми приложениями.
Как пользоваться эмулятором Wine на macOS?
- Чтобы эмулятор работал на ПК с системой macOS, нужно предварительно скачать и установить утилиту XQuartz. В последних версиях macOS открытый программный код вмонтирован в оболочку системы. Его можно найти по адресу: Applications/Utilities/Xquartz.app.
- После ее установки компьютер необходимо перезагрузить.
- Далее скачайте сам эмулятор . Wine скачать на mac можно с официального сайта.
- Дождитесь завершения установки. После чего софт можно найти в следующей директории: /Users/ваша_учетная_запись/.wine. Она будет скрыта, поэтому воспользуйтесь гайдом, как находить скрытые папки.
- Для запуска Windows нужно ввести команду «wine program.exe» либо запустить установочный файл скрытой папки в предыдущем пункте.
Достоинства и недостатки Wine
Плюсы эмуляторов для Windows:
- Не нужно лицензионное ПО.
- Данный способ значительно экономит ресурсы системы.
- Сложная настройка. Перед использованием любого софта, его предварительно нужно настроить. Особенно это сложно делать с играми.
- Совместимость. Некоторые «тяжелые» приложения, забирающие много ресурсов системы, могут некорректно работать или не работать вовсе.
Виртуальные машины
На выходе получается полноценная оперативная система, только располагается она на «виртуальном» железе. Получается, что внутри одной ОС создается другая, которая при запуске забирает часть ее оперативной памяти.
На данный момент существует несколько таких виртуальных машин. Они бывают платные и бесплатные. По большей части они ничем не различаются между собой. Разве что, в бесплатных функционал ограничен. Но в то же время, при полном образе можно легко запустить на mac программу для Windows.
- Установка дополнительной ОС со съемного носителя или образа загрузочного диска.
- Указание количества ресурсов, которые может использовать дополнительная ОС.
- Установка и пользование приложениями.
Какие бывают виртуальные машины — топ лучших
- Parallels Desktop – самая популярная платная программа. Благодаря ей создается гибрид систем. Любые приложения запускаются сразу, вне зависимости от того, к какой системе они принадлежат.
Достоинства и недостатки виртуальных машин
- Возможность работать с двумя системами одновременно.
- Легко получить доступ к файлам.
- Потеря производительности из-за одновременной работы двух систем.
- Некоторые приложение (чаще игры) не работают.
Что такое Boot Camp?
Это программа, позволяющая устанавливать «окна» на Макбук. Система займет отдельное место на жестком диске и будет работать независимо от «яблочной».
Для этого вам потребуется:
- 50 Гб свободного места во внутренней памяти.
- Загрузочный диск с Windows.
Достоинства и недостатки Boot Camp
- Такой метод не ресурсоемкий, потому что одновременно пользоваться можно только одной ОС.
- Все приложения и игры беспроблемно устанавливаются и работают.
- Чтобы переключаться между ОС, нужно каждый раз перезапускать компьютер.
- Не будет доступа к файлам разных систем.
Что выбрать: эмулятор Wine, виртуальные машины, Boot Camp?
Если вы не можете определиться, каким способом воспользоваться, то следующие рекомендации для вас:
- Boot Camp нужен, в первую очередь, для тех, кто будет пользоваться играми.
- Виртуальная машина нужна тогда, когда необходимо пользоваться одновременно двумя ОС.
- Эмулятор подходит для простых задач и нечастого применения.
Заключение
Нет таких людей, которые не имели бы дело с ОС Windows. Со временем некоторые пользователи «окон» переходят на «яблочную» систему. Но у них остаются на «окнах» программы, не имеющие аналогов на Mac, и без которых не получается обходиться.
Для такой проблемы есть несколько решений: запуск программ Windows в MacOS с помощью эмулятора Wine, виртуальных машин или Boot Camp. Каждое имеет свои особенности и недостатки, и только вы определите, что вам больше всего подойдет.
Ставь лайк, если нравится материал и подписывайся на наш Дзен канал!
How to develop Windows app on Visual Studio for Mac
I recently bought an iMac in order to develop my App on Visual Studio for Mac in a better environment (lots of issues on Windows), but on the Visual Studio for mac, there is no UWP projects.
It is understood that I have to create a new .NET project, but what are exactly the steps to follow in order to achieve that correctly for the app to work on Windows with a peace of mind? Should I have gone with Visual Studio code, which support the .NET core framework completely?
I saw on other answers that I need the .NET SDK tool, and so forth, but further details are needed if you don’t mind on the why (not the installation stuffs, only the tech savvy explanations for the app to build correctly at the end!
3 Answers 3
You will need to run a Windows installation (eg, via Parallels or Boot Camp) and then run the Windows version of Visual Studio to create UWP apps.
You can do a lot of the business-logic coding inside Visual Studio on MacOS, but you will need Visual Studio and the Windows SDK to use WinRT types (which are required to build a UWP app) and to correctly build / package the app for deployment.
.NET is a big ecosystem. As you cannot develop all kinds of .NET projects using Visual Studio on Windows (Xamarin.Mac for example), you cannot do the same using Visual Studio for Mac (like you found, WinForms/WPF/UWP and so on). Such limitation comes from vendor SDK availability or other underlying systems.
In your case, you can easily develop web apps, Mac apps, and iOS apps. If you do want to develop Windows specific apps, like the other answer shows, please use Windows.
You mentioned «.NET SDK», but I believe that should be «.NET Core SDK». .NET Core apps are cross platform. Thus, you can develop such apps in Visual Studio for Mac, and then deploy to Windows. However, so far only console apps and web apps can be developed. What might happen in the future is still to be determined.
Visual Studio Code, however, is just a code editor. It won’t give you extra flexibility.
For those whom imperatively needs to develop their app on all platforms, here is what I did, and the pros and cons:
- Buying an Imac, thinking that I could also develop UWP projects within it
After realizing that I couldn’t, I bought a cheap Windows 7 pro License on ebay (around 5$), and installed it on VirtualBox.
From there, I upgraded to Windows 10 for free and installed everything. It worked like a charm.
Cons: Buying a brand new IMac while a Macbook pro would have been better. An old one even since YOU CAN’T upgrade the ram.
Working on 8go of ram computer when you must give 4go of RAM to your VM isn’t quite great. 4go gets you a laggy environment! Really frustrating. So, prefer something older, but up-gradable (a cheap Macbook pro with 16go of RAM would do). Not to mention that you will have to install Ubuntu as another VM in order to setup a .Net core Server for the majority of you.
- What environment to favor while developing, most importantly when you are a C# and Xamarin noob like me?
The best being to develop from Mac as you will have FAR LESS ERRORS AND BUGS than in VS for Windows. Correcting mistakes is really daunting and the best is really to develop from Mac to mitigate the damages, but it won’t be hurdles free as well! It took me more time debugging than coding within VS Windows.
After developing chunk of your app within Visual Studio MAC, the best is to get the code on the windows machine and arrange it to work in UWP. UWP apps compile fastly and like a charm, so better is to get rid of errors within macOS, IOS, Android, and then go and adapt to UWP. This is easier IF YOU THINK ABOUT CHOOSING THE CORRECT LIBRARIES (working on all platforms, hence check my last advice).
From VS Mac, compile using macOS as a host! It’s the easiest way to develop fastly, and correct your bugs.
Here is an article on how to get started from Mac:
Cons: Always having to commit the code for it’s use within UWP. But that’s also a good way to save your project as well, so that if you screw up (like it happened to me numerous time) you roll back.
Hope that helps others whom didn’t know what to do and where to start.
Don’t follow tutorials dating from before 2017. Use the .Netstandard/.NET Core framework to develop your App so that libraries are more portable (following the blog article above should do).