Xamarin Visual Studio IOS Development Without a Mac?
Solution 1
Yes, you must have a Mac to do Xamarin.iOS development. The Mac is required for building as well as running the iOS simulator. You can either use it as a build server, and actually do your development in Visual Studio (either in a standalone PC, or on a VM running on your Mac), or you can do your development directly on the Mac using Xamarin Studio as your IDE.
Solution 2
From May 2017, you can develop app without MAC.
Microsoft Xamarin introduce a Live Player. With Live Player, iOS apps can be deployed directly onto an iPhone or other iDevice from a PC running Visual Studio, where the code can then be tested and debugged.
WARNING The Xamarin Live Player Preview has ended. But it changed Hot Reload. With this feature, you can develop iOS app with your iPhone See discussion
See this video: https://www.youtube.com/watch?v=awgZDL1a3YI
this is Live Player Get start section: Live Player
Note: The final build and submission to the App Store will still require a Mac
Device Requirements
The Xamarin Live Player app supports the following devices:
iOS
- iOS 9.0 or later.
- ARM64 processor.
- Check the App Store for a list of supported devices.
Android
- Android 4.2 or later.
- ARM-v7a, ARM-v8a, ARM64-v8a, x86, or x86_64 processor.
Limitations
There are some limitations on the things Xamarin Live Player can run, including the items below:
- Android user interfaces designed with AXML files are not currently supported.
- Some iOS storyboard features are not supported.
- iOS XIB files are not supported.
- Custom Renderers are not supported.
- Xamarin.Forms Effects are not supported.
- Embedded resources are not supported (ie. embedding images or other resources in a PCL).
- Limited support for reflection (currently affects some popular NuGets, like SQLite and Json.NET). Other NuGets are still supported.
- Some system classes cannot be overridden (for example, you cannot implement a subclass).
- Some platform features that require provisioning can't work in the Xamarin Live Player app (however it has been configured for common operations like camera access).
- Custom targets and build steps are ignored. For example, tools like Fody cannot be incorporated.
Solution 3
You can use Xamarin Studio instead of Visual Studio and build iOS application by C#. First install VMware Workstation and then download OS X image and run it by VMware.
Then Install tools on it and enjoy.
Tools :
EDIT : The following links are out dated, You must install Mac OS 10.10 in order to be able to install XCode 6.
iOS Tools that you need:
1) Mac OS X image for Windows Note: Max OS X Installation Help: http://www.sysprobs.com/easily-run-mac-os-x-10-8-mountain-lion-retail-on-pc-with-vmware-image
2) Mono: http://download.xamarin.com/MonoFrameworkMDK/Macx86/MonoFramework-MDK-3.2.4.macos10.xamarin.x86.pkg
3) Xamarin Studio: http://download.xamarin.com/studio/Mac/XamarinStudio-4.2.1-1.dmg
4) MonoTouch: http://download.xamarin.com/MonoTouch/Mac/monotouch-7.0.4.209.pkg
5) Xcode
Solution 4
Update 2018
Install VirtualBox https://www.virtualbox.org/
Install MacOs 10.13 on VirtualBox https://techsviewer.com/install-macos-high-sierra-virtualbox-windows/
Create or login with an apple account on the mac
Install XCode 9.0 https://download.developer.apple.com/Developer_Tools/Xcode_9/Xcode_9.xip
Enable Remote Login System Preferences > Sharing > Remote Login > Enable for All Users
Configure VirtualBox with an additional network adaptor (host-only)
In Windows > Visual Studio (Xamarin Project) > Pair with mac
Enter the IPaddress of the second network adaptor
Let Visual studio install Xamarin IOS, IOS SDK, additional tools on the Mac
All set up.
Solution 5
An option is to use a remote service to do this. For example: http://www.macincloud.com
Comments
-
Hardgraf almost 2 years
I'm a .NET developer and want to write an IOS & Android app in C#. I've had a read around Xamarin for Visual Studio which looks interesting if not a tad expensive!
Do you need a Mac to debug your code? Do you just need a networked Mac to actually deploy the app to the Store?
Is the best option just to buy a Mac and run Windows with VS in a VM or can I just use my windows machine, write & debug the code in Windows then just hook up to a networked Mac for final deployment?
-
Hardgraf over 9 yearsThanks @Jason, so the best way to tackle this would be use a Mac with Windows running on a VM through Parallels etc?
-
Jason over 9 yearsI personally just use the Xamarin Studio IDE, but a lot of people who love VS run it from within a VM
-
Hardgraf over 9 yearsOk thanks, As a C# developer I assume you think the outlay cost is worth it as opposed to learning Objective C & Java for Android?
-
Hardgraf over 9 yearsYes but you need to have an actual Mac machine for the Apple iOS SDK to be present at compile no?
-
Morteza Soleimani over 9 yearsI use WMware completely for develop and publish iOS apps , and I dont have a mac
-
Mike over 9 yearsIt's more than just learning Objective-C and Java. You also don't have to maintain three different code bases (assuming you're developing for Windows Phone as well). Adding new features, fixing bugs, and being able to release for all platforms at the same time is definitely worth the investment.
-
Morteza Soleimani over 9 years@Hardgraf I edited my answer and you can find all tools that you need
-
Jason over 9 yearsRunning OS X on non-Mac hardware (directly or in a VM) is a violation of Apple's license
-
Hardgraf over 9 yearsRight so you can deploy to the Mac App Store using the OS X image installed on a VM using a Windows machine? Is this legal too?
-
VAAA over 8 years@MortezaSoleimani is it possible then to have Xamarin installed in a Windows PC inside a VMWare machine using Mac OS X?
-
Morteza Soleimani over 8 years@VAAA yes it's possible, But you will be able to develop just for Android on it, as it is a windows and developing for iOS is not possible on windows OS.
-
VAAA over 8 yearsOh, so impossible to run Xamarin IOS on windows?
-
Morteza Soleimani over 8 years@VAAA on Mac you are able to develop for both Android and iOS , But on Windows just you can develop for Android, If you have Mac so without vm machine you can develop , But if you have windows , you should setup a vmware to load mac on it and develop for ios inside it.
-
Paul Perrick over 8 yearsThis guy has a nice write up on the process from an experienced perspective: vincenth.net/blog/archive/2014/11/18/…
-
SMKS over 8 years@VAAA I do all of my development on Windows inside of Visual Studios, using a Mac running inside of Virtual Box as a Build Host. No need to do any development inside of Mac OS
-
Luiso about 8 years@SMKS could you please point me somewhere I could find more info on how to build such VM, either on VirtualBox or VMWare? Please take into account I have 0(zero) knowledge of the Apple ecosystem.
-
SMKS about 8 years@Luiso Of course, see my answer here which will give you a number of the links that you need to get started: stackoverflow.com/questions/27090796/…
-
Exlord almost 8 years@SMKS what kind of pc do you use to run mac on vm? cpu dual or quad core? intel or amd? how much ram? i tried this in my labtop but its slow and hangs.
-
Morteza Soleimani almost 8 years@SMKS intel core i7, 8 gigs ram, But the performance is not suitable for professional projects, I recommend to use a real Mac to do your work.
-
SMKS almost 8 years@MortezaSoleimani I used to use it to just deploy my apps. Now I have decided to partition my harddrive and install OSX on my other partition and I do it all from there. No need to buy a new laptop.
-
Christopher Brown over 6 yearsPlease note that since this answer was given, things have changed. In mid 2017, Xamarin released the Live Player (see @ebattulga's answer) which allows "continuous development and debugging for iOS" (xamarin.com/live). Also see arstechnica.com/?post_type=post&p=1094721 for more information.
-
JohnB over 6 yearsJust a "gotcha" when I was getting started with Xamarin. As per blog.xamarin.com/xamarin-live-player-faq reflection doesn't work as you'd expect. I was pulling my hair out trying to figure out why my JSON.NET code wasn't serializing properly. It made Live Player useless to me since my app communicates with a rest api via json.
-
ebattulga over 6 years@ElPresidente Sorry of inconvenient. I just updated my post with limitation for
live player
. -
Davatar about 6 yearsDoes anyone know what "limited support for reflection" is supposed to mean?
-
alerya about 6 yearsIt's very strange we haven't any solution from Azure
-
Doug Null almost 6 yearsDoes this mean I can write a complete GUI on my iPad Pro by using ONLY Visual Studio with Xamarin, on my Windows 10 Pro computer without buying a Mac?
-
Neil over 5 yearsLivePlayer is pretty poor IMO. My app has an Android splash screen and that prevents LP from working properly, and even when I removed it, it didn't really work. I would suggest either GorillaPlayer, or the Rolls Royce (in both price and functionality) is LiveXaml
-
Emil over 5 yearsdid you really try this and is it working? before waste our times :D
-
Anders Carstensen over 5 yearsNote: According to this discussion section, the iOS Live Player is dead: "We will no longer be distributing the iOS version of the Xamarin Live Player."
-
Newclique over 5 yearsI found the iOS Live Player to be dead, as well. Depending on how badly you want to feed the Beast, the cheapest, most time-saving way is to just get a $400 mac mini. Apple makes no money on these crappy machines so you aren't feeding them much and all of your headaches will largely go away. smh
-
Ateik over 5 yearsYes it works. But it is not usable (even with a hello world sample). My machine specs i7-8550u 16GB (so it might better with a higher specs)
-
Emil over 5 years@Ateik without you mean by that. you mean even with your pc configuration it is slow?
-
Ateik over 5 yearsYes, with the mentioned specs, its slow for compiling a hello world app, and running an iOS simulator
-
Verthosa over 5 yearsSorry to hear but I don't have performance problems in my setup. I assigned my virtualbox macos machine 4gig ram, 2processor. Host system: Core i7 2.4ghz 4cores, 32Gb of ram. It's perfectly usable here but of course this is some kind of hack/workaround. It will always be better to just purchase a mac
-
JCMiguel about 5 yearsCould Docker be used instead of a virtual machine for better performance?
-
Abubakar Riaz almost 5 yearsThis is a paid solution, tutorial link for using mac in cloud for Xamarin IOS build, c-sharpcorner.com/article/…
-
niico over 4 yearsAnyone tried using macinCloud or MacStadium (required for actual App store submission) alongside XAML previewer for iOS?
-
Alt-WN about 4 yearsYes, this is paid, but the cheapest plan is for $30. It is much below even the cheapest refurbished Mac. As I understand I need Mac for few hours/month just to do a final build before publishing. Question: Do I need to have admin rights on Mac to do a build for iOS? I.e. do I need to buy a plan with full admin/root access? Assuming I have Visual Studio Enterprise 2019 and powerful Windows 10 desktop which MacInCloud plan is optimal for final build of Xamarin application for iOS? (Pay-as-you go, Managed Server, Dedicated Server, Azure Agent)
-
CDrosos almost 4 years@Verthosa can you update your instructions or to confirm us that those instructions works great still?
-
Verthosa almost 4 yearsThe moment I wrote it, it surely worked. I cannot confirm this nowadays because i don't have that VM up and running anymore - i now have a real macbook pro :-)
-
pouya over 3 yearsYeah you just need 12 cores intel CPU and 32GB DDR5 RAM to export a damn IPA:)