Look iOS Developer, No Mac Required – Build an iOS Application using Xamarin and Visual Studio for Windows without using a Mac

If you’re a die-hard Windows user, like me, you’ll be excited to know that you can now build iOS application using Xamarin (and Xamarin.Forms) and Visual Studio, without having to buy or use a Mac. That’s right for development, you no longer need to invest, or carry around, a Mac. In this post I’ll walk you through how to enable this feature.

I’m working in the latest preview of Visual Studio 2019 and as of now, to use Xamarin Hot Restart (the feature that powers the no Mac development experience), you need to check the Enable Xamarin Hot Restart option under Preview Features in the Tools, Options dialog.

After enabling Xamarin Hot Restart, make sure you restart Visual Studio. Next, set your iOS project to be the startup project by right-clicking the iOS project in Solution Explorer, followed by the Set as Startup Project menu item.

Make sure in the toolbar the option next to the play button says Local Device. Click the play button, which will kick off the Setup Hot Restart experience.

There are a couple of steps to jump through the first time you want to use Hot Restart. Make sure you follow the instructions to avoid having to redo steps.

The first step in the process it to Download iTunes – make sure you click the Download iTunes button. Do NOT install iTunes from the Microsoft Store. If you’ve done this previously, make sure you uninstall it, and then install it by clicking the Download iTunes button.

Clicking the Download iTunes button will open your default browser but it will attempt to immediately download the file – make sure you check out the downloads so you can launch the file once it’s downloaded.

Step through the iTunes installer.

Once iTunes is installed the Setup Hot Restart process will detect the presence of iTunes (note that it will not detect iTunes if you’re installed it from the Microsoft Store).

Next, make sure you have an iOS device plugged in and that you’ve clicked the Trust option on the device when prompted to trust the connected computer. The Setup Hot Restart process should detect the attached device.

Next, sign into your Apple Developer account.

And select the Development Team you want to use for provisioning.

After completing the Setup Hot Restart process you should see that the build process will continue and that in the Output window you’ll see the iPA being created and subsequently pushed to the device.

When prompted, you’ll need to launch the installed application on the iOS device – this manual step is required in order for Visual Studio to attach the debugger.

And there you have it – you now have an iOS application being debugged using Visual Studio on an actual device with no Mac required!!!

