├── .assets ├── sentry-nuget.png └── sentry-wordmark-dark-280x84.png ├── .craft.yml ├── .gitattributes ├── .github ├── after_01.png ├── after_02.png ├── before_01.png ├── before_02.png ├── device_info.png ├── device_info_02.png ├── sample │ ├── android_phone.png │ ├── android_wear.png │ ├── ios.png │ └── uwp.png ├── setup_droid.png ├── setup_ios.png └── workflows │ ├── add-platform-label.yml │ ├── build.yaml │ ├── danger.yml │ └── release.yml ├── .gitignore ├── CHANGELOG.md ├── Directory.Build.props ├── README.md ├── Samples ├── Forms │ └── com.sentry.ovenlibrary │ │ ├── AndroidProject │ │ ├── .gitignore │ │ ├── OvenLibrary │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── consumer-rules.pro │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── cpp │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── native-lib.cpp │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── sentry │ │ │ │ └── ovenlibrary │ │ │ │ └── Oven.java │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ ├── gradle-wrapper.properties │ │ │ │ └── gradlewrappergradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ │ ├── Jars │ │ └── OvenLibrary.aar │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── Transforms │ │ ├── EnumFields.xml │ │ ├── EnumMethods.xml │ │ └── Metadata.xml │ │ ├── com.sentry.ovenlibrary.GeneratedMSBuildEditorConfig.editorconfig │ │ └── com.sentry.ovenlibrary.csproj ├── README.md ├── Sample.Xamarin.Core │ ├── App.xaml │ ├── App.xaml.cs │ ├── AssemblyInfo.cs │ ├── Behaviors │ │ ├── BehaviorBase.cs │ │ └── EventToCommandBehavior.cs │ ├── CustomControls │ │ ├── EditorValidation.xaml │ │ ├── EditorValidation.xaml.cs │ │ ├── EntryValidation.xaml │ │ └── EntryValidation.xaml.cs │ ├── Directory.Build.props │ ├── Extensions │ │ └── SentryIdExtensions.cs │ ├── Interfaces │ │ ├── INativeCrash.cs │ │ └── NavigationService.cs │ ├── Resources │ │ ├── BrokenSvg.xaml │ │ ├── BrokenSvg.xaml.cs │ │ ├── BugSvg.xaml │ │ ├── BugSvg.xaml.cs │ │ ├── DiscoSvg.xaml │ │ ├── DiscoSvg.xaml.cs │ │ ├── FeedbackSvg.xaml │ │ ├── FeedbackSvg.xaml.cs │ │ ├── PopupSvg.xaml │ │ ├── PopupSvg.xaml.cs │ │ ├── UnhandledSvg.xaml │ │ └── UnhandledSvg.xaml.cs │ ├── Rules │ │ └── ExtendedBindableObject.cs │ ├── Sample.Xamarin.Core.csproj │ ├── Services │ │ └── AuthService.cs │ ├── ViewModels │ │ ├── DiscoPageViewModel.cs │ │ ├── LoginPageViewModel.cs │ │ ├── MainPageViewModel.cs │ │ └── Popups │ │ │ ├── AboutPagePopupPageViewModel.cs │ │ │ └── UserFeedbackPopupPageViewModel.cs │ ├── Views │ │ ├── DiscoPage.xaml │ │ ├── DiscoPage.xaml.cs │ │ ├── LoginPage.xaml │ │ ├── LoginPage.xaml.cs │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ └── Popups │ │ │ ├── AboutPopupPage.xaml │ │ │ ├── AboutPopupPage.xaml.cs │ │ │ ├── PaymentPopupPage.xaml │ │ │ ├── PaymentPopupPage.xaml.cs │ │ │ ├── UserFeedbackPopupPage.xaml │ │ │ └── UserFeedbackPopupPage.xaml.cs │ ├── XamlPageWithIssue.xaml │ └── XamlPageWithIssue.xaml.cs ├── Sample.Xamarin.Droid │ ├── Assets │ │ └── AboutAssets.txt │ ├── Dependencies │ │ └── NativeCrash.cs │ ├── Directory.Build.props │ ├── MainActivity.cs │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.cs │ ├── Resources │ │ ├── AboutResources.txt │ │ ├── drawable-hdpi │ │ │ └── splashscreen_img.jpg │ │ ├── drawable-mdpi │ │ │ └── splashscreen_img.jpg │ │ ├── drawable-xhdpi │ │ │ └── splashscreen_img.jpg │ │ ├── drawable-xxhdpi │ │ │ └── splashscreen_img.jpg │ │ ├── drawable-xxxhdpi │ │ │ └── splashscreen_img.jpg │ │ ├── drawable │ │ │ ├── disco_light.gif │ │ │ ├── login_background_logo.png │ │ │ └── login_background_top.png │ │ ├── layout │ │ │ ├── Tabbar.xml │ │ │ └── Toolbar.xml │ │ ├── mipmap-anydpi-v26 │ │ │ ├── icon.xml │ │ │ └── icon_round.xml │ │ ├── mipmap-hdpi │ │ │ ├── icon.png │ │ │ └── launcher_foreground.png │ │ ├── mipmap-mdpi │ │ │ ├── icon.png │ │ │ └── launcher_foreground.png │ │ ├── mipmap-xhdpi │ │ │ ├── icon.png │ │ │ └── launcher_foreground.png │ │ ├── mipmap-xxhdpi │ │ │ ├── icon.png │ │ │ └── launcher_foreground.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── icon.png │ │ │ └── launcher_foreground.png │ │ └── values │ │ │ ├── colors.xml │ │ │ └── styles.xml │ ├── Sample.Xamarin.Droid.csproj │ └── SplashActivity.cs ├── Sample.Xamarin.Mac │ ├── AppDelegate.cs │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── AppIcon-128.png │ │ │ ├── AppIcon-128@2x.png │ │ │ ├── AppIcon-16.png │ │ │ ├── AppIcon-16@2x.png │ │ │ ├── AppIcon-256.png │ │ │ ├── AppIcon-256@2x.png │ │ │ ├── AppIcon-32.png │ │ │ ├── AppIcon-32@2x.png │ │ │ ├── AppIcon-512.png │ │ │ ├── AppIcon-512@2x.png │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Directory.Build.props │ ├── Entitlements.plist │ ├── Info.plist │ ├── Main.cs │ ├── Main.storyboard │ ├── Sample.Xamarin.Mac.csproj │ ├── SampleView.cs │ ├── SampleViewController.cs │ ├── SampleWindow.cs │ └── SampleWindowController.cs ├── Sample.Xamarin.UWP │ ├── App.xaml │ ├── App.xaml.cs │ ├── Assets │ │ ├── LockScreenLogo.scale-200.png │ │ ├── SplashScreen.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── StoreLogo.png │ │ ├── Wide310x150Logo.scale-200.png │ │ └── sentry-glyph-light-48x48.png │ ├── Directory.Build.props │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── Package.appxmanifest │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml │ ├── Sample.Xamarin.UWP.GeneratedMSBuildEditorConfig.editorconfig │ ├── Sample.Xamarin.UWP.csproj │ ├── disco_light.gif │ ├── login_background_logo.png │ └── login_background_top.png └── Sample.Xamarin.iOS │ ├── AppDelegate.cs │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon1024.png │ │ ├── Icon120.png │ │ ├── Icon152.png │ │ ├── Icon167.png │ │ ├── Icon180.png │ │ ├── Icon20.png │ │ ├── Icon29.png │ │ ├── Icon40.png │ │ ├── Icon58.png │ │ ├── Icon60.png │ │ ├── Icon76.png │ │ ├── Icon80.png │ │ └── Icon87.png │ ├── Dependencies │ └── NativeCrash.cs │ ├── Directory.Build.props │ ├── Entitlements.plist │ ├── Info.plist │ ├── Main.cs │ ├── PrivacyInfo.xcprivacy │ ├── Properties │ └── AssemblyInfo.cs │ ├── Resources │ ├── Default-568h@2x.png │ ├── Default-Portrait.png │ ├── Default-Portrait@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── LaunchScreen.storyboard │ ├── disco_light.gif │ ├── login_background_logo.png │ └── login_background_top.png │ ├── Sample.Xamarin.iOS.GeneratedMSBuildEditorConfig.editorconfig │ └── Sample.Xamarin.iOS.csproj ├── Sentry.Xamarin-CI-Build-Windows.slnf ├── Sentry.Xamarin-CI-Build-macOS.slnf ├── Sentry.Xamarin.sln ├── Src ├── Directory.Build.props ├── Sentry.Xamarin.Forms │ ├── Extensibility │ │ └── DisabledNavigationPage.cs │ ├── Extensions │ │ ├── PageExtensions.cs │ │ ├── SentryXamarinFormsIntegrationExtensions.cs │ │ └── SentryXamarinOptionsExtensions.cs │ ├── Internals │ │ ├── FormsApplicationListener.cs │ │ ├── FormsNavigationIntegration.cs │ │ ├── PageInfo.cs │ │ └── SentryXamarinFormsIntegration.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── Sentry.Xamarin.Forms.csproj └── Sentry.Xamarin │ ├── Extensions │ ├── IHubExtensions.cs │ ├── SentryXamarinOptionsExtensions.cs │ └── StringExtensions.cs │ ├── Internals │ ├── Device │ │ └── Screenshot │ │ │ ├── ScreenshotAttachment.cs │ │ │ └── ScreenshotAttachmentContent.cs │ ├── DeviceModel.ios.cs │ ├── DeviceModel.mac.cs │ ├── IPageNavigationTracker.cs │ ├── NativeEventProcessor.droid.cs │ ├── NativeEventProcessor.ios.cs │ ├── NativeEventProcessor.mac.cs │ ├── NativeEventProcessor.uwp.cs │ ├── NativeExceptionProcessor.ios.cs │ ├── NativeExceptionProcessor.mac.cs │ ├── NativeIntegration.droid.cs │ ├── NativeIntegration.ios.cs │ ├── NativeIntegration.mac.cs │ ├── NativeIntegration.uwp.cs │ ├── NativeStackTraceFactory.ios.mac.cs │ ├── SentryAndroidHelpers.droid.cs │ ├── Session │ │ ├── DeviceActiveLogger.droid.cs │ │ ├── DeviceActiveLogger.ios.uwp.cs │ │ └── IDeviceActiveLogger.cs │ └── XamarinEventProcessor.cs │ ├── Privacy │ └── SentryPrivacyInfo.xcprivacy │ ├── Properties │ └── AssemblyInfo.cs │ ├── Sentry.Xamarin.csproj │ ├── SentryXamarin.cs │ ├── SentryXamarinOptions.cs │ └── buildTransitive │ └── Sentry.Xamarin.targets ├── Tests ├── Sentry.Xamarin.Forms.Testing │ ├── ExpectedOSNames.cs │ ├── Mock │ │ ├── MockDiagnosticLogger.cs │ │ └── MockHub.cs │ └── Sentry.Xamarin.Forms.Testing.csproj ├── Sentry.Xamarin.Forms.UWP.Tests │ ├── Assets │ │ ├── LockScreenLogo.scale-200.png │ │ ├── SplashScreen.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── StoreLogo.png │ │ └── Wide310x150Logo.scale-200.png │ ├── Extensions │ │ └── SentryXamarinOptionsExtensionsTests.cs │ ├── Internals │ │ ├── FormsApplicationListenerTests.cs │ │ ├── NativeEventProcessorTests.cs │ │ ├── NativeIntegrationTests.cs │ │ └── XamarinEventProcessorTests.cs │ ├── Package.appxmanifest │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml │ ├── Sentry.Xamarin.Forms.Tests.UWP.GeneratedMSBuildEditorConfig.editorconfig │ ├── Sentry.Xamarin.Forms.UWP.Tests.GeneratedMSBuildEditorConfig.editorconfig │ ├── Sentry.Xamarin.Forms.UWP.Tests.csproj │ ├── SentryXamarinIntegrationTests.cs │ ├── UnitTestApp.xaml │ └── UnitTestApp.xaml.cs └── Sentry.Xamarin.Tests │ ├── Extensions │ ├── IHubExtensionsTests.cs │ └── SentryXamarinOptionsExtensionsTests.cs │ └── Sentry.Xamarin.Tests.csproj ├── dangerfile.js └── scripts ├── bump-version.ps1 ├── bump-version.sh └── install-win-sdk.ps1 /.assets/sentry-nuget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/.assets/sentry-nuget.png -------------------------------------------------------------------------------- /.assets/sentry-wordmark-dark-280x84.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/.assets/sentry-wordmark-dark-280x84.png -------------------------------------------------------------------------------- /.craft.yml: -------------------------------------------------------------------------------- 1 | minVersion: 0.23.1 2 | changelogPolicy: auto 3 | targets: 4 | - name: nuget 5 | - name: github 6 | - name: registry 7 | sdks: 8 | nuget:Sentry.Xamarin: 9 | nuget:Sentry.Xamarin.Forms: 10 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.github/after_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/.github/after_01.png -------------------------------------------------------------------------------- /.github/after_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/.github/after_02.png -------------------------------------------------------------------------------- /.github/before_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/.github/before_01.png -------------------------------------------------------------------------------- /.github/before_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/.github/before_02.png -------------------------------------------------------------------------------- /.github/device_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/.github/device_info.png -------------------------------------------------------------------------------- /.github/device_info_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/.github/device_info_02.png -------------------------------------------------------------------------------- /.github/sample/android_phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/.github/sample/android_phone.png -------------------------------------------------------------------------------- /.github/sample/android_wear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/.github/sample/android_wear.png -------------------------------------------------------------------------------- /.github/sample/ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/.github/sample/ios.png -------------------------------------------------------------------------------- /.github/sample/uwp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/.github/sample/uwp.png -------------------------------------------------------------------------------- /.github/setup_droid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/.github/setup_droid.png -------------------------------------------------------------------------------- /.github/setup_ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/.github/setup_ios.png -------------------------------------------------------------------------------- /.github/workflows/add-platform-label.yml: -------------------------------------------------------------------------------- 1 | name: Add Platform Label 2 | on: 3 | issues: 4 | types: [opened] 5 | pull_request: 6 | types: [opened] 7 | 8 | jobs: 9 | add_label: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | issues: write 13 | steps: 14 | - uses: andymckay/labeler@1.0.4 15 | with: 16 | add-labels: "Platform: Xamarin" 17 | repo-token: ${{ secrets.GITHUB_TOKEN }} 18 | -------------------------------------------------------------------------------- /.github/workflows/build.yaml: -------------------------------------------------------------------------------- 1 | name: build 2 | on: 3 | push: 4 | tags: 5 | - 'v*.*.*' 6 | branches: 7 | - main 8 | - release/* 9 | 10 | pull_request: 11 | jobs: 12 | build: 13 | name: ${{ matrix.os }} 14 | runs-on: ${{ matrix.os }} 15 | 16 | strategy: 17 | fail-fast: false 18 | matrix: 19 | os: [windows-latest, macos-13] 20 | steps: 21 | - uses: actions/checkout@v4 22 | - uses: microsoft/setup-msbuild@v1.1 23 | if: startsWith(matrix.os, 'windows') 24 | # By default, the latest Windows machine doesn't come with the 16299 SDK installed, 25 | # which is required for building the UWP platform. 26 | - name: Install Windows SDK Version 10.0.16299.0 27 | run: 28 | pwsh ./scripts/install-win-sdk.ps1 16299 29 | if: startsWith(matrix.os, 'windows') 30 | 31 | # Setup Xamarin SDK that got removed on the latest MacOS VM 32 | - name: Setup Xamarin MacOS SDK 33 | if: startsWith(matrix.os, 'macos') 34 | run: | 35 | brew tap homebrew/cask-versions 36 | brew install --cask xamarin-mac 37 | - name: Setup Xamarin Android SDK 38 | if: startsWith(matrix.os, 'macos') 39 | run: brew install --cask xamarin-android 40 | - name: Setup Xamarin iOS SDK 41 | if: startsWith(matrix.os, 'macos') 42 | run: brew install --cask xamarin-ios 43 | 44 | - name: Setup Java SDK 45 | uses: actions/setup-java@v4 46 | with: 47 | distribution: 'temurin' 48 | java-version: '17' 49 | 50 | - name: Setup Android SDK 51 | uses: android-actions/setup-android@07976c6290703d34c16d382cb36445f98bb43b1f # v3.2.0 52 | with: 53 | packages: 'platforms;android-30' 54 | 55 | - run: msbuild Sentry.Xamarin.sln -p:Configuration=Release -t:restore 56 | - name: Build SDK, Sample and Tests 57 | run: msbuild Sentry.Xamarin-CI-Build-${{ runner.os }}.slnf -p:Configuration=Release 58 | 59 | - name: Setup VS Test 60 | uses: darenm/Setup-VSTest@v1 61 | if: startsWith(matrix.os, 'windows') 62 | - name: Artifacts 63 | uses: actions/upload-artifact@v3 64 | with: 65 | name: ${{ github.sha }} 66 | path: | 67 | ${{ github.workspace }}/src/**/Release/*.nupkg 68 | -------------------------------------------------------------------------------- /.github/workflows/danger.yml: -------------------------------------------------------------------------------- 1 | name: "Danger" 2 | on: 3 | pull_request: 4 | types: [opened, synchronize, reopened, edited, ready_for_review] 5 | 6 | jobs: 7 | build: 8 | name: Changelog 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v3 12 | with: 13 | fetch-depth: 0 14 | - run: npx danger ci 15 | env: 16 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 17 | 18 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | version: 7 | description: Version to release 8 | required: true 9 | force: 10 | description: Force a release even when there are release-blockers (optional) 11 | required: false 12 | 13 | jobs: 14 | job_release: 15 | runs-on: ubuntu-latest 16 | name: 'Release a new version: ${{ github.event.inputs.version }}' 17 | steps: 18 | - name: Get auth token 19 | id: token 20 | uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0 21 | with: 22 | app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} 23 | private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} 24 | 25 | - name: Check out current commit (${{ github.sha }}) 26 | uses: actions/checkout@v4 27 | with: 28 | token: ${{ steps.token.outputs.token }} 29 | fetch-depth: 0 30 | 31 | - name: Prepare release ${{ github.event.inputs.version }} 32 | uses: getsentry/action-prepare-release@v1 33 | env: 34 | GITHUB_TOKEN: ${{ steps.token.outputs.token }} 35 | with: 36 | version: ${{ github.event.inputs.version }} 37 | force: ${{ github.event.inputs.force }} 38 | -------------------------------------------------------------------------------- /Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2.1.0 5 | latest 6 | true 7 | true 8 | strict 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/AndroidProject/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/AndroidProject/OvenLibrary/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/AndroidProject/OvenLibrary/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.library' 3 | } 4 | 5 | android { 6 | compileSdkVersion 30 7 | buildToolsVersion "30.0.3" 8 | 9 | defaultConfig { 10 | minSdkVersion 16 11 | targetSdkVersion 30 12 | versionCode 1 13 | versionName "1.0" 14 | 15 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 16 | consumerProguardFiles "consumer-rules.pro" 17 | externalNativeBuild { 18 | cmake { 19 | cppFlags "" 20 | } 21 | } 22 | } 23 | 24 | buildTypes { 25 | release { 26 | minifyEnabled false 27 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 28 | } 29 | } 30 | compileOptions { 31 | sourceCompatibility JavaVersion.VERSION_1_8 32 | targetCompatibility JavaVersion.VERSION_1_8 33 | } 34 | externalNativeBuild { 35 | cmake { 36 | path "src/main/cpp/CMakeLists.txt" 37 | version "3.10.2" 38 | } 39 | } 40 | ndkVersion '21.1.6352462' 41 | } 42 | 43 | dependencies { 44 | implementation 'androidx.appcompat:appcompat:1.2.0' 45 | implementation 'com.google.android.material:material:1.3.0' 46 | testImplementation 'junit:junit:4.+' 47 | androidTestImplementation 'androidx.test.ext:junit:1.1.2' 48 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' 49 | } 50 | -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/AndroidProject/OvenLibrary/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/Samples/Forms/com.sentry.ovenlibrary/AndroidProject/OvenLibrary/consumer-rules.pro -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/AndroidProject/OvenLibrary/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/AndroidProject/OvenLibrary/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/AndroidProject/OvenLibrary/src/main/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10.2) 2 | 3 | project("OvenLibrary") 4 | 5 | add_library( 6 | native-lib 7 | SHARED 8 | native-lib.cpp ) 9 | 10 | 11 | find_library( # Sets the name of the path variable. 12 | log-lib 13 | log ) 14 | 15 | target_link_libraries( # Specifies the target library. 16 | native-lib 17 | ${log-lib} ) -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/AndroidProject/OvenLibrary/src/main/cpp/native-lib.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | extern "C" JNIEXPORT jstring JNICALL Java_com_sentry_ovenlibrary_Oven_Cook( JNIEnv * env, jobject obj) { 6 | std::string hello = "Hello from C++"; 7 | char *ptr = 0; 8 | *ptr += 1; 9 | return env->NewStringUTF(hello.c_str()); 10 | } -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/AndroidProject/OvenLibrary/src/main/java/com/sentry/ovenlibrary/Oven.java: -------------------------------------------------------------------------------- 1 | package com.sentry.ovenlibrary; 2 | 3 | public class Oven { 4 | static { 5 | System.loadLibrary("native-lib"); 6 | } 7 | 8 | public native String Cook(); 9 | } 10 | -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/AndroidProject/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath "com.android.tools.build:gradle:4.1.2" 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | task clean(type: Delete) { 23 | delete rootProject.buildDir 24 | } -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/AndroidProject/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/AndroidProject/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/Samples/Forms/com.sentry.ovenlibrary/AndroidProject/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/AndroidProject/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/AndroidProject/gradle/wrapper/gradlewrappergradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip 2 | -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/AndroidProject/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':OvenLibrary' 2 | rootProject.name = "Oven" -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/Jars/OvenLibrary.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-xamarin/4a198aaa0a519ca766eb13304940402d9716c453/Samples/Forms/com.sentry.ovenlibrary/Jars/OvenLibrary.aar -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Android.App; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("com.sentry.ovenlibrary")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("com.sentry.ovenlibrary")] 14 | [assembly: AssemblyCopyright("Copyright © 2021")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ComVisible(false)] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | [assembly: AssemblyVersion("1.0.0.0")] 26 | [assembly: AssemblyFileVersion("1.0.0.0")] 27 | -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/Transforms/EnumFields.xml: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/Transforms/EnumMethods.xml: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/Transforms/Metadata.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/com.sentry.ovenlibrary.GeneratedMSBuildEditorConfig.editorconfig: -------------------------------------------------------------------------------- 1 | is_global = true 2 | build_property.TargetFramework = 3 | build_property.TargetPlatformMinVersion = 4 | build_property.UsingMicrosoftNETSdkWeb = 5 | build_property.ProjectTypeGuids = {10368E6C-D01B-4462-8E8B-01FC667A7035};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 6 | build_property.PublishSingleFile = 7 | build_property.IncludeAllContentForSelfExtract = 8 | build_property._SupportedPlatformList = 9 | -------------------------------------------------------------------------------- /Samples/Forms/com.sentry.ovenlibrary/com.sentry.ovenlibrary.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {4DA5AECE-3A16-45AE-9C6D-45B262236175} 9 | {10368E6C-D01B-4462-8E8B-01FC667A7035};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | {77efb91c-a7e9-4b0e-a7c5-31eeec3c6d46} 11 | Library 12 | Properties 13 | com.sentry.ovenlibrary 14 | com.sentry.ovenlibrary 15 | 512 16 | True 17 | v9.0 18 | class-parse 19 | XAJavaInterop1 20 | PackageReference 21 | 22 | 23 | true 24 | portable 25 | false 26 | bin\Debug\ 27 | DEBUG;TRACE 28 | prompt 29 | 4 30 | 31 | 32 | portable 33 | true 34 | bin\Release\ 35 | TRACE 36 | prompt 37 | 4 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 66 | -------------------------------------------------------------------------------- /Samples/README.md: -------------------------------------------------------------------------------- 1 | ### Sample Xamarin.Forms app for iOS, Android and Windows 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |

Android Wear

Android Phone/Tablet

UWP

iOS

18 |
19 |
20 | 21 | ## Requirements: 22 | - Microsoft Visual Studio 2019 (Windows) 23 | - Microsoft Visual Studio for Mac (Mac) 24 | - Windows 10 1809 or higher (for UWP) 25 | 26 | ## About 27 | 28 | This demo demonstrates a complete working app where the main features of Sentry are shown. Those are: 29 | - Error Capturing. 30 | - Unhandled Error Capture. 31 | - Breadcrumbs 32 | - User Feedback. 33 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/App.xaml: -------------------------------------------------------------------------------- 1 |  2 | 5 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using Sample.Xamarin.Core.Views; 2 | using Xamarin.Forms; 3 | 4 | namespace Sample.Xamarin.Core 5 | { 6 | public partial class App : Application 7 | { 8 | public App() 9 | { 10 | InitializeComponent(); 11 | MainPage = new LoginPage(); 12 | } 13 | 14 | protected override void OnStart() 15 | { 16 | base.OnStart(); 17 | } 18 | protected override void OnSleep() 19 | { 20 | base.OnSleep(); 21 | } 22 | protected override void OnResume() 23 | { 24 | base.OnResume(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms.Xaml; 2 | 3 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)] -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Behaviors/BehaviorBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace Sample.Xamarin.Core.Behaviors 5 | { 6 | public class BehaviorBase : Behavior where T : BindableObject 7 | { 8 | public T AssociatedObject { get; private set; } 9 | 10 | protected override void OnAttachedTo(T bindable) 11 | { 12 | base.OnAttachedTo(bindable); 13 | AssociatedObject = bindable; 14 | 15 | if (bindable.BindingContext != null) 16 | { 17 | BindingContext = bindable.BindingContext; 18 | } 19 | 20 | bindable.BindingContextChanged += OnBindingContextChanged; 21 | } 22 | 23 | protected override void OnDetachingFrom(T bindable) 24 | { 25 | base.OnDetachingFrom(bindable); 26 | bindable.BindingContextChanged -= OnBindingContextChanged; 27 | AssociatedObject = null; 28 | } 29 | 30 | void OnBindingContextChanged(object sender, EventArgs e) 31 | { 32 | OnBindingContextChanged(); 33 | } 34 | 35 | protected override void OnBindingContextChanged() 36 | { 37 | base.OnBindingContextChanged(); 38 | BindingContext = AssociatedObject.BindingContext; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/CustomControls/EditorValidation.xaml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 7 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/CustomControls/EntryValidation.xaml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Extensions/SentryIdExtensions.cs: -------------------------------------------------------------------------------- 1 | using Sentry; 2 | using System; 3 | //Based on https://github.com/csharpvitamins/CSharpVitamins.ShortGuid 4 | 5 | namespace Sample.Xamarin.Core.Extensions 6 | { 7 | public static class SentryIdExtensions 8 | { 9 | public static string GetShortId(this SentryId id) 10 | { 11 | if (id.Equals(SentryId.Empty)) 12 | { 13 | return null; 14 | } 15 | string encoded = Convert.ToBase64String(((Guid)id).ToByteArray()); 16 | 17 | encoded = encoded 18 | .Replace("/", "_") 19 | .Replace("+", "-"); 20 | 21 | return encoded.Substring(0, 16); 22 | 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Interfaces/INativeCrash.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Sample.Xamarin.Core.Interfaces 6 | { 7 | public interface INativeCrash 8 | { 9 | void BrokenNativeCallback(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Interfaces/NavigationService.cs: -------------------------------------------------------------------------------- 1 | using Rg.Plugins.Popup.Pages; 2 | using Rg.Plugins.Popup.Services; 3 | using Sample.Xamarin.Core.Rules; 4 | using System.Collections.Generic; 5 | using System.Threading.Tasks; 6 | using Xamarin.Forms; 7 | 8 | namespace Sample.Xamarin.Core.Interfaces 9 | { 10 | /// 11 | /// Simple navigation service that hides the direct access to the MainPage for navigation, but also, 12 | /// simplifies passing argument to viewmodels. 13 | /// 14 | public class NavigationService : ExtendedBindableObject 15 | { 16 | public static Task DisplayAlert(string title, string message, string cancel) 17 | => Application.Current.MainPage.DisplayAlert(title, message, cancel); 18 | 19 | public static void ReplacePage(Page page) 20 | { 21 | Application.Current.MainPage = page; 22 | } 23 | 24 | public static void NavigateTo(Page page) 25 | { 26 | Application.Current.MainPage.Navigation.PushAsync(page); 27 | } 28 | 29 | public static Task ShowPopup(PopupPage popup) 30 | => PopupNavigation.Instance.PushAsync(popup); 31 | 32 | public static async Task ShowPopup(PopupPage popup, NavigationService viewModel, Dictionary parameters) 33 | { 34 | await PopupNavigation.Instance.PushAsync(popup); 35 | popup.BindingContext = viewModel; 36 | viewModel.Initialize(parameters); 37 | } 38 | 39 | public static Task ClosePopup() 40 | => PopupNavigation.Instance.PopAsync(); 41 | 42 | public virtual void Initialize(Dictionary parameters) { } 43 | } 44 | } -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Resources/BrokenSvg.xaml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 7 | 16 | 17 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Resources/BrokenSvg.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | using Xamarin.Forms.Xaml; 3 | 4 | namespace Sample.Xamarin.Core.Resources 5 | { 6 | [XamlCompilation(XamlCompilationOptions.Compile)] 7 | public partial class BrokenSvg : ContentView 8 | { 9 | public BrokenSvg() 10 | { 11 | InitializeComponent(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Resources/BugSvg.xaml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Resources/BugSvg.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | using Xamarin.Forms; 8 | using Xamarin.Forms.Xaml; 9 | 10 | namespace Sample.Xamarin.Core.Resources 11 | { 12 | [XamlCompilation(XamlCompilationOptions.Compile)] 13 | public partial class BugSvg : ContentView 14 | { 15 | public BugSvg() 16 | { 17 | InitializeComponent(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Resources/DiscoSvg.xaml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Resources/DiscoSvg.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | using Xamarin.Forms; 8 | using Xamarin.Forms.Xaml; 9 | 10 | namespace Sample.Xamarin.Core.Resources 11 | { 12 | [XamlCompilation(XamlCompilationOptions.Compile)] 13 | public partial class DiscoSvg : ContentView 14 | { 15 | public DiscoSvg() 16 | { 17 | InitializeComponent(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Resources/FeedbackSvg.xaml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Resources/FeedbackSvg.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | using Xamarin.Forms; 8 | using Xamarin.Forms.Xaml; 9 | 10 | namespace Sample.Xamarin.Core.Resources 11 | { 12 | [XamlCompilation(XamlCompilationOptions.Compile)] 13 | public partial class FeedbackSvg : ContentView 14 | { 15 | public FeedbackSvg() 16 | { 17 | InitializeComponent(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Resources/PopupSvg.xaml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 16 | 17 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Resources/PopupSvg.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | using Xamarin.Forms.Xaml; 3 | 4 | namespace Sample.Xamarin.Core.Resources 5 | { 6 | [XamlCompilation(XamlCompilationOptions.Compile)] 7 | public partial class PopupSvg : ContentView 8 | { 9 | public PopupSvg() 10 | { 11 | InitializeComponent(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Resources/UnhandledSvg.xaml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Resources/UnhandledSvg.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | using Xamarin.Forms.Xaml; 3 | 4 | namespace Sample.Xamarin.Core.Resources 5 | { 6 | [XamlCompilation(XamlCompilationOptions.Compile)] 7 | public partial class UnhandledSvg : ContentView 8 | { 9 | public UnhandledSvg() 10 | { 11 | InitializeComponent(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Rules/ExtendedBindableObject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq.Expressions; 3 | using System.Reflection; 4 | using Xamarin.Forms; 5 | 6 | namespace Sample.Xamarin.Core.Rules 7 | { 8 | public class ExtendedBindableObject : BindableObject 9 | { 10 | public void RaisePropertyChanged(Expression> property) 11 | { 12 | var name = GetMemberInfo(property).Name; 13 | OnPropertyChanged(name); 14 | } 15 | 16 | private MemberInfo GetMemberInfo(Expression expression) 17 | { 18 | MemberExpression operand; 19 | LambdaExpression lambdaExpression = (LambdaExpression)expression; 20 | if (lambdaExpression.Body is UnaryExpression) 21 | { 22 | UnaryExpression body = (UnaryExpression)lambdaExpression.Body; 23 | operand = (MemberExpression)body.Operand; 24 | } 25 | else 26 | { 27 | operand = (MemberExpression)lambdaExpression.Body; 28 | } 29 | return operand.Member; 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Services/AuthService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sample.Xamarin.Core.Services 4 | { 5 | public class AuthService 6 | { 7 | public Tuple Authenticate(string login, string password) 8 | => login == password && password == "1234" ? new Tuple(true, null) : 9 | new Tuple(false, "Invalid Login or Password."); 10 | 11 | public void DoLogin(string login, string password) 12 | { 13 | ValidatePassword(login, password); 14 | } 15 | 16 | private bool ValidatePassword(string user, string password) 17 | { 18 | var validation = int.Parse(password) / user.Length; 19 | string notExpected = user; 20 | return validation != int.Parse(notExpected); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/ViewModels/DiscoPageViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Sample.Xamarin.Core.ViewModels 6 | { 7 | class DiscoPageViewModel 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/ViewModels/LoginPageViewModel.cs: -------------------------------------------------------------------------------- 1 | using Sentry.Protocol; 2 | using Sample.Xamarin.Core.Interfaces; 3 | using Sample.Xamarin.Core.Services; 4 | using Sample.Xamarin.Core.Views; 5 | using System; 6 | using Xamarin.Forms; 7 | using Sentry; 8 | 9 | namespace Sample.Xamarin.Core.ViewModels 10 | { 11 | public class LoginPageViewModel : NavigationService 12 | { 13 | private readonly AuthService _authService; 14 | public string Login { get; set; } 15 | public string Password { get; set; } 16 | public Command LoginCmd { get; } 17 | 18 | public LoginPageViewModel() 19 | { 20 | LoginCmd = new Command(LoginAction); 21 | _authService = new AuthService(); 22 | } 23 | 24 | internal Action LoginAction => async () => 25 | { 26 | SentrySdk.AddBreadcrumb("Login", "ui.click", level: BreadcrumbLevel.Info); 27 | var authenticate = _authService.Authenticate(Login, Password); 28 | if (authenticate.Item1) 29 | { 30 | ReplacePage(new NavigationPage(new MainPage()) 31 | { 32 | BarBackgroundColor = Color.FromRgb(46, 14, 51) 33 | }); 34 | } 35 | else 36 | { 37 | SentrySdk.AddBreadcrumb(authenticate.Item2, "console", level: BreadcrumbLevel.Warning); 38 | await DisplayAlert("warning", authenticate.Item2, "OK"); 39 | } 40 | }; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/ViewModels/MainPageViewModel.cs: -------------------------------------------------------------------------------- 1 | using Sample.Xamarin.Core.Interfaces; 2 | using Sample.Xamarin.Core.Services; 3 | using Sample.Xamarin.Core.ViewModels.Popups; 4 | using Sample.Xamarin.Core.Views; 5 | using Sample.Xamarin.Core.Views.Popups; 6 | using System; 7 | using System.Collections.Generic; 8 | using Xamarin.Forms; 9 | using Sentry; 10 | 11 | namespace Sample.Xamarin.Core.ViewModels 12 | { 13 | public class MainPageViewModel : NavigationService 14 | { 15 | private readonly INativeCrash _nativeCrashService; 16 | public Command FeedbackCmd {get;} 17 | public Command HandledCmd { get; } 18 | public Command UnhandledCmd { get; } 19 | public Command DiscoCmd { get; } 20 | public Command PopupCmd { get; } 21 | public Command BrokenViewCmd { get; } 22 | public Command NativeCrashCmd { get; } 23 | public MainPageViewModel() 24 | { 25 | DiscoCmd = new Command(GotoDisco); 26 | PopupCmd = new Command(ShowAboutPopup); 27 | HandledCmd = new Command(DoLogin); 28 | UnhandledCmd = new Command(Unhandle); 29 | BrokenViewCmd = new Command(GotoBrokenView); 30 | FeedbackCmd = new Command(ShowFeedback); 31 | NativeCrashCmd = new Command(NativeCrash); 32 | _nativeCrashService = DependencyService.Get(); 33 | } 34 | 35 | private Action GotoDisco => () => 36 | { 37 | NavigateTo(new DiscoPage()); 38 | }; 39 | 40 | private Action GotoBrokenView => () => 41 | { 42 | NavigateTo(new XamlPageWithIssue()); 43 | }; 44 | 45 | private Action ShowAboutPopup => async () => 46 | { 47 | await ShowPopup(new AboutPopupPage()); 48 | }; 49 | 50 | private Action ShowFeedback => async () => 51 | { 52 | var lastEventId = SentrySdk.LastEventId; 53 | if (!lastEventId.Equals(SentryId.Empty)) 54 | { 55 | await ShowPopup(new UserFeedbackPopupPage(), new UserFeedbackPopupPageViewModel(), new Dictionary { { "SentryId", lastEventId } }); 56 | } 57 | else 58 | { 59 | _ = DisplayAlert("Well", "Nothing broke so there's no need to give feedbacks...", "OK"); 60 | } 61 | }; 62 | 63 | private Action DoLogin => () => 64 | { 65 | try 66 | { 67 | var authService = new AuthService(); 68 | authService.DoLogin("admin", "1234"); 69 | } 70 | catch(Exception ex) 71 | { 72 | SentrySdk.CaptureException(ex); 73 | DisplayAlert("Whoops", "A handled exception happened", "OK"); 74 | } 75 | }; 76 | 77 | private Action Unhandle => () => 78 | { 79 | var authService = new AuthService(); 80 | authService.DoLogin("admin", "1234"); 81 | }; 82 | 83 | private Action NativeCrash => () => 84 | { 85 | _nativeCrashService?.BrokenNativeCallback(); 86 | DisplayAlert("Whoops", "A native crash sample wasn't implemented for this platform, mind opening a pull request? :)", "Yes"); 87 | }; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/ViewModels/Popups/AboutPagePopupPageViewModel.cs: -------------------------------------------------------------------------------- 1 | using Sentry.Protocol; 2 | using Sample.Xamarin.Core.Interfaces; 3 | using Sample.Xamarin.Core.Views.Popups; 4 | using System; 5 | using Xamarin.Essentials; 6 | using Xamarin.Forms; 7 | using Browser = Xamarin.Essentials.Browser; 8 | using Sentry; 9 | 10 | namespace Sample.Xamarin.Core.ViewModels.Popups 11 | { 12 | public class AboutPagePopupPageViewModel : NavigationService 13 | { 14 | public Command PluginGithubCmd { get; } 15 | public Command BuyCmd { get; } 16 | 17 | public AboutPagePopupPageViewModel() 18 | { 19 | PluginGithubCmd = new Command(PluginGithub); 20 | BuyCmd = new Command(Buy); 21 | } 22 | 23 | private Action PluginGithub => async () => 24 | { 25 | SentrySdk.AddBreadcrumb("plugin github", "ui.click", level: BreadcrumbLevel.Info); 26 | try 27 | { 28 | await Browser.OpenAsync(new Uri("https://github.com/rotorgames/Rg.Plugins.Popup"), BrowserLaunchMode.SystemPreferred); 29 | } 30 | catch (Exception ex) 31 | { 32 | SentrySdk.CaptureException(ex); 33 | } 34 | }; 35 | 36 | private Action Buy => () => 37 | { 38 | SentrySdk.AddBreadcrumb("buy", "ui.click", level: BreadcrumbLevel.Info); 39 | ShowPopup(new PaymentPopupPage()); 40 | }; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Samples/Sample.Xamarin.Core/Views/DiscoPage.xaml: -------------------------------------------------------------------------------- 1 |  2 | 7 | 8 | 10 | 14 | 15 |