Xamarin
The DESK.OneAgent.Xamarin
NuGet package helps with auto-instrumenting Xamarin apps and offers an interface that makes it easy to add manual instrumentation to monitor additional HTTP frameworks or to tag users. The following screenshot shows a monitored Xamarin app in DESK.
Get started
-
In Visual Studio, right-click the main project of your app and select Manage NuGet packages.
-
Search for DESK.OneAgent.Xamarin and install the latest version.
- In DESK, define a new mobile app by going to Deploy DESK > Set up mobile monitoring.
The Instrumentation settings page provides details such as application ID and beacon endpoint.
Configure your app
Follow the steps below to configure your app appropriately.
-
On the Instrumentation page, click Google Android and select the Command line tab.
-
In Visual Studio, create a new file in the Assets folder of your Android project called
DESK.properties
and paste the content from the DESK portal window.
If you have a Forms-based application, update your *.Android.csproj
file by adding a build target that invokes the Android auto-instrumentation.
The easiest way to edit the .csproj
file is to:
- upload the project to Visual Studio,
- and open it directly in Visual Studio.
-
On the Instrumentation page, select Apple iOS and open the Cocoapods tab.
-
Copy the PLIST code snippet into the existing
Info.plist
file in your Visual Studio project.
To prevent OneAgent for mobile from being stripped out of the iOS app as part of optimizations, add a startup call to your app.
Monitor web requests in your Forms project
DESK automatically monitors web requests that are made using the frameworks that are available natively on Android and iOS. If you trigger requests directly from your .NET code, they can be captured only manually by the Mobile Agent. So, we've provided an interface for the commonly used HttpClient framework that allows you to set up request instrumentation with a single line of code. All other types of requests have to be instrumented differently.
Crash reporting
Crashes are reported automatically. DESK doesn't support .pdb
files. Symbolication is only available based on Proguard mapping files or iOS dSYM files.