Introduction
Xamarin.Forms code runs on multiple platforms, each of which has its own filesystem. This means that the process of reading and writing files is most easily done using the native file APIs on each platform. Alternatively, embedded resources are a simpler solution to distribute the data files with an app.
Visual Studio App Center
App Center has multiple services that are most commonly used by mobile developers, where multiple services act as a single integrated product. With the use of a single integrated product, you can build, test, distribute, and monitor your mobile apps, and also implement push notifications.
Support Platforms
- Android
- iOS
- React Native
- UWP
- Xamarin
- macOS
- Cordova
App Center Services
- Build
- Diagnostics (Formerly Crashes)
- Test
- Analytics
- Distribute
- Push Notifications

Errors
Errors happen when a runtime exception occurs from an unexpected event. Errors often do not terminate the app and are handled by a try/catch block. When an exception occurs, the App Center records the details of the error, then the state of the app. The device also automatically generates an error log based on the records. These logs contain valuable information about the error which helps us in fixing the error.
Prerequisites
- Visual Studio 2017(Windows or Mac)
- Visual Studio App Center Account
Setting up a Xamarin.Forms Project
Start by creating a new Xamarin.Forms project. You’ll learn more by going through the steps yourself. Choose the Xamarin.Forms App Project type under Cross-platform/App in the New Project dialog.
Name your app, select “Use Shared Library” for shared code, and target both - Android and iOS.
You probably want your project and solution to use the same name as your app. Put it in your preferred folder for projects and click Create.
You now have a basic Xamarin.Forms app. Click the "Play" button to try it out.
Create an app in the App Center (iOS)
In this step, create an app in the App Center. Go to the following link. Now, sign in using your preferred account.
Add New app
In this step, give your app a name (Ex: MyApp) and a short description.
| OS | iOS |
| Platform | Xamarin |
Afterward, click "Add a new app".
Now, your App Center app is ready. You can use it now.
Setting up the User Interface
Go to MainPage.Xaml and write the following code.
MainPage.xaml
- <?xml version="1.0" encoding="utf-8"?>
- <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:XamarinAppCenter" x:Class="XamarinAppCenter.MainPage">
- <StackLayout>
- <StackLayout HorizontalOptions="Center" VerticalOptions="Start">
- <Image Margin="0,50,0,0" x:Name="imgBanner" Source="banner.png" ></Image>
- <Image Margin="0,0,0,10" x:Name="imgAppCenter" HeightRequest="200" Source="Appcenter.jpg" ></Image>
- <Label Margin="0,0,0,10" Text="App Center Errors" FontAttributes="Bold" FontSize="Large" TextColor="#CA6F1E" HorizontalTextAlignment="Center" ></Label>
- <Button x:Name="btnError" Text="Make Exception" Clicked="btnException_Clicked" />
- </StackLayout>
- </StackLayout>
- </ContentPage>

Join the conversation! Your thoughts help the community grow.