Cross Platform Programming With Visual Studio 2015 and Xamarin

Make your impression in the app development world

Have you been tempted to get into cross platform programming with Visual Studio 2015? You can do so with very little software investment. Does this mean that you will need to make a significant investment in hardware? That answer gets a Yes and No. If you are a Windows user, and you probably are if your desired dev platform is Visual Studio, you will need a device with iOS installed. Of course, as a Windows user, you can develop for Windows Phone and Android with no additional hardware or software cost.

Required Software

Let’s take a look at my desired development software and the hardware that has been chosen. I use Visual Studio 2015 Community Edition with Xamarin installed. Xamarin is now a free offering since it is owned by Microsoft. As long as your company can be classified as a small business according to Microsoft standards, Visual Studio Community and Xamarin are free for cross platform programming and distribution purposes. See the screenshot below for my Xamarin configuration.

 

You will still need to sign up for a Xamarin account in order to proceed, but there is no additional cost based on your small business status. If your desire is to use Xamarin for iOS app development, and you are a Windows developer, the hardware cost can be prohibitive. For instance, I purchased a refurbished Macbook Pro with SSD for less than $1k from NewEgg (see below for the config). Since the requirement seems to be only an iOS device on your network, it is probably possible cut that cost by about 80% and use a Macbook Air.

 

I have a tip for you when setting up your Mac – make sure that you have explicitly followed the install instructions on the Xamarin site. I read through the Macintosh requirements section and skipped over steps 2 and 3. Multiple attempts to connect Visual Studio to the Mac failed. After downloading Xamarin studio to the Mac along with the iOS SDK, the connection completed quickly and easily.

Distributing iOS Apps

One other expense that you will need to incur if deploying iOS apps of any type – an Apple Developer account. This will add another $99 recurring annual cost to your development budget. This is definitely something that cannot be skipped! Is this expense worth it? Well, there are a small minority of people who have developed a simple app that sells millions of copies at 99 cents per. You could be one of those few with a popular and unique idea that takes off and makes millions.

So far, you have set up Visual Studio 2015, Xamarin and your iOS device. It sounds like we are ready to get into our first cross platform programming app. This is nothing flashy. As a matter of fact, there is no coding required for creating and testing this first app. In Visual Studio, click on File and then New Project. You will have many options and languages to choose from. If you are using Xamarin, your only language choice is Visual C#. Below that option, you should choose Cross-Platform and the Xamarin.Forms.Portable Blank App.

Testing Your App

Did I mention that there is no coding required to complete this test? If you have installed the Visual Studio Android emulation, you can immediately test this app in the Android emulator on your Windows machine. Likewise, if you installed the emulations for Windows and Windows Phone, you can test those without much effort. Just set the desired project as the default project and run on the desired emulator (green button with dropdown, generally at the top of Visual Studio).

 

If you see the simple message “Welcome to Xamarin Forms,” you are fully operational. Why didn’t I mention that you are fully operational on iOS? You may be, and then again, you may have mismatched version issues between Visual Studio and the iOS machine. After performing a manual update in Visual Studio (Tools-Options-Xamarin-Other-Check Now) and upgrading Xamarin Studio on the Mac (Xamarin Studio Community-Check For Updates), I was able to verify the operation of my new app on iOS. See below for both Update screenshots.

 

Now that the versions are properly matched up, I am ready for many cross platform programming projects to be delivered across many Windows, Android and iOS versions. The screenshot below shows the iPhone5s as it was triggered on the MacBook Pro by Visual Studio on my Windows machine.