Get Started with iOS in Xamarin in 10 Minutes

Visual Studio for Mac

On Windows? Try the Visual Studio 2017 walkthrough.

Install the Xamarin Live Player App

  1. Download the Xamarin Live Player App to your iOS device:
    Apple Store
    Alternatively, use the Camera app in iOS 11 to scan the following QR code from your device to open the Xamarin Live Player in the App Store:
  2. Make sure that your iOS device and Mac are connected to the same Wi-Fi network.

Let's Get Started

In this walkthrough, you'll pair your iOS device to Visual Studio for Mac. Once your device is paired with the IDE, you'll learn how to use the Live Run Current View feature to display the current XAML page on your device, and will get a chance to edit the XAML and see it appear instantly.

  1. First, download the LiveView sample.
  2. While the sample is downloading, enable the Xamarin Live Player in Visual Studio for Mac. To do this go to Visual Studio > Preferences… and select Projects > Xamarin Live Player (Preview). Then select the Enable Xamarin Live Player checkbox:
  3. Locate the downloaded sample and double-click the .sln file to open it in Visual Studio for Mac:
  4. Pair your iOS device and Visual Studio for Mac. To do this both devices must be on the same Wi-Fi network. Once you have ensured both devices are on the same network, select Tools > Manage Live Player Devices… from the menu bar:
  5. Open the Live Player app on your iOS device:
  6. Press the Pair to Visual Studio button in the Live Player app:

    The app will open a camera viewfinder for you to scan the QR code displayed in the Manage Live Player Devices dialog.
  7. Scan the QR code, or enter the code in Visual Studio for Mac, to complete the pairing process:
  8. Set the device configuration to LiveView.iOS > Debug|iPhone and select your device under Live Player from the configuration list:
  9. From the LiveView Project, double-click MainPage.xaml to open it in the code editor:
  10. To run this XAML page as a live view on your device, select Run > Live Run Current View from the menu bar:
  11. You can now start editing the XAML, and you'll see it appear on your device after a second or so. For example, try any or all of the following, or try your own:
    • Change the Label Text:
      <Label Text="I Love Xamarin.Forms!"
              FontSize="Small"
              VerticalOptions="CenterAndExpand
              HorizontalOptions="CenterAndExpand" />
    • Add a Button:
      <Button Text="Click Me!" TextColor="Olive" />
    • Add a monkey Picker:
      <Picker Title="Select a monkey"        
          VerticalOptions="CenterAndExpand"
          HorizontalOptions="CenterAndExpand">
              <Picker.Items>
                  <x:String>Baboon</x:String>
                  <x:String>Capuchin Monkey</x:String>
                  <x:String>Blue Monkey</x:String>
                  <x:String>Squirrel Monkey</x:String>
                  <x:String>Golden Lion Tamarin</x:String>
                  <x:String>Howler Monkey</x:String>
                  <x:String>Japanese Macaque</x:String>
              </Picker.Items>
      </Picker>
    • Change the Background Color of the StackLayout:
      <StackLayout BackgroundColor="Maroon">
          ...
      </StackLayout>

Next Steps

This first walkthrough is designed to show you how to use Visual Studio for Mac and the Xamarin Live Player to launch a XAML view to your device.

The next step with Xamarin Live Player on iOS is to sign up for the Xamarin Live Player app Alpha Program. It is highly recommended that you sign up for the program. Signing up provides access to the latest up-to-date builds through Apple's TestFlight service, and gives you the oppertunity provide valuable feedback on the future of the product. To sign up, fill in the Alpha Program Agreement.

If you have issues with the Xamarin Live Player, check out the Troubleshooting guide for additional help.

Get Started with iOS in Xamarin in 10 Minutes

Visual Studio 2017

On Mac? Try the Visual Studio for Mac walkthrough.

Install the Xamarin Live Player App

  1. Download the Xamarin Live Player App to your iOS device:
    Apple Store
    Alternatively, use the Camera app in iOS 11 to scan the following QR code from your device to open the Xamarin Live Player in the App Store:
  2. Make sure that your iOS device and Windows machine are connected to the same Wi-Fi network.

Let's Get Started

In this walkthrough, you'll pair your iOS device to Visual Studio 2017. Once your device is paired with the IDE, you'll learn how to use the Live Run Current View feature to display the current XAML page on your device, and will get a chance to edit the XAML and see it appear instantly.

  1. First, download and unzip the LiveView sample.
  2. While the sample is downloading, enable the Xamarin Live Player in Visual Studio 2017. To do this go to Tools> Options > Xamarin > Other. Then select the Enable Xamarin Live Player checkbox:


  3. Open the sample project in Visual Studio by selecting File > Open > Project/Solution…. Locate the downloaded sample and press the Open:


  4. Pair your iOS device and Visual Studio. To do this both devices must be on the same Wi-Fi network. Once you have ensured both devices are on the same network, select Tools > Xamarin Live Player > Manage Devices… from the menu bar:


  5. Open the Live Player app on your iOS device:


  6. Press the Pair to Visual Studio button in the Live Player app:



    The app will open a camera viewfinder for you to scan the QR code displayed in the Manage Live Player Devices dialog.
  7. Scan the QR code, or enter the code in Visual Studio, to complete the pairing process:


  8. Set the device configuration to Debug | iPhone | LiveView.iOS and select your device under Live Player from the configuration list:


  9. From the LiveView Project, double-click MainPage.xaml to open it in the code editor:


  10. To run this XAML page as a live view on your device, select Tools > Xamarin Live Player > Live Run Current View:


  11. You can now start editing the XAML, and you'll see it appear on your device after a second or so. For example, try any or all of the following, or try your own:
    • Change the Label Text:
      <Label Text="I Love Xamarin.Forms!"
              FontSize="Small"
              VerticalOptions="CenterAndExpand
              HorizontalOptions="CenterAndExpand" />
    • Add a Button:
      <Button Text="Click Me!" TextColor="Olive" />
    • Add a monkey Picker:
      <Picker Title="Select a monkey"        
          VerticalOptions="CenterAndExpand"
          HorizontalOptions="CenterAndExpand">
              <Picker.Items>
                  <x:String>Baboon</x:String>
                  <x:String>Capuchin Monkey</x:String>
                  <x:String>Blue Monkey</x:String>
                  <x:String>Squirrel Monkey</x:String>
                  <x:String>Golden Lion Tamarin</x:String>
                  <x:String>Howler Monkey</x:String>
                  <x:String>Japanese Macaque</x:String>
              </Picker.Items>
      </Picker>
    • Change the Background Color of the StackLayout:
      <StackLayout BackgroundColor="Maroon">
          ...
      </StackLayout>

Next Steps

This walkthrough is designed to show you how to use Visual Studio 2017 and the Xamarin Live Player to launch a XAML view to your device.

The next step with Xamarin Live Player on iOS is to sign up for the Xamarin Live Player app Alpha Program. It is highly recommended that you sign up for the program. Signing up provides access to the latest up-to-date builds through Apple's TestFlight service, and gives you the oppertunity provide valuable feedback on the future of the product. To sign up, fill in the Alpha Program Agreement.

If you have issues with the Xamarin Live Player, check out the Troubleshooting guide for additional help.