41 thoughts on “Look iOS Developer, No Mac Required – Build an iOS Application using Xamarin and Visual Studio for Windows without using a Mac”

  1. Thanks for the tutorial. I could run my app on my iOS Device, but when I get the message “Connecting Debugger”, even opening the App, I can not debug and the app is being closed. Did you face with this problem? Thanks.

  2. Provided that I cannot provision automatically (I need to pass the Entitlements.plist configuration file to the process which is only possible on manuel provisioning), how can I use Hot Restart to still work on Windows?

    When trying, I get the following error message:
    No valid iOS code signing keys found in keychain. Please enable Automatic Provisioning from the iOS Bundle Signing page.

    When using a network-connected Mac, Visual Studio pulls information such as codesigning key and provisioning profile from the Mac. Now with Hot Restart, I guess, it expects the information locally and cannot find it.

    Does it even work?

  3. Great article Nick!
    Is there any way to do this with a free Apple Dev Account?! I mean I stuck at the provisioning section “Select Team Page”. I just start learning and I don’t want to pay 99$/y at least right now. I tried hello world with Xcode and it worked with my free dev account. Is there a way to do that with HotRestart too?

  4. It worked, and it is such a good surprise: thanks a lot to the Xamarin team and to you for having pointed me in the right direction!
    The funny thing is that a prior version of iTunes downloaded from the MS Store is required to connect the iPad during the Hot Restart setup, and that the iTunes uninstall and reinstall steps you mention are not required: excellent :-)!

    • Interesting – I tried with the Store version initially (didn’t read the instructions properly!!) and the setup process didn’t detect the presence of the Store version so I couldn’t proceed. Glad you got it to work

  5. Everything seemed to go well following these steps. But Deploying fails with the following error:

    “An error occurred while trying to deploy the app ‘App1.iOS.app’. Details: Error running winiosterminal: ‘An error occurred while deploying the application ‘App1.iOS.app’ into ‘brendan’s iPhone’. Details: An Afc error occurred. The error code was ObjectNotFound’. Command: ‘deploy -u=383dff3c9a96a1414278e25cef7f83deec5fa825 -i=com.bzsoftware.app1 -n=app1.iOS.app'”

    The “App1” iOS app works well otherwise if I Build and Distribute it via the AppCenter and install it on the same iPhone 8 device.
    SysInfo: Visual Studio 2019 16.5.1, Windows 10, iPhone 8, iOS 13.3.1

  6. This is really awesome! I got it working and love it. Could you please describe how does it work?

  7. Nick,
    Tried setting up the above, but my system doesn’t see a local device, only options are ‘Remote device’ and ‘Simulator’. Tried uninstalling and reinstalling iTunes and various other tips various posts have directed me to, yet I don’t see the local device option. Thoughts?

  8. Hi,
    is it possible to use an free Apple Developper account to only run and test iOS apps in Xamarin?

  9. I’m not sure I understand your question – perhaps connect with me on Twitter (@thenickrandolph) and I can try to help

  10. Wonderful! This is one of the most delightful things that I’ve learned this year! Being able to develop IOS/IPhone apps in Visual studio without Mac is a game changer.

    P.S: To Whom was not able to see “Local Device”: Local Device became visible when I select “Mobile.App (Xamarin.Forms)” project template to create the project. I had tried to create IOS Only Xamarin Project first and didn’t see the “Local Device”.

  11. Yep. He is right. It is paid unfortunately 99 USD per year. Well I dunno which one worth more. The Mac cloud ones or this one :/

  12. Thank you for the post. It took me a while to understand, that the Local Device only shows up for pure Xamarin.Forms projects. This excludes all the Xamarin iOS example projects on https://github.com/xamarin/ios-samples.
    So, if you like to check it out, you probably start with creating a new iOS Xamarin.Forms project.

    I was hoping to be able building a WatchOS application the same way but this does not seem to be supported. Do you know about any plans in this regards?

  13. Nick,
    Very useful article.
    After deployment, can you run the app on the device without attaching the debugger?

    • I don’t think you can run the app without attaching the debugger but I don’t know much about the implementation, so you might have to give it a go to confirm.

  14. working for me ! thanks

    BUT I am now stumped trying to connect to my rest services on my local laptop where VS2019 is running.

    Do you know what IP address I would use to connect from my iphone to local services? I have tried the ipconfig lan IP, localhost, and but no luck so far

  15. it works on my two computers. Since I setup MFA on the apple account, I had to make sure the apple device is present when adding the apple account in visual studio. also in my case, the itunes from microsoft store works. Fast compilation and debugging. I love it

  16. I turned on the Enable Hot Restart like you indicated. Then restarted VS 2019.
    Now when I hit the run on Local Device, I get a message.
    Please select a valid device before running the application.

    I cannot find the Hot Restart Setup screens, so I cannot even re-install iTunes.


    • Rich, the setup screens should automatically come up when you attempt to debug, so I’m not sure what’s going wrong there. Which version of VS are you running?

    • change to the simulator then try to debug, which will fail.
      then change back to the local device then the error message will be gone.
      This way worked for me. Good luck.

    • The latest update to Visual Studio has improvements around hot restart. I suggest updating and seeing if that fixes the issue. I would suggest reaching out to the Xamarin team and asking for help if this doesn’t work.

  17. For enabling hot restart in Visual Studio 2019 and show “Local Device” :

    Tools –> Options –> Environment –> Preview Features –> Enable Xamarin Hot Restart

  18. Change the device to simulator then try to debug, then it will fail.
    Then change it to local then the error will be gone which worked for me good luck

  19. As far as I can tell there is no longer a free developer account at Apple. This turned me off to doing any development for the iPhone – which, not surprisingly, their marketshare tumbled another 20% in the last few months – now at 10.5 from 14 % globally. They were at 18% this time last year.
    Bad Move Apple. Bad Move. Developers are the key to success with this stuff, when you start milking them, you shoot yourself in the foot. Microsoft is doing the opposite: Free dev tools, free database tools, going more open-source, (don’t have to pay anything as a dev to start and you can even get massive discounts on any of their ActionPacks for developers – with full licensed copies of all their latest stuff including Enterprise versions of Windows Server, SQL Server), etc.
    From Mic Jagger’s tune “Go ahead, bite the big apple, don’t mind the maggots”

  20. Being a writer, this article is a very needful source for me. I think I got all the information which I want to look for a search. This article is very useful for all iOS users.

  21. I don’t have Apple developer subscription. Is this really worth to buy the subscription? I want only to learn Xamarin with iPhone at this point and if things go well then buying subscription would make sense at that point.

    I saw one post, someone saying “it worked…(without payment)” but I don’t see how!

    • I’m sorry, I don’t have an answer for this – as someone who builds for various platforms I’ve paid the money to join their developer program. I know not everyone can afford to do this and it is totally a barrier to entry for some.

  22. I have done everything here and it works until when it successfully build and tried to open the app the app crashes on launch. Anyone experiencing this. Could someone help me.

  23. For me it worked perfectly with VS 2019 Community 16.9.4 but failed to deploy on iPhone with VS 2019 Community Preview 16.10 !

Comments are closed.