Welcome

  • Asynchronous Programming (async and await) with Xamarin.Forms

    You can avoid performance bottlenecks and enhance the overall responsiveness of your application by using asynchronous programming. However, traditional techniques for writing asynchronous applications can be complicated, making them difficult to write, debug, and maintain. A simplified approach, async programming, that leverages asynchronous support in the .NET platforms. The compiler does the difficult work that the developer used to do, and your application retains a logical structure that resembles synchronous code. As a result, you get all the advantages of asynchronous programming with a fraction of the effort.

  • Create a Plugin for Xamarin.Forms

    Xamarin.Forms enables you to share not only your app’s business logic, but also a shared user interface across iOS, Android, and Windows. Using Xamarin.Form’s built-in dependency service, it enables you to get access to the native platform to expose rich functionality unique to the underlying platform. Using the portable class library (PCL), and NuGet, sharing this code is straightforward. In this article I will create a plugin for logging (logger) in Xamarin Forms.

  • Unhandled Exception Handling in iOS, Android and Windows with Xamarin.Forms

    Unhandled exceptions are hard to catch and log, and you must do it to be able to handle the errors in your app. One approach is to use Xamarin.Insights but you always want to be able to just log into a file and then access that file locally.The code below is what we use right now and it has helped us a lot, especially the unobserved task exceptions that are just silent, i.e. they do not crash the app, but you still want to handle the exceptions.

  • Setup Xamarin Insights and HockeyApp

    Xamarin Insights has merged with HockeyApp. HockeyApp adds detailed crash reporting, comprehensive event tracking, and user analytics for your app. Testers can now download and install your application from HockyApp. They can also provide valuable feedback and suggest new features or improvements right from the app. HockyApp provides symbolicated stack traces and environment details and insight of how users are using your app. 

  • Setup User Interface Automation Testing with Xamarin.UI Test

    Xamarin.UITest is a testing framework that enables Automated UI Acceptance Tests written in NUnit to be run against iOS and Android applications. It integrates tightly with Xamarin.iOS and Xamarin.Android projects using Xamarin.Forms. Xamarin.UITest is the Automation Library that allows the NUnit tests to execute on Android and iOS devices. The tests interact with the user interface just as a user would, enter text, tapping buttons, and performing gestures – such as swipes.
    Typically, each UITest is written as a method that is referred to as a test. The class which contains the test is known as a test fixture. The test fixture contains either a single test or logical grouping of tests and is responsible for any setup to make the test run and any cleanup that needs to be peformed when the test finishes. Each test should follow the Arrange-Act-Assert pattern:
    Arrange – The test will setup conditions and initialize things so that the test can be actioned.
    Act – The test will interact with the application, enter text, pushing buttons, and so on.
    Assert – The test examines the results of the actions performed in the Act step to determine correctness. For example, the application may verify that a particular error message is displayed.
    We will also discuss how to use the REPL included with Xamarin.UITest to explore the views on a screen and to automate interactions with the application.
    Requirements
    Xamarin.UITest requires NUnit 2.6.3 or higher. Xamarin.UITest is not compatible with NUnit 3.0.
    Only Android and iOS applications are supported. It is not possible to test Windows Phone applications.
    It is possible to test Android applications with Visual Studio on Windows or Xamarin Studio on Mac OS X. To run an Android test it is necessary to have a .APK file. It is also necessary to have the JDK and the Android SDK installed. In most cases these will be automatically installed by the Xamarin.Android installer.