All we know that Microsoft made xamarin “FREE” for the community edition of Visual Studio. This opens various doors of opportunities for individual developers and small teams.
Xamarin lets you write Android, iOS and Windows mobile Native apps using the shared codebase. It helps .net developers to leverage their C# skills to develop mobile apps. As the “community edition” is free, anyone who is familiar with the “Windows ecosystem”, can easily learn iOS/Android mobile application development.
This is very much helpful for those, who are working with Windows for years. It saves the time of learning a new OS-ecosystem (MAC/Linux) and helps utilize that time for learning mobile application development and it’s a lot easier to learn Mobile application development through Xamarin.
In this tutorial, I will guide you
Jump to your favourite topic
- 1 how to setup xamarin environment on Windows PC and develop and run
- 2 Steps for installing Visual Studio with Xamarin
- 3 Steps for creating a simple “Hello World” application for iOS in Xamarin
- 4 Install application on Device from Xamarin
how to setup xamarin environment on Windows PC and develop and run
a simple “Hello World” iOS app on Windows PC.
Prerequisites for installation steps:
- 1.6 GHz or faster processor
- 1 GB of RAM (1.5 GB if running on a virtual machine)
- 4 GB of available hard disk space 5400 RPM hard disk drive
- DirectX 9-capable video card (1024×768 or higher resolution)
OS Requirements (Any one from Below listed OS)
- Windows 10
- Windows 8.1
- Windows 8
- Windows 7 SP1
- Windows Server 2012 R2
- Windows Server 2012
- Windows Server 2008 R2 SP1
Steps for installing Visual Studio with Xamarin
- Download Visual Studio Free Community Edition from https://www.visualstudio.com/downloads/
- From the setup, please check the C#/Xamarin checkbox as shown in the figure.
- Progress through the setup wizard and wait until the setup is completed.
- That’s it!!! Xamarin is installed on your machine and now you can easily start to develop iOS apps on your windows PC.
Steps for creating a simple “Hello World” application for iOS in Xamarin
- Once the Xamarin is installed, Go to File->New Project in visual studio. There, you can see the option to create iOS apps as shown in the screenshot.
- Select a folder where you want to create the application,Select Blank iphone app, and Click “Create”.
- This will open the “Get Started” screen as shown in the screenshot.
- Right click on the Project in Solution explorer, and click Add=>New Item. This will open the new item dialog box as shown in the screenshot.
- Select “StoryboardViewController” and name it “HelloWorld.cs”.
- Click “Add”
- So, A storyboard, and its controller file will be created.
- Now, we will add a Simple label containing the text “Hello World” to the storyboard.
- In order to modify the storyboard, we need to connect to a MAC PC in the local network.
- Make sure there is a MAC PC in your local network and the latest version of xcode is installed on that.
- Now, click on the “Xamarin Mac Agent” button on Top as shown in the figure. This will list all the MAC PCs which are connected to your computer in a local network.
- Select your MAC from the list and press “Connect”
- This will turn your “Xamarin MAC Agent” icon into green. As shown in the screenshot.
- Now, double click on HelloWorld.storyboard
- Drag and drop a ViewController to the storyboard.
- This will add a ViewController on the storyboard as shown in the figure. In the storyboard, Properties, select the Class Property under the Identity section and Type “HelloWorld” as shown in the screenshot.
- This will link our class to this newly added View.
- From the toolbox Drag and Drop a Label on the View as shown in screenshot.
- Once the label is added, type “Hello World” in properties of the label as shown in the screenshot.
- Now, from the top, select an appropriate simulator and click Debug. This will run your iOS app on the MAC’s simulator.
- That’s it!!! You are ready to go on with your iOS development.
Install application on Device from Xamarin
You can also read a blog on how to install the iOS application to the actual device. If you are facing any difficulty while following these steps and developing iOS app on your windows PC, you can get in touch with a professional iOS app development company that will guide you to developing an app.