Sentry.Xamarin
2.1.0
Prefix Reserved
dotnet add package Sentry.Xamarin --version 2.1.0
NuGet\Install-Package Sentry.Xamarin -Version 2.1.0
<PackageReference Include="Sentry.Xamarin" Version="2.1.0" />
paket add Sentry.Xamarin --version 2.1.0
#r "nuget: Sentry.Xamarin, 2.1.0"
// Install Sentry.Xamarin as a Cake Addin #addin nuget:?package=Sentry.Xamarin&version=2.1.0 // Install Sentry.Xamarin as a Cake Tool #tool nuget:?package=Sentry.Xamarin&version=2.1.0
Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us, check out our open positions.
Sentry SDK for Xamarin
Integrations | Downloads | NuGet Stable | NuGet Preview |
---|---|---|---|
Sentry.Xamarin.Forms | |||
Sentry.Xamarin |
Sentry.Xamarin is the tool to go for Xamarin that enriches your errors with valuable data, like breadcrumbs, tags, issue grouping and more!.
Includes for all Platforms supported by Xamarin Essentials:
- Automatic Navigation breacrumbs. (Xamarin.Forms)
- Xaml warnings as breadcrumbs. (Xamarin.Forms)
- Simulator flag.
- Device manufacturer.
- Device model.
- Operational system name and version.
- Screen information (Pixel density and resolution).
- Connectivity status.
Additionaly, Android and IOS will include additional information:
- Free Internal memory (Android/iOS).
- Total RAM (Android/iOS).
- CPU model (Android).
BEFORE
AFTER
Setup
All you need to do is to initialize Xamarin integration by calling SentryXamarin.Init, and, it's recommended to start Sentry Xamarin SDK as early as possible, for an example, the start of OnCreate on MainActivity for Android, and, the top of FinishedLaunching on AppDelegate for iOS)
SentryXamarin.Init(options =>
{
options.Dsn = "__YOUR__DSN__";
options.AddXamarinFormsIntegration();
});
If your app uses Xamarin.Forms you can also use the package Sentry.Xamarin.Forms and initialize the SDK with additional line options.AddXamarinFormsIntegration()
.
Android
On your MainActivity
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
SentryXamarin.Init(options =>
{
options.Dsn = "__YOUR__DSN__";
options.AddXamarinFormsIntegration();
});
...
iOS
On AppDelegate.cs
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
SentryXamarin.Init(options =>
{
options.Dsn = "__YOUR__DSN__";
options.AddXamarinFormsIntegration();
});
...
UWP
On App.Xaml.cs
sealed partial class App : Application
{
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
SentryXamarin.Init(options =>
{
options.Dsn = "__YOUR__DSN__";
options.AddXamarinFormsIntegration();
});
...
Compatibility
The package requires the following versions or newer:
- Tizen 4.0 (for Tizen)
- Xamarin.Android 11.0 (for Android)
- Xamarin.iOS 10.14 (for iOS)
- Universal Windows Platform 10.0.16299 (for UWP)
- Xamarin.Forms 4.6.0.726 (for Xamarin.Forms integration)
- Xamarin.Essentials 1.4.0
- Sentry 4.0.3
Resources
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. monoandroid11.0 is compatible. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap10.0.16299 is compatible. |
Xamarin.iOS | xamarinios was computed. xamarinios10 is compatible. |
Xamarin.Mac | xamarinmac was computed. xamarinmac20 is compatible. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Sentry (>= 4.5.0)
- Xamarin.Essentials (>= 1.6.1)
-
MonoAndroid 11.0
- Sentry (>= 4.5.0)
- Sentry.Android.AssemblyReader (>= 4.5.0)
- Xamarin.Essentials (>= 1.6.1)
-
UAP 10.0.16299
- Microsoft.NETCore.UniversalWindowsPlatform (>= 6.2.9)
- Sentry (>= 4.5.0)
- Xamarin.Essentials (>= 1.6.1)
-
Xamarin.iOS 1.0
- Sentry (>= 4.5.0)
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.4)
- Xamarin.Essentials (>= 1.6.1)
-
Xamarin.Mac 2.0
- Sentry (>= 4.5.0)
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.4)
- Xamarin.Essentials (>= 1.6.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Sentry.Xamarin:
Package | Downloads |
---|---|
Sentry.Xamarin.Forms
Official Sentry SDK for Xamarin Forms - Open-source error tracking that helps developers monitor and fix crashes in real time. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.1.0 | 13,348 | 5/1/2024 |
2.0.0 | 8,873 | 2/11/2024 |
2.0.0-beta.1 | 398 | 12/18/2023 |
1.5.2 | 19,666 | 6/26/2023 |
1.5.1 | 10,571 | 2/6/2023 |
1.5.0 | 12,652 | 2/1/2023 |
1.4.6 | 1,519 | 1/24/2023 |
1.4.5 | 8,667 | 12/6/2022 |
1.4.4 | 6,964 | 11/4/2022 |
1.4.3 | 2,740 | 10/10/2022 |
1.4.2 | 20,089 | 8/5/2022 |
1.4.1 | 17,407 | 5/9/2022 |
1.4.0 | 3,634 | 4/12/2022 |
1.3.2 | 15,655 | 1/18/2022 |
1.3.1 | 13,453 | 9/11/2021 |
1.3.0 | 643 | 9/9/2021 |
1.2.0 | 4,478 | 7/21/2021 |
1.1.0 | 4,443 | 6/18/2021 |
1.0.3 | 8,492 | 3/4/2021 |
1.0.2 | 919 | 2/14/2021 |
1.0.1 | 2,034 | 2/2/2021 |
1.0.0 | 583 | 1/29/2021 |
1.0.0-alpha.4 | 444 | 1/10/2021 |
Changes since version 2.0.0
Fixes:
- Validate PrivacyInfo.xcprivacy and warn users of required missing privacy parameters ([#152](https://github.com/getsentry/sentry-xamarin/pull/152))
Due to a requirement by apple, all Projects will require a ([Privacy Manifest file](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files)). Sentry will automatically patch your project with the required fields by Sentry if no privacy manifest file is provided. Otherwise, it will validate your privacy manifest file for the required fields by Sentry and warn you during the build time if the required keys are present or not when building an iOS project.
Below you can find a snippet of the minimum required privacy manifest required by Sentry Xamarin:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeCrashData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypePerformanceData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeOtherDiagnosticData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
</array>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
</array>
</dict>
</plist>
```
Dependencies:
- Bump Sentry.NET 4.5.0 ([#154](https://github.com/getsentry/sentry-xamarin/pull/154))
-->
See full changelog at https://github.com/getsentry/sentry-xamarin/blob/main/CHANGELOG.md