├── .clang-format ├── .codecov.yml ├── .craft.yml ├── .git-blame-ignore-revs ├── .gitattributes ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug.yml │ ├── config.yml │ ├── feature.yml │ ├── flaky-test.yml │ └── maintainer-blank.yml ├── actions │ ├── add-microphone-permissions │ │ └── action.yml │ └── capture-screenshot │ │ └── action.yml ├── dependabot.yml ├── file-filters.yml ├── labeler.yml ├── last-release-runid ├── pull_request_template.md └── workflows │ ├── api-stability.yml │ ├── auto-update-tools.yml │ ├── benchmarking.yml │ ├── build.yml │ ├── changes-in-high-risk-code.yml │ ├── codeql-analysis.yml │ ├── danger.yml │ ├── integration-test.yml │ ├── lint-clang-formatting.yml │ ├── lint-dprint.yml │ ├── lint-shellcheck.yml │ ├── lint-swift-formatting.yml │ ├── lint.yml │ ├── release-comment-issues.yml │ ├── release.yml │ ├── test-cross-platform.yml │ ├── test.yml │ ├── testflight.yml │ ├── ui-tests-critical.yml │ ├── ui-tests.yml │ └── version-bump-util.yml ├── .gitignore ├── .gitmodules ├── .nvmrc ├── .oclint ├── .pre-commit-config.yaml ├── .ruby-version ├── .sauce └── benchmarking-config.yml ├── .slather.yml ├── .spi.yml ├── .swiftlint.yml ├── .vscode └── extensions.json ├── Brewfile ├── Brewfile-ci-build ├── Brewfile-ci-deploy ├── Brewfile-ci-format ├── Brewfile-ci-test ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Gemfile ├── Gemfile.lock ├── LICENSE.md ├── MIGRATION.md ├── Makefile ├── Package.swift ├── Plans ├── SentrySwiftUI_Base.xctestplan ├── Sentry_Base.xctestplan ├── SwiftUITestSample_Base.xctestplan ├── iOS-Benchmarking_Base.xctestplan ├── iOS-Cocoapods-Swift6_Base.xctestplan ├── iOS-ObjectiveC_Base.xctestplan ├── iOS-Swift6_Base.xctestplan ├── iOS-SwiftUI_Base.xctestplan ├── iOS-Swift_Base.xctestplan ├── iOS13-Swift_Base.xctestplan ├── macOS-SwiftUI_Base.xctestplan ├── macOS-Swift_Base.xctestplan ├── tvOS-SBSwift_Base.xctestplan └── tvOS-Swift_Base.xctestplan ├── README.md ├── Samples ├── .swiftlint.yml ├── Carthage-Validation │ ├── README.md │ └── XCFramework │ │ ├── Cartfile │ │ ├── XCFramework.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ └── XCFramework │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ │ ├── Base.lproj │ │ └── LaunchScreen.storyboard │ │ ├── CheckTracedView.swift │ │ ├── ContentView.swift │ │ ├── Info.plist │ │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ │ └── SceneDelegate.swift ├── README.md ├── SPM-Dynamic │ ├── .gitignore │ ├── Package.swift │ └── Sources │ │ └── SPM-Dynamic │ │ └── main.swift ├── SampleAssets.xcassets │ ├── AppIcon.appiconset │ │ ├── 100.png │ │ ├── 1024.png │ │ ├── 114.png │ │ ├── 120.png │ │ ├── 128 1.png │ │ ├── 144.png │ │ ├── 152.png │ │ ├── 16 1.png │ │ ├── 167.png │ │ ├── 180.png │ │ ├── 20.png │ │ ├── 256 1.png │ │ ├── 256 2.png │ │ ├── 29.png │ │ ├── 32 1.png │ │ ├── 32 2.png │ │ ├── 40.png │ │ ├── 50.png │ │ ├── 512 1.png │ │ ├── 512 2.png │ │ ├── 57.png │ │ ├── 58.png │ │ ├── 60.png │ │ ├── 64.png │ │ ├── 72.png │ │ ├── 76.png │ │ ├── 80.png │ │ ├── 87.png │ │ └── Contents.json │ └── Contents.json ├── SentrySampleShared │ ├── SentrySampleShared.xcconfig │ ├── SentrySampleShared.yml │ └── SentrySampleShared │ │ ├── AssertView.swift │ │ ├── DSNStorage.swift │ │ ├── EnvironmentVariableTableViewCell.swift │ │ ├── FeaturesViewController.swift │ │ ├── GitInjections.swift │ │ ├── Info.plist │ │ ├── LaunchArgumentTableViewCell.swift │ │ ├── LoremIpsum.txt │ │ ├── LoremIpsumText.swift │ │ ├── RaiseNSExceptionInLayoutNSView.swift │ │ ├── RandomErrors.swift │ │ ├── SentrySDKOverrides.swift │ │ ├── SentrySDKWrapper.swift │ │ ├── SpanExtension.swift │ │ ├── SpanObserver.swift │ │ ├── UIAssert.swift │ │ ├── UIViewControllerExtension.swift │ │ ├── UIViewExtension.swift │ │ └── screenshot.png ├── SessionReplay-CameraTest │ ├── SessionReplay-CameraTest.xcconfig │ ├── SessionReplay-CameraTest.yml │ └── Sources │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── PreviewView.swift │ │ ├── SceneDelegate.swift │ │ ├── SessionReplay-CameraTest.entitlements │ │ └── ViewController.swift ├── Shared │ ├── AssertView.swift │ ├── Config │ │ ├── Architectures.xcconfig │ │ ├── AssetCatalog.xcconfig │ │ ├── BuildOptions.xcconfig │ │ ├── ClangAnalyzer.xcconfig │ │ ├── ClangCppLanguage.xcconfig │ │ ├── ClangLanguage.xcconfig │ │ ├── ClangModules.xcconfig │ │ ├── ClangObjCLanguage.xcconfig │ │ ├── ClangPreprocessing.xcconfig │ │ ├── ClangWarnings.xcconfig │ │ ├── ClangWarningsCpp.xcconfig │ │ ├── ClangWarningsObjC.xcconfig │ │ ├── CodeGeneration.xcconfig │ │ ├── Deployment.xcconfig │ │ ├── Linking.xcconfig │ │ ├── Localization.xcconfig │ │ ├── Metal.xcconfig │ │ ├── Packaging.xcconfig │ │ ├── SearchPaths.xcconfig │ │ ├── Signing.xcconfig │ │ ├── Swift.xcconfig │ │ └── Versioning.xcconfig │ ├── SampleAssets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── 100.png │ │ │ ├── 1024 1.png │ │ │ ├── 1024 2.png │ │ │ ├── 1024.png │ │ │ ├── 114.png │ │ │ ├── 120.png │ │ │ ├── 128 1.png │ │ │ ├── 144.png │ │ │ ├── 152.png │ │ │ ├── 16 1.png │ │ │ ├── 167.png │ │ │ ├── 180.png │ │ │ ├── 20.png │ │ │ ├── 256 1.png │ │ │ ├── 256 2.png │ │ │ ├── 29.png │ │ │ ├── 32 1.png │ │ │ ├── 32 2.png │ │ │ ├── 40.png │ │ │ ├── 50.png │ │ │ ├── 512 1.png │ │ │ ├── 512 2.png │ │ │ ├── 57.png │ │ │ ├── 58.png │ │ │ ├── 60.png │ │ │ ├── 64.png │ │ │ ├── 72.png │ │ │ ├── 76.png │ │ │ ├── 80.png │ │ │ ├── 87.png │ │ │ └── Contents.json │ │ └── Contents.json │ ├── feature-flags.yml │ ├── inject-git-info.sh │ └── reset-git-info.sh ├── iOS-Cocoapods-Swift6 │ ├── Podfile │ ├── Sources │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ ├── AccentColor.colorset │ │ │ │ └── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── SceneDelegate.swift │ │ └── ViewController.swift │ ├── UITests │ │ └── UITestsLaunchTests.swift │ ├── fastlane │ │ ├── .gitignore │ │ └── Fastfile │ └── iOS-Cocoapods-Swift6.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── xcschemes │ │ └── App.xcscheme ├── iOS-ObjectiveC │ ├── iOS-ObjectiveC-UITests.xcconfig │ ├── iOS-ObjectiveC-UITests │ │ ├── Info.plist │ │ └── LaunchUITests.swift │ ├── iOS-ObjectiveC.xcconfig │ ├── iOS-ObjectiveC.yml │ └── iOS-ObjectiveC │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── InitializerViewController.h │ │ ├── InitializerViewController.m │ │ ├── NoARCCrash.h │ │ ├── NoARCCrash.m │ │ ├── Tongariro.jpg │ │ ├── ViewController.h │ │ ├── ViewController.m │ │ ├── iOS-ObjectiveC.entitlements │ │ └── main.m ├── iOS-Swift │ ├── iOS-Benchmarking.xcconfig │ ├── iOS-Benchmarking │ │ ├── Info.plist │ │ ├── SentryProcessInfo.h │ │ ├── SentryProcessInfo.m │ │ └── SentrySDKPerformanceBenchmarkTests.m │ ├── iOS-Swift-UITests.xcconfig │ ├── iOS-Swift-UITests │ │ ├── BaseUITest.swift │ │ ├── Info.plist │ │ ├── LaunchUITests.swift │ │ ├── ProfilingUITests.swift │ │ ├── TopViewControllerTests.swift │ │ ├── UIEventBreadcrumbTests.swift │ │ ├── UITestHelpers.swift │ │ ├── UserFeedbackUITests.swift │ │ └── ViewLifecycleUITests.swift │ ├── iOS-Swift.xcconfig │ ├── iOS-Swift.yml │ ├── iOS-Swift │ │ ├── AppDelegate.swift │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── ErrorsViewController.swift │ │ ├── ExtraViewController.swift │ │ ├── Info.plist │ │ ├── Profiling │ │ │ ├── BenchmarkingViewController.swift │ │ │ ├── NSObject+SentryAppSetup.h │ │ │ ├── NSObject+SentryAppSetup.m │ │ │ ├── ProfilingCPUWork.swift │ │ │ ├── ProfilingNetworkScanner.swift │ │ │ └── ProfilingViewController.swift │ │ ├── Sample.xcconfig │ │ ├── SentryData.xcdatamodeld │ │ │ └── Person.xcdatamodel │ │ │ │ └── contents │ │ ├── Tongariro.jpg │ │ ├── Tools │ │ │ ├── DSNDisplayViewController.swift │ │ │ ├── DiskWriteException.swift │ │ │ ├── MetricKitManager.swift │ │ │ ├── SentryBenchmarking.h │ │ │ ├── SentryBenchmarking.mm │ │ │ ├── SentryExposure.h │ │ │ ├── Toasts.swift │ │ │ ├── TopViewControllerInspector.swift │ │ │ ├── TriggerAppHang.swift │ │ │ └── iOS-Swift-Bridging-Header.h │ │ ├── TransactionsViewController.swift │ │ ├── ViewControllers │ │ │ ├── CoreDataViewController.swift │ │ │ ├── InfoForBreadcrumbController.swift │ │ │ ├── LoremIpsumViewController.swift │ │ │ ├── NibViewController.swift │ │ │ ├── NibViewController.xib │ │ │ ├── PageViewController.swift │ │ │ ├── PermissionsViewController.swift │ │ │ ├── ReplaceContentViewController.swift │ │ │ ├── SRRedactSampleViewController.swift │ │ │ ├── SplitViewController.swift │ │ │ ├── TableViewController.swift │ │ │ ├── TableViewController.xib │ │ │ ├── TraceTestViewController.swift │ │ │ ├── UIEventBreadcrumbsController.swift │ │ │ ├── ViewLifecycleTestViewController.swift │ │ │ └── WebViewController.swift │ │ └── iOS-Swift.entitlements │ ├── iOS-SwiftClip.xcconfig │ └── iOS-SwiftClip │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ ├── 100.png │ │ │ ├── 1024.png │ │ │ ├── 114.png │ │ │ ├── 120.png │ │ │ ├── 128.png │ │ │ ├── 144.png │ │ │ ├── 152.png │ │ │ ├── 16.png │ │ │ ├── 167.png │ │ │ ├── 180.png │ │ │ ├── 20.png │ │ │ ├── 256.png │ │ │ ├── 29.png │ │ │ ├── 32.png │ │ │ ├── 40.png │ │ │ ├── 50.png │ │ │ ├── 512.png │ │ │ ├── 57.png │ │ │ ├── 58.png │ │ │ ├── 60.png │ │ │ ├── 64.png │ │ │ ├── 72.png │ │ │ ├── 76.png │ │ │ ├── 80.png │ │ │ ├── 87.png │ │ │ └── Contents.json │ │ └── Contents.json │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── SceneDelegate.swift │ │ ├── ViewController.swift │ │ └── iOS_SwiftClip.entitlements ├── iOS-Swift6 │ ├── iOS-Swift6-UITests.xcconfig │ ├── iOS-Swift6-UITests │ │ ├── Info.plist │ │ └── UITests.swift │ ├── iOS-Swift6.xcconfig │ ├── iOS-Swift6.yml │ └── iOS-Swift6 │ │ ├── AppDelegate.swift │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── SceneDelegate.swift │ │ ├── ViewController.swift │ │ └── iOS-Swift6.entitlements ├── iOS-SwiftUI │ ├── iOS-SwiftUI-UITests.xcconfig │ ├── iOS-SwiftUI-UITests │ │ ├── Info.plist │ │ └── LaunchUITests.swift │ ├── iOS-SwiftUI.xcconfig │ ├── iOS-SwiftUI.yml │ └── iOS-SwiftUI │ │ ├── ContentView.swift │ │ ├── FormScreen.swift │ │ ├── Info.plist │ │ ├── LoremIpsumView.swift │ │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ │ ├── SwiftUIApp.swift │ │ ├── TestHeaders │ │ ├── SentryDefines.h │ │ ├── SentrySpanProtocol.h │ │ └── SentrySpanStatus.h │ │ ├── UIKitScreen.swift │ │ ├── bridging-headers.h │ │ └── iOS-SwiftUI.entitlements ├── iOS13-Swift-UITests.xcconfig ├── iOS13-Swift-UITests │ └── Info.plist ├── iOS13-Swift.xcconfig ├── iOS13-Swift.yml ├── iOS13-Swift │ ├── iOS13-Swift-UITests.xcconfig │ ├── iOS13-Swift-UITests │ │ ├── Info.plist │ │ └── LaunchUITest.swift │ ├── iOS13-Swift.xcconfig │ ├── iOS13-Swift.yml │ └── iOS13-Swift │ │ ├── AppDelegate.swift │ │ ├── Base.lproj │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── MainViewController.swift │ │ ├── SceneDelegate.swift │ │ ├── SwiftUIView.swift │ │ ├── SwiftUIViewController.swift │ │ ├── iOS13-Swift-Bridging-Header.h │ │ └── iOS13-Swift.entitlements ├── iOS15-SwiftUI │ ├── iOS15-SwiftUI.xcconfig │ ├── iOS15-SwiftUI.yml │ └── iOS15-SwiftUI │ │ ├── App.swift │ │ ├── ContentView.swift │ │ ├── Info.plist │ │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ │ └── iOS15-SwiftUI.entitlements ├── macOS-SPM-CommandLine │ ├── .gitignore │ ├── Package.swift │ └── Sources │ │ └── macOS-SPM-CommandLine │ │ └── main.swift ├── macOS-Swift │ ├── Shared │ │ ├── AppDelegate.swift │ │ ├── Base.lproj │ │ │ └── Main.storyboard │ │ ├── CppSample.cpp │ │ ├── CppSample.hpp │ │ ├── CppWrapper.h │ │ ├── CppWrapper.mm │ │ ├── DiskWriteException.swift │ │ ├── Info.plist │ │ ├── MetadataViewController.swift │ │ ├── NSObject+SentryAppSetup.h │ │ ├── NSObject+SentryAppSetup.m │ │ ├── RaiseNSExceptionInLayoutNSView.swift │ │ ├── SwiftUIView.swift │ │ ├── Tongariro.jpg │ │ ├── ViewController.swift │ │ ├── macOS-Swift-Bridging-Header.h │ │ ├── macOS-Swift-Other.entitlements │ │ ├── macOS-Swift-Sandboxed-Other.entitlements │ │ ├── macOS-Swift-Sandboxed.entitlements │ │ ├── macOS-Swift.entitlements │ │ └── macOS-Swift.xcconfig │ ├── macOS-Swift-Other.xcconfig │ ├── macOS-Swift-Sandboxed-Other.xcconfig │ ├── macOS-Swift-Sandboxed.xcconfig │ ├── macOS-Swift-UITests.xcconfig │ ├── macOS-Swift-UITests │ │ └── MacOSSwiftUITests.swift │ ├── macOS-Swift.xcconfig │ └── macOS-Swift.yml ├── macOS-SwiftUI │ ├── Info.plist │ ├── macOS-SwiftUI.xcconfig │ ├── macOS-SwiftUI.yml │ └── macOS-SwiftUI │ │ ├── ContentView.swift │ │ ├── Info.plist │ │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ │ ├── macOS-SwiftUI.entitlements │ │ └── macOS_SwiftUIApp.swift ├── tvOS-Swift │ ├── tvOS-SBSwift-UITests.xcconfig │ ├── tvOS-SBSwift-UITests │ │ ├── Info.plist │ │ └── LaunchUITests.swift │ ├── tvOS-SBSwift.xcconfig │ ├── tvOS-SBSwift │ │ ├── ActionCell.swift │ │ ├── AppDelegate.swift │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Controllers │ │ │ ├── NibViewController.swift │ │ │ ├── NibViewController.xib │ │ │ ├── SplitViewController.swift │ │ │ └── TableViewController.swift │ │ ├── Info.plist │ │ ├── ViewController.swift │ │ └── tvOS-SBSwift.entitlements │ ├── tvOS-Swift-UITests.xcconfig │ ├── tvOS-Swift-UITests │ │ ├── Info.plist │ │ └── LaunchUITests.swift │ ├── tvOS-Swift.xcconfig │ ├── tvOS-Swift.yml │ └── tvOS-Swift │ │ ├── AppDelegate.swift │ │ ├── Base.lproj │ │ └── LaunchScreen.storyboard │ │ ├── ContentView.swift │ │ ├── Info.plist │ │ ├── Tongariro.jpg │ │ └── tvOS-Swift.entitlements ├── visionOS-Swift │ ├── visionOS-Swift.xcconfig │ ├── visionOS-Swift.yml │ └── visionOS-Swift │ │ ├── ContentView.swift │ │ ├── Info.plist │ │ ├── LoremIpsumView.swift │ │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ │ ├── VisionOSSwiftApp.swift │ │ └── visionOS-Swift.entitlements └── watchOS-Swift │ ├── .gitignore │ ├── watchOS-Swift WatchKit App │ ├── Base.lproj │ │ └── Interface.storyboard │ ├── Info.plist │ └── watchOS-Swift-App.entitlements │ ├── watchOS-Swift WatchKit Extension │ ├── ContentView.swift │ ├── ExtensionDelegate.swift │ ├── HostingController.swift │ ├── Info.plist │ ├── NotificationController.swift │ ├── NotificationView.swift │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── PushNotificationPayload.apns │ ├── Tongariro.jpg │ └── watchOS-Swift-Extension.entitlements │ ├── watchOS-Swift-App.xcconfig │ ├── watchOS-Swift-Extension.xcconfig │ └── watchOS-Swift.yml ├── Sentry.podspec ├── Sentry.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ ├── xcbaselines │ └── 63AA76641EB8CB2F00D153DE.xcbaseline │ │ ├── 1C0AB51E-7DAD-4469-8384-B6DE6A8E9023.plist │ │ ├── 4487886E-B920-4AB1-99BD-1A9C5128C731.plist │ │ ├── 734957D5-EC2A-41E1-84D3-2BE9489FD8B7.plist │ │ ├── CDA9A446-D798-4C4E-82D8-B6EE1CCA283B.plist │ │ └── Info.plist │ └── xcschemes │ ├── Sentry.xcscheme │ └── SentrySwiftUI.xcscheme ├── Sentry.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ ├── IDEWorkspaceChecks.plist │ └── WorkspaceSettings.xcsettings ├── SentryPrivate.podspec ├── SentrySwiftUI.podspec ├── SentryTestUtils ├── .swiftlint.yml ├── ArrayAccesses.swift ├── BreadcrumbExtension.swift ├── ClearTestState.swift ├── Dynamic │ ├── Dynamic.swift │ ├── Invocation.swift │ ├── Logger.swift │ └── TypeMapping.swift ├── Invocations.swift ├── SentryFileManager+Test.h ├── SentryHub+Test.h ├── SentryLaunchProfiling+Tests.h ├── SentryLogExtensions.swift ├── SentryProfilerMocks.h ├── SentryProfilerMocks.mm ├── SentryProfilerMocksSwiftCompatible.h ├── SentryProfilerMocksSwiftCompatible.mm ├── SentryTestUtils-ObjC-BridgingHeader.h ├── TestClient.swift ├── TestConstants.swift ├── TestCurrentDateProvider.swift ├── TestDebugImageProvider.swift ├── TestDispatchFactory.swift ├── TestDispatchSourceWrapper.swift ├── TestDisplayLinkWrapper.swift ├── TestFileManager.swift ├── TestFramesTracker.swift ├── TestHub.swift ├── TestNSNotificationCenterWrapper.swift ├── TestOptions.swift ├── TestRandom.swift ├── TestSentryDispatchQueueWrapper.swift ├── TestSentryNSProcessInfoWrapper.swift ├── TestSentryNSTimerFactory.swift ├── TestSentrySystemWrapper.swift ├── TestTransport.swift ├── TestTransportAdapter.swift ├── TimeInterval+Sentry.swift └── WeakReference.swift ├── SentryTestUtilsDynamic ├── ExternalUIViewController.swift └── SentryTestUtilsDynamic.h ├── SentryTestUtilsTests ├── Info.plist ├── TestConstantTests.swift ├── TestCurrentDateProviderTests.swift ├── TestDispatchFactoryTests.swift └── TestFileManagerTests.swift ├── SentryTests-Info.plist ├── Sources ├── Configuration │ ├── DeploymentTargets.xcconfig │ ├── SDK.xcconfig │ ├── Sentry.xcconfig │ ├── SentrySwiftUI.xcconfig │ └── Versioning.xcconfig ├── Resources │ ├── Info.plist │ ├── PrivacyInfo.xcprivacy │ ├── Sentry.modulemap │ ├── SentryWithoutUIKit.modulemap │ └── ThreadSanitizer.sup ├── Sentry │ ├── NSArray+SentrySanitize.m │ ├── NSLocale+Sentry.m │ ├── NSMutableDictionary+Sentry.m │ ├── PrivateSentrySDKOnly.mm │ ├── Processors │ │ └── SentryWatchdogTerminationBreadcrumbProcessor.m │ ├── Profiling │ │ ├── SentryContinuousProfiler.mm │ │ ├── SentryLaunchProfiling.m │ │ ├── SentryProfiledTracerConcurrency.mm │ │ ├── SentryProfilerSerialization+Test.h │ │ ├── SentryProfilerSerialization.mm │ │ ├── SentryProfilerState.mm │ │ ├── SentryProfilerTestHelpers.m │ │ ├── SentrySample.m │ │ └── SentryTraceProfiler.mm │ ├── Public │ │ ├── Sentry.h │ │ ├── SentryAttachment.h │ │ ├── SentryBaggage.h │ │ ├── SentryBreadcrumb.h │ │ ├── SentryClient.h │ │ ├── SentryCrashExceptionApplication.h │ │ ├── SentryDebugImageProvider.h │ │ ├── SentryDebugMeta.h │ │ ├── SentryDefines.h │ │ ├── SentryDsn.h │ │ ├── SentryEnvelopeItemHeader.h │ │ ├── SentryError.h │ │ ├── SentryEvent.h │ │ ├── SentryException.h │ │ ├── SentryFeedbackAPI.h │ │ ├── SentryFrame.h │ │ ├── SentryGeo.h │ │ ├── SentryHttpStatusCodeRange.h │ │ ├── SentryHub.h │ │ ├── SentryIntegrationProtocol.h │ │ ├── SentryMeasurementUnit.h │ │ ├── SentryMechanism.h │ │ ├── SentryMechanismMeta.h │ │ ├── SentryMessage.h │ │ ├── SentryNSError.h │ │ ├── SentryOptions.h │ │ ├── SentryProfilingConditionals.h │ │ ├── SentryReplayApi.h │ │ ├── SentryRequest.h │ │ ├── SentrySDK.h │ │ ├── SentrySampleDecision.h │ │ ├── SentrySamplingContext.h │ │ ├── SentryScope.h │ │ ├── SentrySerializable.h │ │ ├── SentrySpanContext.h │ │ ├── SentrySpanId.h │ │ ├── SentrySpanProtocol.h │ │ ├── SentrySpanStatus.h │ │ ├── SentryStacktrace.h │ │ ├── SentryThread.h │ │ ├── SentryTraceContext.h │ │ ├── SentryTraceHeader.h │ │ ├── SentryTransactionContext.h │ │ ├── SentryUser.h │ │ ├── SentryUserFeedback.h │ │ └── SentryWithoutUIKit.h │ ├── SentryANRTrackerV1.m │ ├── SentryANRTrackerV2.m │ ├── SentryANRTrackingIntegration.m │ ├── SentryAppStartMeasurement.m │ ├── SentryAppStartTracker.m │ ├── SentryAppStartTrackingIntegration.m │ ├── SentryAppState.m │ ├── SentryAppStateManager.m │ ├── SentryAsyncSafeLog.c │ ├── SentryAsyncSafeLog.h │ ├── SentryAsynchronousOperation.m │ ├── SentryAttachment.m │ ├── SentryAutoBreadcrumbTrackingIntegration.m │ ├── SentryAutoSessionTrackingIntegration.m │ ├── SentryBacktrace.cpp │ ├── SentryBaggage.m │ ├── SentryBaseIntegration.m │ ├── SentryBinaryImageCache.m │ ├── SentryBreadcrumb.m │ ├── SentryBreadcrumbTracker.m │ ├── SentryBuildAppStartSpans.m │ ├── SentryByteCountFormatter.m │ ├── SentryClient.m │ ├── SentryClientReport.m │ ├── SentryConcurrentRateLimitsDictionary.m │ ├── SentryCoreDataSwizzling.m │ ├── SentryCoreDataTracker.m │ ├── SentryCoreDataTrackingIntegration.m │ ├── SentryCrashDefaultBinaryImageProvider.m │ ├── SentryCrashDefaultMachineContextWrapper.m │ ├── SentryCrashExceptionApplication.m │ ├── SentryCrashExceptionApplicationHelper.h │ ├── SentryCrashExceptionApplicationHelper.m │ ├── SentryCrashInstallationReporter.m │ ├── SentryCrashIntegration.m │ ├── SentryCrashIntegrationSessionHandler.m │ ├── SentryCrashReportConverter.m │ ├── SentryCrashReportSink.m │ ├── SentryCrashScopeObserver.m │ ├── SentryCrashStackEntryMapper.m │ ├── SentryCrashWrapper.m │ ├── SentryDataCategoryMapper.m │ ├── SentryDateUtil.m │ ├── SentryDateUtils.m │ ├── SentryDebugImageProvider.m │ ├── SentryDebugMeta.m │ ├── SentryDefaultObjCRuntimeWrapper.m │ ├── SentryDefaultRateLimits.m │ ├── SentryDelayedFrame.m │ ├── SentryDelayedFramesTracker.m │ ├── SentryDependencyContainer.m │ ├── SentryDevice.mm │ ├── SentryDiscardReasonMapper.m │ ├── SentryDiscardedEvent.m │ ├── SentryDispatchFactory.m │ ├── SentryDispatchQueueWrapper.m │ ├── SentryDispatchSourceWrapper.m │ ├── SentryDsn.m │ ├── SentryEnvelope.m │ ├── SentryEnvelopeAttachmentHeader.m │ ├── SentryEnvelopeItemHeader.m │ ├── SentryEnvelopeRateLimit.m │ ├── SentryError.mm │ ├── SentryEvent.m │ ├── SentryException.m │ ├── SentryExtraContextProvider.h │ ├── SentryExtraContextProvider.m │ ├── SentryExtraPackages.m │ ├── SentryFeedbackAPI.m │ ├── SentryFileIOTracker.m │ ├── SentryFileIOTrackingIntegration.m │ ├── SentryFileManager.m │ ├── SentryFrame.m │ ├── SentryFrameRemover.m │ ├── SentryFramesTracker.m │ ├── SentryFramesTrackingIntegration.m │ ├── SentryGeo.m │ ├── SentryGlobalEventProcessor.m │ ├── SentryHttpDateParser.m │ ├── SentryHttpStatusCodeRange.m │ ├── SentryHttpTransport.m │ ├── SentryHub.m │ ├── SentryInAppLogic.m │ ├── SentryInstallation.m │ ├── SentryLevelHelper.m │ ├── SentryLevelMapper.m │ ├── SentryLogC.m │ ├── SentryMachLogging.cpp │ ├── SentryMeasurementUnit.m │ ├── SentryMeasurementValue.m │ ├── SentryMechanism.m │ ├── SentryMechanismMeta.m │ ├── SentryMessage.m │ ├── SentryMeta.m │ ├── SentryMetricKitIntegration.m │ ├── SentryMetricProfiler.mm │ ├── SentryMigrateSessionInit.m │ ├── SentryMsgPackSerializer.m │ ├── SentryNSDataSwizzling.m │ ├── SentryNSDataUtils.m │ ├── SentryNSDictionarySanitize.m │ ├── SentryNSError.m │ ├── SentryNSFileManagerSwizzling.m │ ├── SentryNSNotificationCenterWrapper.m │ ├── SentryNSProcessInfoWrapper.mm │ ├── SentryNSTimerFactory.m │ ├── SentryNSURLRequest.m │ ├── SentryNSURLRequestBuilder.m │ ├── SentryNSURLSessionTaskSearch.m │ ├── SentryNetworkTracker.m │ ├── SentryNetworkTrackingIntegration.m │ ├── SentryNoOpSpan.m │ ├── SentryOptions.m │ ├── SentryPerformanceTracker.m │ ├── SentryPerformanceTrackingIntegration.m │ ├── SentryPredicateDescriptor.m │ ├── SentryProfileTimeseries.mm │ ├── SentryProfiler.mm │ ├── SentryPropagationContext.h │ ├── SentryPropagationContext.m │ ├── SentryQueueableRequestManager.m │ ├── SentryRandom.m │ ├── SentryRateLimitParser.m │ ├── SentryReachability.m │ ├── SentryReplayApi.m │ ├── SentryRequest.m │ ├── SentryRequestOperation.m │ ├── SentryRetryAfterHeaderParser.m │ ├── SentrySDK.m │ ├── SentrySampleDecision.m │ ├── SentrySamplerDecision.m │ ├── SentrySampling.m │ ├── SentrySamplingContext.m │ ├── SentrySamplingProfiler.cpp │ ├── SentryScope.m │ ├── SentryScopeSyncC.c │ ├── SentryScreenFrames.m │ ├── SentryScreenshot.m │ ├── SentryScreenshotIntegration.m │ ├── SentrySdkInfo.m │ ├── SentrySdkPackage.m │ ├── SentrySerialization.m │ ├── SentrySession.m │ ├── SentrySessionReplayIntegration.m │ ├── SentrySessionReplaySyncC.c │ ├── SentrySessionTracker.m │ ├── SentrySpan.m │ ├── SentrySpanContext.m │ ├── SentrySpanDataKey.m │ ├── SentrySpanId.m │ ├── SentrySpanOperation.m │ ├── SentrySpanStatus.m │ ├── SentrySpotlightTransport.m │ ├── SentryStacktrace.m │ ├── SentryStacktraceBuilder.m │ ├── SentrySubClassFinder.m │ ├── SentrySwiftAsyncIntegration.m │ ├── SentrySwizzle.m │ ├── SentrySwizzleWrapper.m │ ├── SentrySysctl.m │ ├── SentrySystemEventBreadcrumbs.m │ ├── SentrySystemWrapper.mm │ ├── SentryThread.mm │ ├── SentryThreadHandle.cpp │ ├── SentryThreadInspector.m │ ├── SentryThreadMetadataCache.cpp │ ├── SentryThreadWrapper.m │ ├── SentryTime.mm │ ├── SentryTimeToDisplayTracker.m │ ├── SentryTraceContext.m │ ├── SentryTraceHeader.m │ ├── SentryTraceOrigin.m │ ├── SentryTracer.m │ ├── SentryTracerConfiguration.m │ ├── SentryTransaction.m │ ├── SentryTransactionContext.m │ ├── SentryTransportAdapter.m │ ├── SentryTransportFactory.m │ ├── SentryUIApplication.m │ ├── SentryUIDeviceWrapper.m │ ├── SentryUIEventTracker.m │ ├── SentryUIEventTrackerTransactionMode.m │ ├── SentryUIEventTrackingIntegration.m │ ├── SentryUIViewControllerPerformanceTracker.m │ ├── SentryUIViewControllerSwizzling.m │ ├── SentryUncaughtNSExceptions.m │ ├── SentryUseNSExceptionCallstackWrapper.m │ ├── SentryUser.m │ ├── SentryUserAccess.m │ ├── SentryUserFeedback.m │ ├── SentryUserFeedbackIntegration.m │ ├── SentryViewHierarchy.m │ ├── SentryViewHierarchyIntegration.m │ ├── SentryWatchdogTerminationLogic.m │ ├── SentryWatchdogTerminationScopeObserver.m │ ├── SentryWatchdogTerminationTracker.m │ ├── SentryWatchdogTerminationTrackingIntegration.m │ ├── SentryWeakMap.m │ ├── UIViewController+Sentry.m │ └── include │ │ ├── HybridPublic │ │ ├── PrivateSentrySDKOnly.h │ │ ├── PrivatesHeader.h │ │ ├── SentryAppStartMeasurement.h │ │ ├── SentryBaseIntegration.h │ │ ├── SentryBinaryImageCache.h │ │ ├── SentryBreadcrumb+Private.h │ │ ├── SentryDebugImageProvider+HybridSDKs.h │ │ ├── SentryDependencyContainer.h │ │ ├── SentryEnvelope.h │ │ ├── SentryEnvelopeItemType.h │ │ ├── SentryFormatter.h │ │ ├── SentryFramesTracker.h │ │ ├── SentryOptions+HybridSDKs.h │ │ ├── SentryScreenFrames.h │ │ ├── SentrySessionReplayIntegration-Hybrid.h │ │ ├── SentrySessionReplayIntegration.h │ │ ├── SentrySwizzle.h │ │ └── SentryUser+Private.h │ │ ├── NSArray+SentrySanitize.h │ │ ├── NSLocale+Sentry.h │ │ ├── NSMutableDictionary+Sentry.h │ │ ├── SentryANRTrackerV1.h │ │ ├── SentryANRTrackerV2.h │ │ ├── SentryANRTrackingIntegration.h │ │ ├── SentryAppStartTracker.h │ │ ├── SentryAppStartTrackingIntegration.h │ │ ├── SentryAppState.h │ │ ├── SentryAppStateManager.h │ │ ├── SentryAsynchronousOperation.h │ │ ├── SentryAttachment+Private.h │ │ ├── SentryAutoBreadcrumbTrackingIntegration.h │ │ ├── SentryAutoSessionTrackingIntegration.h │ │ ├── SentryBacktrace.hpp │ │ ├── SentryBreadcrumbDelegate.h │ │ ├── SentryBreadcrumbTracker.h │ │ ├── SentryBuildAppStartSpans.h │ │ ├── SentryByteCountFormatter.h │ │ ├── SentryCPU.h │ │ ├── SentryClient+Private.h │ │ ├── SentryClientReport.h │ │ ├── SentryCompiler.h │ │ ├── SentryConcurrentRateLimitsDictionary.h │ │ ├── SentryContinuousProfiler.h │ │ ├── SentryCoreDataSwizzling.h │ │ ├── SentryCoreDataTracker.h │ │ ├── SentryCoreDataTrackingIntegration.h │ │ ├── SentryCrashBinaryImageProvider.h │ │ ├── SentryCrashDefaultBinaryImageProvider.h │ │ ├── SentryCrashDefaultMachineContextWrapper.h │ │ ├── SentryCrashInstallationReporter.h │ │ ├── SentryCrashIntegration.h │ │ ├── SentryCrashIntegrationSessionHandler.h │ │ ├── SentryCrashIsAppImage.h │ │ ├── SentryCrashMachineContextWrapper.h │ │ ├── SentryCrashReportConverter.h │ │ ├── SentryCrashReportSink.h │ │ ├── SentryCrashScopeObserver.h │ │ ├── SentryCrashStackEntryMapper.h │ │ ├── SentryCrashWrapper.h │ │ ├── SentryDataCategory.h │ │ ├── SentryDataCategoryMapper.h │ │ ├── SentryDateUtil.h │ │ ├── SentryDateUtils.h │ │ ├── SentryDefaultObjCRuntimeWrapper.h │ │ ├── SentryDefaultRateLimits.h │ │ ├── SentryDelayedFrame.h │ │ ├── SentryDelayedFramesTracker.h │ │ ├── SentryDevice.h │ │ ├── SentryDiscardReason.h │ │ ├── SentryDiscardReasonMapper.h │ │ ├── SentryDiscardedEvent.h │ │ ├── SentryDispatchFactory.h │ │ ├── SentryDispatchQueueProviderProtocol.h │ │ ├── SentryDispatchQueueWrapper.h │ │ ├── SentryDispatchSourceProviderProtocol.h │ │ ├── SentryDispatchSourceWrapper.h │ │ ├── SentryDisplayLinkWrapper.h │ │ ├── SentryDisplayLinkWrapper.m │ │ ├── SentryEnvelope+Private.h │ │ ├── SentryEnvelopeAttachmentHeader.h │ │ ├── SentryEnvelopeRateLimit.h │ │ ├── SentryEvent+Private.h │ │ ├── SentryExtraPackages.h │ │ ├── SentryFileIOTracker.h │ │ ├── SentryFileIOTrackingIntegration.h │ │ ├── SentryFileManager.h │ │ ├── SentryFrameRemover.h │ │ ├── SentryFramesTrackingIntegration.h │ │ ├── SentryGlobalEventProcessor.h │ │ ├── SentryHttpDateParser.h │ │ ├── SentryHttpStatusCodeRange+Private.h │ │ ├── SentryHttpTransport.h │ │ ├── SentryHub+Private.h │ │ ├── SentryInAppLogic.h │ │ ├── SentryInstallation.h │ │ ├── SentryInternalCDefines.h │ │ ├── SentryInternalDefines.h │ │ ├── SentryInternalNotificationNames.h │ │ ├── SentryInternalSerializable.h │ │ ├── SentryLaunchProfiling.h │ │ ├── SentryLevelHelper.h │ │ ├── SentryLevelMapper.h │ │ ├── SentryLog.h │ │ ├── SentryLogC.h │ │ ├── SentryMachLogging.hpp │ │ ├── SentryMeasurementValue.h │ │ ├── SentryMeta.h │ │ ├── SentryMetricKitIntegration.h │ │ ├── SentryMetricProfiler.h │ │ ├── SentryMigrateSessionInit.h │ │ ├── SentryMsgPackSerializer.h │ │ ├── SentryNSDataSwizzling.h │ │ ├── SentryNSDataUtils.h │ │ ├── SentryNSDictionarySanitize.h │ │ ├── SentryNSFileManagerSwizzling.h │ │ ├── SentryNSNotificationCenterWrapper.h │ │ ├── SentryNSProcessInfoWrapper.h │ │ ├── SentryNSTimerFactory.h │ │ ├── SentryNSURLRequest.h │ │ ├── SentryNSURLRequestBuilder.h │ │ ├── SentryNSURLSessionTaskSearch.h │ │ ├── SentryNetworkTracker.h │ │ ├── SentryNetworkTrackingIntegration.h │ │ ├── SentryNoOpSpan.h │ │ ├── SentryObjCRuntimeWrapper.h │ │ ├── SentryOptions+Private.h │ │ ├── SentryPerformanceTracker.h │ │ ├── SentryPerformanceTrackingIntegration.h │ │ ├── SentryPredicateDescriptor.h │ │ ├── SentryPrivate.h │ │ ├── SentryProfileTimeseries.h │ │ ├── SentryProfiledTracerConcurrency.h │ │ ├── SentryProfiler+Private.h │ │ ├── SentryProfilerDefines.h │ │ ├── SentryProfilerSerialization.h │ │ ├── SentryProfilerState+ObjCpp.h │ │ ├── SentryProfilerState.h │ │ ├── SentryProfilerTestHelpers.h │ │ ├── SentryQueueableRequestManager.h │ │ ├── SentryRandom.h │ │ ├── SentryRateLimitParser.h │ │ ├── SentryRateLimits.h │ │ ├── SentryReachability.h │ │ ├── SentryRequestManager.h │ │ ├── SentryRequestOperation.h │ │ ├── SentryRetryAfterHeaderParser.h │ │ ├── SentrySDK+Private.h │ │ ├── SentrySample.h │ │ ├── SentrySampleDecision+Private.h │ │ ├── SentrySamplerDecision.h │ │ ├── SentrySampling.h │ │ ├── SentrySamplingProfiler.hpp │ │ ├── SentryScope+Private.h │ │ ├── SentryScopeObserver.h │ │ ├── SentryScopeSyncC.h │ │ ├── SentryScreenshot.h │ │ ├── SentryScreenshotIntegration.h │ │ ├── SentrySdkInfo.h │ │ ├── SentrySdkPackage.h │ │ ├── SentrySerialization.h │ │ ├── SentrySession+Private.h │ │ ├── SentrySession.h │ │ ├── SentrySessionReplayIntegration+Private.h │ │ ├── SentrySessionReplaySyncC.h │ │ ├── SentrySessionTracker.h │ │ ├── SentrySpan+Private.h │ │ ├── SentrySpan.h │ │ ├── SentrySpanContext+Private.h │ │ ├── SentrySpanDataKey.h │ │ ├── SentrySpanOperation.h │ │ ├── SentrySpotlightTransport.h │ │ ├── SentryStackBounds.hpp │ │ ├── SentryStackFrame.hpp │ │ ├── SentryStacktraceBuilder.h │ │ ├── SentrySubClassFinder.h │ │ ├── SentrySwift.h │ │ ├── SentrySwiftAsyncIntegration.h │ │ ├── SentrySwizzleWrapper.h │ │ ├── SentrySysctl.h │ │ ├── SentrySystemEventBreadcrumbs.h │ │ ├── SentrySystemWrapper.h │ │ ├── SentryThread+Private.h │ │ ├── SentryThreadHandle.hpp │ │ ├── SentryThreadInspector.h │ │ ├── SentryThreadMetadataCache.hpp │ │ ├── SentryThreadState.hpp │ │ ├── SentryThreadWrapper.h │ │ ├── SentryTime.h │ │ ├── SentryTimeToDisplayTracker.h │ │ ├── SentryTraceOrigin.h │ │ ├── SentryTraceProfiler.h │ │ ├── SentryTracer+Private.h │ │ ├── SentryTracer.h │ │ ├── SentryTracerConfiguration.h │ │ ├── SentryTransaction.h │ │ ├── SentryTransactionContext+Private.h │ │ ├── SentryTransport.h │ │ ├── SentryTransportAdapter.h │ │ ├── SentryTransportFactory.h │ │ ├── SentryUIApplication.h │ │ ├── SentryUIDeviceWrapper.h │ │ ├── SentryUIEventTracker.h │ │ ├── SentryUIEventTrackerMode.h │ │ ├── SentryUIEventTrackerTransactionMode.h │ │ ├── SentryUIEventTrackingIntegration.h │ │ ├── SentryUIViewControllerPerformanceTracker.h │ │ ├── SentryUIViewControllerSwizzling.h │ │ ├── SentryUncaughtNSExceptions.h │ │ ├── SentryUseNSExceptionCallstackWrapper.h │ │ ├── SentryUserAccess.h │ │ ├── SentryUserFeedbackIntegration.h │ │ ├── SentryViewHierarchy.h │ │ ├── SentryViewHierarchyIntegration.h │ │ ├── SentryWatchdogTerminationBreadcrumbProcessor.h │ │ ├── SentryWatchdogTerminationLogic.h │ │ ├── SentryWatchdogTerminationScopeObserver.h │ │ ├── SentryWatchdogTerminationTracker.h │ │ ├── SentryWatchdogTerminationTrackingIntegration.h │ │ ├── SentryWeakMap.h │ │ ├── UIViewController+Sentry.h │ │ └── module.modulemap ├── SentryCrash │ ├── Installations │ │ ├── SentryCrashInstallation+Private.h │ │ ├── SentryCrashInstallation.h │ │ └── SentryCrashInstallation.m │ ├── Recording │ │ ├── Monitors │ │ │ ├── SentryCrashMonitor.c │ │ │ ├── SentryCrashMonitor.h │ │ │ ├── SentryCrashMonitorContext.h │ │ │ ├── SentryCrashMonitorType.c │ │ │ ├── SentryCrashMonitorType.h │ │ │ ├── SentryCrashMonitor_AppState.c │ │ │ ├── SentryCrashMonitor_AppState.h │ │ │ ├── SentryCrashMonitor_CPPException.cpp │ │ │ ├── SentryCrashMonitor_CPPException.h │ │ │ ├── SentryCrashMonitor_MachException.c │ │ │ ├── SentryCrashMonitor_MachException.h │ │ │ ├── SentryCrashMonitor_NSException.h │ │ │ ├── SentryCrashMonitor_NSException.m │ │ │ ├── SentryCrashMonitor_Signal.c │ │ │ ├── SentryCrashMonitor_Signal.h │ │ │ ├── SentryCrashMonitor_System.h │ │ │ └── SentryCrashMonitor_System.m │ │ ├── SentryCrash.h │ │ ├── SentryCrash.m │ │ ├── SentryCrashBinaryImageCache.c │ │ ├── SentryCrashBinaryImageCache.h │ │ ├── SentryCrashC.c │ │ ├── SentryCrashC.h │ │ ├── SentryCrashCachedData.c │ │ ├── SentryCrashCachedData.h │ │ ├── SentryCrashDoctor.h │ │ ├── SentryCrashDoctor.m │ │ ├── SentryCrashReport.c │ │ ├── SentryCrashReport.h │ │ ├── SentryCrashReportFields.h │ │ ├── SentryCrashReportFixer.c │ │ ├── SentryCrashReportFixer.h │ │ ├── SentryCrashReportStore.c │ │ ├── SentryCrashReportStore.h │ │ ├── SentryCrashReportVersion.h │ │ ├── SentryCrashReportWriter.h │ │ └── Tools │ │ │ ├── SentryCrashCPU.c │ │ │ ├── SentryCrashCPU.h │ │ │ ├── SentryCrashCPU_Apple.h │ │ │ ├── SentryCrashCPU_arm.c │ │ │ ├── SentryCrashCPU_arm64.c │ │ │ ├── SentryCrashCPU_x86_32.c │ │ │ ├── SentryCrashCPU_x86_64.c │ │ │ ├── SentryCrashDate.c │ │ │ ├── SentryCrashDate.h │ │ │ ├── SentryCrashDebug.c │ │ │ ├── SentryCrashDebug.h │ │ │ ├── SentryCrashDynamicLinker.c │ │ │ ├── SentryCrashDynamicLinker.h │ │ │ ├── SentryCrashFileUtils.c │ │ │ ├── SentryCrashFileUtils.h │ │ │ ├── SentryCrashID.c │ │ │ ├── SentryCrashID.h │ │ │ ├── SentryCrashJSONCodec.c │ │ │ ├── SentryCrashJSONCodec.h │ │ │ ├── SentryCrashJSONCodecObjC.h │ │ │ ├── SentryCrashJSONCodecObjC.m │ │ │ ├── SentryCrashMach.c │ │ │ ├── SentryCrashMach.h │ │ │ ├── SentryCrashMachineContext.c │ │ │ ├── SentryCrashMachineContext.h │ │ │ ├── SentryCrashMachineContext_Apple.h │ │ │ ├── SentryCrashMemory.c │ │ │ ├── SentryCrashMemory.h │ │ │ ├── SentryCrashNSErrorUtil.h │ │ │ ├── SentryCrashNSErrorUtil.m │ │ │ ├── SentryCrashObjC.c │ │ │ ├── SentryCrashObjC.h │ │ │ ├── SentryCrashObjCApple.h │ │ │ ├── SentryCrashPlatformSpecificDefines.h │ │ │ ├── SentryCrashSignalInfo.c │ │ │ ├── SentryCrashSignalInfo.h │ │ │ ├── SentryCrashStackCursor.c │ │ │ ├── SentryCrashStackCursor.h │ │ │ ├── SentryCrashStackCursor_Backtrace.c │ │ │ ├── SentryCrashStackCursor_Backtrace.h │ │ │ ├── SentryCrashStackCursor_MachineContext.c │ │ │ ├── SentryCrashStackCursor_MachineContext.h │ │ │ ├── SentryCrashStackCursor_SelfThread.h │ │ │ ├── SentryCrashStackCursor_SelfThread.m │ │ │ ├── SentryCrashString.c │ │ │ ├── SentryCrashString.h │ │ │ ├── SentryCrashSymbolicator.c │ │ │ ├── SentryCrashSymbolicator.h │ │ │ ├── SentryCrashSysCtl.c │ │ │ ├── SentryCrashSysCtl.h │ │ │ ├── SentryCrashThread.c │ │ │ ├── SentryCrashThread.h │ │ │ ├── SentryCrashUUIDConversion.c │ │ │ └── SentryCrashUUIDConversion.h │ └── Reporting │ │ └── Filters │ │ ├── SentryCrashReportFilter.h │ │ ├── SentryCrashReportFilterBasic.h │ │ ├── SentryCrashReportFilterBasic.m │ │ └── Tools │ │ ├── SentryCrashVarArgs.h │ │ ├── SentryDictionaryDeepSearch.h │ │ └── SentryDictionaryDeepSearch.m ├── SentrySwiftUI │ ├── Preview │ │ ├── PreviewRedactOptions.swift │ │ ├── SentryReplayMaskPreview.swift │ │ └── SentryReplayMaskPreviewUIView.swift │ ├── SentryInternal │ │ ├── SentryInternal.h │ │ └── SentryInternal.m │ ├── SentryReplayView.swift │ ├── SentrySpanOperation.swift │ ├── SentrySwiftUI.h │ ├── SentryTraceOrigin.swift │ ├── SentryTracedView.swift │ └── module.modulemap └── Swift │ ├── Core │ ├── Extensions │ │ ├── Locks.swift │ │ ├── NumberExtensions.swift │ │ ├── StringExtensions.swift │ │ └── UIViewExtensions.swift │ ├── Helper │ │ ├── Log │ │ │ └── SentryLevel.swift │ │ ├── SentryBaggageSerialization.swift │ │ ├── SentryCurrentDateProvider.swift │ │ └── SentryFileContents.swift │ ├── Integrations │ │ ├── ANR │ │ │ ├── SentryANRTracker.swift │ │ │ ├── SentryANRTrackerV2Delegate.swift │ │ │ └── SentryANRType.swift │ │ ├── FramesTracking │ │ │ └── SentryFramesDelayResult.swift │ │ └── Performance │ │ │ ├── SentryProfileOptions.swift │ │ │ ├── SentryTransactionNameSource.swift │ │ │ └── SwizzleClassNameExclude.swift │ ├── MetricKit │ │ ├── SentryMXCallStackTree.swift │ │ └── SentryMXManager.swift │ ├── Protocol │ │ ├── SentryId.swift │ │ ├── SentryRedactOptions.swift │ │ └── SentryViewControllerBreadcrumbTracking.swift │ ├── SentryExperimentalOptions.swift │ ├── SwiftDescriptor.swift │ └── Tools │ │ ├── HTTPHeaderSanitizer.swift │ │ ├── SentryLog.swift │ │ ├── SentryLogOutput.swift │ │ ├── UIImageHelper.swift │ │ ├── URLSessionTaskHelper.swift │ │ ├── UrlSanitized.swift │ │ └── ViewCapture │ │ ├── SentryDefaultMaskRenderer.swift │ │ ├── SentryDefaultViewRenderer.swift │ │ ├── SentryGraphicsImageRenderer.swift │ │ ├── SentryMaskRenderer.swift │ │ ├── SentryMaskRendererV2.swift │ │ ├── SentryViewPhotographer.swift │ │ ├── SentryViewRenderer.swift │ │ ├── SentryViewRendererV2.swift │ │ ├── SentryViewScreenshotProvider.swift │ │ └── UIRedactBuilder.swift │ ├── Helper │ ├── SentryEnabledFeaturesBuilder.swift │ └── SentryIconography.swift │ ├── Integrations │ ├── Performance │ │ └── IO │ │ │ ├── Data+SentryTracing.swift │ │ │ ├── FileManager+SentryTracing.swift │ │ │ └── SentryFileIOTracker+SwiftHelpers.swift │ ├── SessionReplay │ │ ├── Preview │ │ │ └── SentryMaskingPreviewView.swift │ │ ├── RRWeb │ │ │ ├── SentryRRWebBreadcrumbEvent.swift │ │ │ ├── SentryRRWebCustomEvent.swift │ │ │ ├── SentryRRWebEvent.swift │ │ │ ├── SentryRRWebMetaEvent.swift │ │ │ ├── SentryRRWebOptionsEvent.swift │ │ │ ├── SentryRRWebSpanEvent.swift │ │ │ ├── SentryRRWebTouchEvent.swift │ │ │ └── SentryRRWebVideoEvent.swift │ │ ├── SentryOnDemandReplay.swift │ │ ├── SentryOnDemandReplayError.swift │ │ ├── SentryPixelBuffer.swift │ │ ├── SentryRenderVideoResult.swift │ │ ├── SentryReplayEvent.swift │ │ ├── SentryReplayFrame.swift │ │ ├── SentryReplayOptions.swift │ │ ├── SentryReplayRecording.swift │ │ ├── SentryReplayType.swift │ │ ├── SentryReplayVideoMaker.swift │ │ ├── SentrySRDefaultBreadcrumbConverter.swift │ │ ├── SentrySessionReplay.swift │ │ ├── SentrySessionReplayDelegate.swift │ │ ├── SentryTouchTracker.swift │ │ └── SentryVideoInfo.swift │ ├── UserFeedback │ │ ├── Configuration │ │ │ ├── SentryUserFeedbackConfiguration.swift │ │ │ ├── SentryUserFeedbackFormConfiguration.swift │ │ │ ├── SentryUserFeedbackThemeConfiguration.swift │ │ │ └── SentryUserFeedbackWidgetConfiguration.swift │ │ ├── SentryFeedback.swift │ │ ├── SentryUserFeedbackFormController.swift │ │ ├── SentryUserFeedbackFormViewModel.swift │ │ ├── SentryUserFeedbackIntegrationDriver.swift │ │ ├── SentryUserFeedbackWidget.swift │ │ ├── SentryUserFeedbackWidgetButtonMegaphoneIconView.swift │ │ └── SentryUserFeedbackWidgetButtonView.swift │ └── WatchdogTerminations │ │ └── Processors │ │ └── SentryWatchdogTerminationContextProcessor.swift │ ├── Persistence │ └── SentryScopeContextPersistentStore.swift │ ├── Protocol │ ├── Codable │ │ ├── DecodeArbitraryData.swift │ │ ├── NSNumberDecodableWrapper.swift │ │ ├── SentryBreadcrumbCodable.swift │ │ ├── SentryCodable.swift │ │ ├── SentryDebugMetaCodable.swift │ │ ├── SentryEventCodable.swift │ │ ├── SentryEventDecoder.swift │ │ ├── SentryExceptionCodable.swift │ │ ├── SentryFrameCodable.swift │ │ ├── SentryGeoCodable.swift │ │ ├── SentryMechanismCodable.swift │ │ ├── SentryMechanismMetaCodable.swift │ │ ├── SentryMessage.swift │ │ ├── SentryNSErrorCodable.swift │ │ ├── SentryRequestCodable.swift │ │ ├── SentryStacktraceCodable.swift │ │ ├── SentryThreadCodable.swift │ │ └── SentryUserCodable.swift │ └── SentrySessionListener.swift │ └── Tools │ └── SentryLog+Configure.swift ├── TestSamples └── SwiftUITestSample │ ├── .gitignore │ ├── Maestro │ ├── corruptEnvelope.yaml │ └── crash.yaml │ ├── SwiftUITestSample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── SwiftUITestSample.xcscheme │ └── SwiftUITestSample │ └── SwiftUITestSampleApp.swift ├── Tests ├── .swiftlint.yml ├── Configuration │ └── SentryTests.xcconfig ├── DuplicatedSDKTest │ ├── DuplicatedSDKTest.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ └── DuplicatedSDKTest │ │ ├── DuplicatedSDKTest-Bridging-Header.h │ │ ├── DuplicatedSDKTestApp.swift │ │ ├── SomeWork.swift │ │ └── UITest.swift ├── HybridSDKTest │ ├── HybridPod.podspec │ └── HybridTest.swift ├── Perf │ ├── metrics-test.yml │ ├── test-app-plain │ │ ├── test-app-plain.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── test-app-plain │ │ │ ├── Assets.xcassets │ │ │ ├── AccentColor.colorset │ │ │ │ └── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ │ ├── ContentView.swift │ │ │ ├── Preview Content │ │ │ └── Preview Assets.xcassets │ │ │ │ └── Contents.json │ │ │ └── test_app_plainApp.swift │ └── test-app-sentry │ │ ├── test-app-sentry.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ └── test-app-sentry │ │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ │ ├── ContentView.swift │ │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ │ └── test_app_sentryApp.swift ├── README.md ├── Resources │ ├── Abort.json │ ├── CPPException.json │ ├── Crash-faulty-report.json │ ├── Crash-missing-binary-images.json │ ├── Crash-missing-crash-error.json │ ├── Crash-missing-crash-threads.json │ ├── Crash-missing-crash.json │ ├── Crash-missing-user.json │ ├── CrashState_legacy_1.json │ ├── CrashState_unsupported_fields.json │ ├── CrashState_wrong.json │ ├── MetricKitCallstacks │ │ ├── not-per-thread-only-one-frame.json │ │ ├── not-per-thread.json │ │ ├── per-thread.json │ │ ├── tree-garbage.json │ │ ├── tree-real.json │ │ └── tree-unknown-fields.json │ ├── NSException.json │ ├── NX-Page.json │ ├── ReactNative.json │ ├── StackOverflow.json │ ├── UnknownTypeException.json │ ├── breadcrumb.json │ ├── breadcrumb_sdk_scope.json │ ├── converted-event.json │ ├── cordova-exception.json │ ├── crash-bad-access-no-subcode.json │ ├── crash-bad-access.json │ ├── crash-report-1.json │ ├── crash-report-legacy-storage-info.json │ ├── crash-report-user-info-scope-v1.json │ ├── crash-report-user-info-scope-v2.json │ ├── crash-report-without-device-context.json │ ├── crash-sigterm.json │ ├── dup-frame.json │ ├── fatal-error-binary-images-iphone.json │ ├── fatal-error-binary-images-mac.json │ ├── fatal-error-binary-images-message2.json │ ├── fatal-error-binary-images-simulator.json │ ├── fatal-error-notable-addresses.json │ ├── incomplete.json │ ├── processed.json │ ├── raven-rejectedpromise.json │ ├── raven-sendMessage.json │ ├── raven-throwerror.json │ ├── raw-crash.json │ ├── raw.json │ ├── recrash-report.json │ └── sentry-ios-cocoapods-report-0000000053800000.json ├── SentryProfilerTests │ ├── SentryAppLaunchProfilingTests.swift │ ├── SentryAppStartProfilingConfigurationTests.swift │ ├── SentryBacktraceTests.mm │ ├── SentryContinuousProfilerTests.swift │ ├── SentryNSProcessInfoWrapperTests.swift │ ├── SentryNSTimerFactoryTest.swift │ ├── SentryProfileTestFixture.swift │ ├── SentryProfilerTests.mm │ ├── SentryProfilingPublicAPITests.swift │ ├── SentrySamplingProfilerTests.mm │ ├── SentrySystemWrapperTests.swift │ ├── SentryThreadHandleTests.mm │ ├── SentryThreadMetadataCacheTests.mm │ └── SentryTraceProfilerTests.swift ├── SentrySwiftUITests │ ├── PreviewRedactOptionsTests.swift │ ├── SentryRedactModifierTests.swift │ ├── SentryTests-Bridging-Header.h │ └── SentryTraceViewModelTest.swift ├── SentryTests │ ├── Categories │ │ ├── NSMutableDictionarySentryTests.swift │ │ ├── SentryNSDictionarySanitize+Tests.h │ │ ├── SentryNSDictionarySanitize+Tests.m │ │ ├── SentryNSDictionarySanitizeTests.swift │ │ └── UIViewControllerSentryTests.swift │ ├── Extensions │ │ └── StringExtensionsTests.swift │ ├── Helper │ │ ├── ExceptionCatcher.h │ │ ├── ExceptionCatcher.m │ │ ├── SentryAppStateManagerTests.swift │ │ ├── SentryAppStateTests.swift │ │ ├── SentryAsyncSafeLog.m │ │ ├── SentryBaggageSerializationTests.swift │ │ ├── SentryByteCountFormatterTests.swift │ │ ├── SentryCurrentDateTests.swift │ │ ├── SentryDateUtilTests.swift │ │ ├── SentryDateUtilsTests.swift │ │ ├── SentryDependencyContainerTests.swift │ │ ├── SentryDeviceTests.mm │ │ ├── SentryEnabledFeaturesBuilderTests.swift │ │ ├── SentryExtraContextProviderTests.swift │ │ ├── SentryFileManagerTestExtension.swift │ │ ├── SentryFileManagerTests.swift │ │ ├── SentryFormatterTests.swift │ │ ├── SentryInvalidJSONStringTests.swift │ │ ├── SentryLog.swift │ │ ├── SentryLogTestHelper.h │ │ ├── SentryLogTestHelper.m │ │ ├── SentryLogTests.swift │ │ ├── SentryMigrateSessionInitTests.m │ │ ├── SentryNSNotificationCenterWrapperTests.swift │ │ ├── SentrySerializationNilTests.m │ │ ├── SentrySerializationTests.m │ │ ├── SentrySerializationTests.swift │ │ ├── SentrySwizzleTests.m │ │ ├── SentrySwizzleWrapperTests.swift │ │ ├── SentrySysctlTests.swift │ │ ├── SentryTestObjCRuntimeWrapper.h │ │ ├── SentryTestObjCRuntimeWrapper.m │ │ ├── SentryTestThreadWrapper.swift │ │ ├── SentryTimeSwiftTests.swift │ │ ├── SentryTimeTests.m │ │ ├── SentryUseNSExceptionCallstackWrapperTests.swift │ │ ├── TestFileManagerDelegate.swift │ │ ├── TestSentryNSProcessInfoWrapper.swift │ │ ├── TestSentrySwizzleWrapper.swift │ │ ├── TestSysctl.swift │ │ └── UrlSessionDelegateSpy.swift │ ├── Info.plist │ ├── Integrations │ │ ├── ANR │ │ │ ├── SentryANRTrackerV1IntegrationTests.swift │ │ │ ├── SentryANRTrackerV1Tests.swift │ │ │ ├── SentryANRTrackerV2Tests.swift │ │ │ ├── SentryANRTrackingIntegrationTests.swift │ │ │ └── SentryANRTypeTests.swift │ │ ├── Breadcrumbs │ │ │ ├── SentryAutoBreadcrumbTrackingIntegration+Test.h │ │ │ ├── SentryAutoBreadcrumbTrackingIntegrationTests.swift │ │ │ ├── SentryBreadcrumbTestDelegate.swift │ │ │ ├── SentryBreadcrumbTrackerTests.swift │ │ │ └── SentrySystemEventBreadcrumbsTest.swift │ │ ├── Feedback │ │ │ └── SentryFeedbackTests.swift │ │ ├── MetricKit │ │ │ ├── SentryMXCallStackTreeTests.swift │ │ │ ├── SentryMXManagerTests.swift │ │ │ ├── SentryMetricKitEventTests.swift │ │ │ └── SentryMetricKitIntegrationTests.swift │ │ ├── NotificationCenterTestCase.swift │ │ ├── Performance │ │ │ ├── AppStartTracking │ │ │ │ ├── SentryAppStartTrackerTests.swift │ │ │ │ └── SentryAppStartTrackingIntegrationTests.swift │ │ │ ├── CoreData │ │ │ │ ├── SentryCoreDataTracker+Test.h │ │ │ │ ├── SentryCoreDataTracker+Test.m │ │ │ │ ├── SentryCoreDataTrackerExtension.swift │ │ │ │ ├── SentryCoreDataTrackerTest.swift │ │ │ │ ├── SentryCoreDataTrackingIntegrationTest.swift │ │ │ │ ├── TestCoreDataStack.swift │ │ │ │ └── TestModel.xcdatamodeld │ │ │ │ │ └── TestModel.xcdatamodel │ │ │ │ │ └── contents │ │ │ ├── FramesTracking │ │ │ │ ├── SentryFramesTracker+TestInit.h │ │ │ │ ├── SentryFramesTrackerTests.swift │ │ │ │ └── SentryFramesTrackingIntegrationTests.swift │ │ │ ├── IO │ │ │ │ ├── DataSentryTracingIntegrationTests.swift │ │ │ │ ├── FileManagerTracingIntegrationTests.swift │ │ │ │ ├── SentryFileIOTrackerSwiftHelpersTests.swift │ │ │ │ ├── SentryFileIOTrackerTests.swift │ │ │ │ ├── SentryFileIOTrackingIntegrationObjCTests.m │ │ │ │ ├── SentryFileIOTrackingIntegrationTests.swift │ │ │ │ ├── SentryFileIoTrackingUnitTests.swift │ │ │ │ └── SentryNSFileManagerSwizzlingTests.m │ │ │ ├── Network │ │ │ │ ├── SentryNSURLSessionTaskSearchTests.swift │ │ │ │ ├── SentryNetworkTrackerIntegrationTests.swift │ │ │ │ ├── SentryNetworkTrackerTests.swift │ │ │ │ ├── URLSessionTaskMock.h │ │ │ │ └── URLSessionTaskMock.m │ │ │ ├── SentryInitializeForGettingSubclassesNotCalled.h │ │ │ ├── SentryInitializeForGettingSubclassesNotCalled.m │ │ │ ├── SentryPerformanceTracker+Testing.h │ │ │ ├── SentryPerformanceTrackerTests.swift │ │ │ ├── SentryPerformanceTrackingIntegrationTests.swift │ │ │ ├── SentrySubClassFinderTests.swift │ │ │ ├── SwizzlingCallTests.swift │ │ │ └── UIViewController │ │ │ │ ├── SentryTimeToDisplayTrackerTest.swift │ │ │ │ ├── SentryUIViewControllerPerformanceTrackerTests.swift │ │ │ │ ├── SentryUIViewControllerSwizzling+Test.h │ │ │ │ └── SentryUIViewControllerSwizzlingTests.swift │ │ ├── Screenshot │ │ │ ├── SentryScreenshotIntegrationTests.swift │ │ │ └── TestSentryScreenShot.swift │ │ ├── SentryBaseIntegrationTests.swift │ │ ├── SentryCrash │ │ │ ├── SentryCrashIntegration+TestInit.h │ │ │ ├── SentryCrashIntegrationTests.swift │ │ │ ├── SentryCrashReportTests.swift │ │ │ ├── SentryCrashScopeObserverTests.swift │ │ │ ├── SentryTestIntegration.h │ │ │ ├── SentryTestIntegration.m │ │ │ └── SentryUncaughtNSExceptionsTests.swift │ │ ├── Session │ │ │ ├── SentryAutoSessionTrackingIntegrationTests.swift │ │ │ ├── SentrySessionGeneratorTests.swift │ │ │ └── SentrySessionTrackerTests.swift │ │ ├── SessionReplay │ │ │ ├── SentryOnDemandReplayTests.swift │ │ │ ├── SentryReplayEventTests.swift │ │ │ ├── SentryReplayOptionsObjcTests.m │ │ │ ├── SentryReplayOptionsTests.swift │ │ │ ├── SentryReplayRecordingTests.swift │ │ │ ├── SentryReplayTypeTests.swift │ │ │ ├── SentrySRDefaultBreadcrumbConverterTests.swift │ │ │ ├── SentrySessionReplayIntegration+Test.h │ │ │ ├── SentrySessionReplayIntegrationTests.swift │ │ │ ├── SentrySessionReplayTests.swift │ │ │ └── SentryTouchTrackerTests.swift │ │ ├── UIEvents │ │ │ ├── SentryUIEventTrackerTests.swift │ │ │ └── SentryUIEventTrackingIntegrationTests.swift │ │ ├── ViewHierarchy │ │ │ ├── SentryViewHierarchyIntegrationTests.swift │ │ │ ├── TestSentryViewHierarchy.h │ │ │ └── TestSentryViewHierarchy.swift │ │ └── WatchdogTerminations │ │ │ ├── Processors │ │ │ ├── SentryWatchdogTerminationBreadcrumbProcessorTests.swift │ │ │ └── SentryWatchdogTerminationContextProcessorTests.swift │ │ │ ├── SentryWatchdogTerminationScopeObserverTests.swift │ │ │ ├── SentryWatchdogTerminationTrackerTests.swift │ │ │ ├── SentryWatchdogTerminationTrackingIntegrationTests.swift │ │ │ ├── TestSentryWatchdogTerminationBreadcrumbProcessor.swift │ │ │ ├── TestSentryWatchdogTerminationBreadcrumbProcessorTests.swift │ │ │ ├── TestSentryWatchdogTerminationContextProcessor.swift │ │ │ └── TestSentryWatchdogTerminationContextProcessorTests.swift │ ├── MockUIScene.h │ ├── MockUIScene.m │ ├── Networking │ │ ├── HttpDateFormatter.swift │ │ ├── RateLimits │ │ │ ├── SentryConcurrentRateLimitsDictionaryTests.swift │ │ │ ├── SentryDefaultRateLimitsTests.swift │ │ │ ├── SentryEnvelopeRateLimitTests.swift │ │ │ ├── SentryRateLimitsParserTests.m │ │ │ ├── SentryRateLimitsParserTests.swift │ │ │ ├── SentryRetryAfterHeaderParserTests.swift │ │ │ └── TestEnvelopeRateLimitDelegate.swift │ │ ├── SentryDataCategoryMapperTests.swift │ │ ├── SentryDiscardReasonMapperTests.swift │ │ ├── SentryDispatchFactoryTests.m │ │ ├── SentryDispatchQueueWrapperTests.m │ │ ├── SentryDispatchQueueWrapperTests.swift │ │ ├── SentryDsnTests.m │ │ ├── SentryHttpDateParserTests.swift │ │ ├── SentryHttpTransportTests.swift │ │ ├── SentryNSURLRequestBuilderTests.swift │ │ ├── SentryReachabilitySwiftTests.swift │ │ ├── SentryReachabilityTests.m │ │ ├── SentrySpotlightTransportTests.swift │ │ ├── SentryTransportAdapterTests.swift │ │ ├── SentryTransportFactoryTests.swift │ │ ├── SentryTransportInitializerTests.swift │ │ ├── TestNSURLRequestBuilder.h │ │ ├── TestNSURLRequestBuilder.m │ │ ├── TestProtocolClient.swift │ │ ├── TestRateLimits.swift │ │ ├── TestRequestManager.swift │ │ ├── TestResponseFactory.swift │ │ └── TestSentryReachability.swift │ ├── Persistence │ │ ├── SentryScopeContextPersistentStoreTests.swift │ │ └── TestSentryScopeContextPersistentStore.swift │ ├── PrivateSentrySDKOnlyTests.swift │ ├── Protocol │ │ ├── Codable │ │ │ ├── ArbitraryDataTests.swift │ │ │ ├── NSNumberDecodableWrapperTests.swift │ │ │ ├── SentryCodableTests.swift │ │ │ └── SentryDateCodableTests.swift │ │ ├── SentryAppState+Equality.h │ │ ├── SentryAppState+Equality.m │ │ ├── SentryAttachment+Equality.h │ │ ├── SentryAttachment+Equality.m │ │ ├── SentryAttachmentTests.swift │ │ ├── SentryBreadcrumbTests.swift │ │ ├── SentryClientReportTests.swift │ │ ├── SentryDebugMetaEquality.swift │ │ ├── SentryDebugMetaTests.swift │ │ ├── SentryDiscardedEventTests.swift │ │ ├── SentryEnvelopeItemHeaderTests.swift │ │ ├── SentryEnvelopeTests.swift │ │ ├── SentryEventTests.swift │ │ ├── SentryExceptionTests.swift │ │ ├── SentryFrameTests.swift │ │ ├── SentryGeoTests.swift │ │ ├── SentryIdTests.swift │ │ ├── SentryMeasurementUnitTests.swift │ │ ├── SentryMechanismMetaTests.swift │ │ ├── SentryMechanismTests.swift │ │ ├── SentryMessage+Equality.h │ │ ├── SentryMessage+Equality.m │ │ ├── SentryMessageTests.swift │ │ ├── SentryNSErrorTests.swift │ │ ├── SentryRedactDefaultOptionsTests.swift │ │ ├── SentryRequestTests.swift │ │ ├── SentrySdkInfo+Equality.h │ │ ├── SentrySdkInfo+Equality.m │ │ ├── SentrySdkInfoNilTests.m │ │ ├── SentrySdkInfoTests.swift │ │ ├── SentrySession+Equality.h │ │ ├── SentrySession+Equality.m │ │ ├── SentryStacktraceEquality.swift │ │ ├── SentryStacktraceTests.swift │ │ ├── SentryThreadEquality.swift │ │ ├── SentryThreadTests.swift │ │ ├── SentryUserFeedbackTests.swift │ │ ├── SentryUserTests.swift │ │ └── TestData.swift │ ├── Recording │ │ └── SentryCrashCTests.swift │ ├── SentryBinaryImageCache+Private.h │ ├── SentryBinaryImageCacheTests.swift │ ├── SentryClient+TestInit.h │ ├── SentryClientTests.swift │ ├── SentryContinuousProfiler+Test.h │ ├── SentryCrash │ │ ├── Container+DeepSearch_Tests.m │ │ ├── CrashReport.swift │ │ ├── FileBasedTestCase.h │ │ ├── FileBasedTestCase.m │ │ ├── RFC3339UTFString_Tests.m │ │ ├── SentryBinaryImageCacheTests.m │ │ ├── SentryCrash+Test.h │ │ ├── SentryCrashCPU_Tests.m │ │ ├── SentryCrashCachedData_Tests.m │ │ ├── SentryCrashDefaultBinaryImageProviderTests.swift │ │ ├── SentryCrashDoctorTests.swift │ │ ├── SentryCrashDynamicLinker_Tests.m │ │ ├── SentryCrashFileUtils_Tests.m │ │ ├── SentryCrashInstallationReporterTests.swift │ │ ├── SentryCrashInstallationTests.swift │ │ ├── SentryCrashJSONCodec_Tests.m │ │ ├── SentryCrashMach_Tests.m │ │ ├── SentryCrashMemory_Tests.m │ │ ├── SentryCrashMonitor_AppState_Tests.m │ │ ├── SentryCrashMonitor_CppException_Tests.mm │ │ ├── SentryCrashMonitor_NSException_Tests.m │ │ ├── SentryCrashMonitor_Signal_Tests.m │ │ ├── SentryCrashMonitor_Tests.m │ │ ├── SentryCrashNSErrorUtilTests.m │ │ ├── SentryCrashObjC_Tests.m │ │ ├── SentryCrashReportFilter_Tests.m │ │ ├── SentryCrashReportFixer_Tests.m │ │ ├── SentryCrashReportSinkTests.swift │ │ ├── SentryCrashReportStore_Tests.m │ │ ├── SentryCrashSignalInfo_Tests.m │ │ ├── SentryCrashStackCursorSelfThreadTests.swift │ │ ├── SentryCrashStackEntryMapperTests.swift │ │ ├── SentryCrashString_Tests.m │ │ ├── SentryCrashSysCtl_Tests.m │ │ ├── SentryCrashTests.m │ │ ├── SentryCrashUUIDConversionTests.swift │ │ ├── SentryDebugImageProvider+TestInit.h │ │ ├── SentryDebugImageProviderTests.swift │ │ ├── SentryFrameRemoverTests.swift │ │ ├── SentryInAppLogicTests.swift │ │ ├── SentryStacktraceBuilderTests.swift │ │ ├── SentryThreadInspectorTests.swift │ │ ├── SentryUIDeviceWrapperTests.swift │ │ ├── TestSentryCrashBinaryImageProvider.swift │ │ ├── TestSentryCrashWrapper.h │ │ ├── TestSentryCrashWrapper.m │ │ ├── TestSentryCrashWrapper.swift │ │ ├── TestSentryUIDeviceWrapper.swift │ │ ├── TestThread.h │ │ ├── TestThread.m │ │ ├── TestThreadInspector.swift │ │ ├── XCTestCase+SentryCrash.h │ │ └── XCTestCase+SentryCrash.m │ ├── SentryCrashExceptionApplicationTests.swift │ ├── SentryHttpStatusCodeRangeTests.swift │ ├── SentryHubTests.swift │ ├── SentryInterfacesTests.m │ ├── SentryKSCrashReportConverterTests.m │ ├── SentryLevelTests.swift │ ├── SentryMsgPackSerializerTests.m │ ├── SentryNSDataCompressionTests.m │ ├── SentryNSURLRequestTests.swift │ ├── SentryOptionsTest.m │ ├── SentryPredicateDescriptorTests.swift │ ├── SentryPropagationContextTests.swift │ ├── SentrySDK+Tests.h │ ├── SentrySDKIntegrationTestsBase.swift │ ├── SentrySDKTests.swift │ ├── SentryScope+Equality.h │ ├── SentryScope+Equality.m │ ├── SentryScope+Properties.h │ ├── SentryScopeSwiftTests.swift │ ├── SentryScopeTests.m │ ├── SentryScreenShotTests.swift │ ├── SentrySessionTests.m │ ├── SentrySessionTests.swift │ ├── SentrySpanIdTests.swift │ ├── SentryTests-Bridging-Header.h │ ├── SentryTests.m │ ├── SentryTraceProfiler+Test.h │ ├── SentryUIApplication+Private.h │ ├── SentryUIApplicationTests.swift │ ├── SentryViewHierarchyTests.swift │ ├── SentryWeakMapTests.swift │ ├── State │ │ ├── SentryInstallation+Test.h │ │ └── SentryInstallationTests.swift │ ├── Swift │ │ └── Extensions │ │ │ └── LocksTests.swift │ ├── SwiftDescriptorTests.swift │ ├── TestLogOutput.swift │ ├── TestUtils │ │ ├── Async.swift │ │ ├── EmptyIntegration.swift │ │ ├── FormatHexAddress.swift │ │ ├── SentryAssertions.swift │ │ ├── SentryBooleanSerialization.h │ │ ├── SentryBooleanSerialization.m │ │ ├── SentryClassRegistrator.h │ │ ├── SentryClassRegistrator.m │ │ ├── SentryInvalidJSONString.h │ │ ├── SentryInvalidJSONString.m │ │ ├── TestConncurrentModifications.swift │ │ └── TestExtensions.swift │ ├── Transaction │ │ ├── SentryBaggageTests.swift │ │ ├── SentryBuildAppStartSpansTests.swift │ │ ├── SentryNoOpSpanTests.swift │ │ ├── SentrySpanContextTests.swift │ │ ├── SentrySpanTests.swift │ │ ├── SentryTraceContextTests.swift │ │ ├── SentryTracer+Test.h │ │ ├── SentryTracer+Test.m │ │ ├── SentryTracerTests.swift │ │ ├── SentryTransactionContextTests.swift │ │ ├── SentryTransactionTests.swift │ │ ├── TestSentrySpan.h │ │ └── TestSentrySpan.m │ ├── Transactions │ │ ├── SentrySpanKeyTests.swift │ │ ├── SentrySpanOperationTests.swift │ │ └── SentryTraceOriginTests.swift │ ├── UIImageHelperTests.swift │ ├── URLSessionTaskHelperTests.swift │ ├── UrlSanitizedTests.swift │ └── ViewCapture │ │ ├── SentryViewPhotographerTests.swift │ │ └── UIRedactBuilderTests.swift └── ThreadSanitizer.sup ├── Utils └── VersionBump │ ├── .swiftlint.yml │ ├── Package.swift │ └── main.swift ├── develop-docs ├── DECISIONS.md ├── README.md ├── Swift-Usage.md ├── disabling_tests_xcode_test_plan.png ├── xcode_test_plan_uicapture_playback.png ├── xcode_test_plan_uicapture_settings.png └── xcode_tests_navigator_with_skipped_test.png ├── dprint.json ├── fastlane ├── Appfile ├── Fastfile ├── Matchfile └── Pluginfile ├── scripts ├── .clang-format-version ├── .swiftlint-version ├── build-xcframework.sh ├── bump.sh ├── check-clang-format.py ├── check-tooling-versions.sh ├── check-uikit-linkage.sh ├── ci-boot-simulator.sh ├── ci-select-xcode.sh ├── create-carthage-json.sh ├── create-cherry-pick-branch.sh ├── generate-classes.sh ├── pod-lib-lint.sh ├── process-benchmark-raw-results.py ├── sentry-xcodebuild.sh ├── test-ui-critical.sh ├── tests-with-thread-sanitizer.sh ├── update-api.sh ├── update-package-sha.sh ├── update-tooling-versions.sh ├── verify-package-sha.sh ├── xcframework-generated-run.sh ├── xcode-slowest-tests.sh └── zip_built_sdks.sh ├── sdk_api.json └── test-server ├── .dockerignore ├── .gitignore ├── Dockerfile ├── Package.swift ├── Public ├── example.json └── sentry-logo-black.png ├── Sources ├── App │ ├── Controllers │ │ └── .gitkeep │ ├── configure.swift │ └── routes.swift └── Run │ └── main.swift ├── Tests └── AppTests │ └── AppTests.swift └── docker-compose.yml /.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: WebKit 2 | IndentWidth: 4 3 | IndentPPDirectives: AfterHash 4 | ColumnLimit: 100 5 | AlwaysBreakAfterDefinitionReturnType: All 6 | PointerAlignment: Right 7 | ForEachMacros: ['SENTRY_WITH_SCOPE', 'SENTRY_WITH_SCOPE_MUT'] 8 | -------------------------------------------------------------------------------- /.craft.yml: -------------------------------------------------------------------------------- 1 | minVersion: 0.23.1 2 | changelogPolicy: auto 3 | preReleaseCommand: bash ./scripts/bump.sh 4 | targets: 5 | - name: github 6 | - name: cocoapods 7 | id: sentry-cocoapod 8 | specPath: Sentry.podspec 9 | - name: registry 10 | sdks: 11 | cocoapods:sentry-cocoa: 12 | -------------------------------------------------------------------------------- /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | 330a6ba13400d3bc01c85144c5006ce16d307704 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | CHANGELOG.md merge=union 2 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @philipphofmann @armcknight @philprime @noahsmartin @trevor-e @itaybre @nicohinderling 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Join Sentry Discord 4 | url: https://discord.com/invite/sentry 5 | about: A place to talk about SDK development and other Sentry related topics. It's not meant as a support channel. 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/maintainer-blank.yml: -------------------------------------------------------------------------------- 1 | name: Blank Issue 2 | description: Blank Issue. Reserved for maintainers. 3 | labels: ["Platform: Cocoa"] 4 | body: 5 | - type: textarea 6 | id: description 7 | attributes: 8 | label: Description 9 | description: Please describe the issue. 10 | validations: 11 | required: true 12 | 13 | - type: markdown 14 | attributes: 15 | value: |- 16 | ## Thanks 🙏 17 | Check our [triage docs](https://open.sentry.io/triage/) for what to expect next. 18 | validations: 19 | required: false 20 | -------------------------------------------------------------------------------- /.github/actions/capture-screenshot/action.yml: -------------------------------------------------------------------------------- 1 | name: "Capture screenshot" 2 | description: "Captures a screenshot of the machine" 3 | runs: 4 | using: "composite" 5 | steps: 6 | - name: Capture screenshot 7 | shell: bash 8 | run: | 9 | screencapture -x /tmp/screenshot.png 10 | - name: Store screenshot 11 | uses: actions/upload-artifact@v4 12 | with: 13 | name: screenshot 14 | path: /tmp/screenshot.png 15 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: bundler 4 | directory: "/" 5 | schedule: 6 | interval: weekly 7 | open-pull-requests-limit: 10 8 | ignore: 9 | - dependency-name: fastlane 10 | versions: 11 | - 2.179.0 12 | 13 | - package-ecosystem: "github-actions" 14 | directory: "/" 15 | schedule: 16 | interval: weekly 17 | -------------------------------------------------------------------------------- /.github/labeler.yml: -------------------------------------------------------------------------------- 1 | 'Platform: Cocoa': 2 | - ** 3 | -------------------------------------------------------------------------------- /.github/last-release-runid: -------------------------------------------------------------------------------- 1 | 15470305097 2 | -------------------------------------------------------------------------------- /.github/workflows/danger.yml: -------------------------------------------------------------------------------- 1 | name: Danger 2 | 3 | on: 4 | pull_request: 5 | types: [opened, synchronize, reopened, edited, ready_for_review] 6 | 7 | jobs: 8 | danger: 9 | uses: getsentry/github-workflows/.github/workflows/danger.yml@v2 10 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/.gitmodules -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v22.13.1 2 | -------------------------------------------------------------------------------- /.oclint: -------------------------------------------------------------------------------- 1 | # OCLint config example 2 | 3 | rules: 4 | disable-rules: 5 | - GotoStatement 6 | - UnusedMethodParameter 7 | - PreferEarlyExit 8 | - TooFewBranchesInSwitchStatement 9 | - EmptyIfStatement 10 | - SwitchStatementsDon'TNeedDefaultWhenFullyCovered 11 | 12 | rule-configurations: 13 | - key: LONG_LINE 14 | value: 300 15 | - key: SHORT_VARIABLE_NAME 16 | value: 1 17 | - key: LONG_VARIABLE_NAME 18 | value: 64 19 | 20 | max-priority-1: 0 21 | max-priority-2: 20 22 | max-priority-3: 30 23 | 24 | enable-clang-static-analyzer: false 25 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 3.3.0 2 | -------------------------------------------------------------------------------- /.slather.yml: -------------------------------------------------------------------------------- 1 | # .slather.yml 2 | 3 | coverage_service: cobertura_xml 4 | xcodeproj: Sentry.xcodeproj 5 | workspace: Sentry.xcworkspace 6 | scheme: Sentry 7 | source_directory: Sources 8 | output_directory: slather 9 | -------------------------------------------------------------------------------- /.spi.yml: -------------------------------------------------------------------------------- 1 | version: 1 2 | builder: 3 | configs: 4 | - scheme: Sentry 5 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dprint.dprint" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /Brewfile: -------------------------------------------------------------------------------- 1 | brew 'pre-commit' 2 | brew 'python3' 3 | brew 'xcbeautify' 4 | brew 'rbenv' 5 | brew 'dprint' 6 | -------------------------------------------------------------------------------- /Brewfile-ci-build: -------------------------------------------------------------------------------- 1 | brew 'xcodegen' 2 | -------------------------------------------------------------------------------- /Brewfile-ci-deploy: -------------------------------------------------------------------------------- 1 | brew 'carthage' 2 | -------------------------------------------------------------------------------- /Brewfile-ci-format: -------------------------------------------------------------------------------- 1 | brew 'clang-format' 2 | brew 'swiftlint' 3 | -------------------------------------------------------------------------------- /Brewfile-ci-test: -------------------------------------------------------------------------------- 1 | tap 'facebook/fb' 2 | brew 'facebook/fb/idb-companion' 3 | tap 'mobile-dev-inc/tap' 4 | brew 'mobile-dev-inc/tap/maestro' 5 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "bundler", ">= 2" 4 | gem "cocoapods", ">= 1.9.1" 5 | gem "fastlane" 6 | gem "rest-client" 7 | gem "slather" 8 | 9 | eval_gemfile("fastlane/Pluginfile") 10 | -------------------------------------------------------------------------------- /MIGRATION.md: -------------------------------------------------------------------------------- 1 | We moved the migration guide to the [docs](https://docs.sentry.io/platforms/apple/migration/). 2 | -------------------------------------------------------------------------------- /Plans/SentrySwiftUI_Base.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "EBB4F92C-3CA9-47E0-8589-7934881F1E4B", 5 | "name" : "Configuration 1", 6 | "options" : { 7 | 8 | } 9 | } 10 | ], 11 | "defaultOptions" : { 12 | "uiTestingScreenshotsLifetime" : "keepAlways" 13 | }, 14 | "testTargets" : [ 15 | { 16 | "target" : { 17 | "containerPath" : "container:Sentry.xcodeproj", 18 | "identifier" : "D833D61E2D1321C100961E7A", 19 | "name" : "SentrySwiftUITests" 20 | } 21 | } 22 | ], 23 | "version" : 1 24 | } 25 | -------------------------------------------------------------------------------- /Plans/SwiftUITestSample_Base.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "D5A59117-63AC-45A7-9579-3E6C2F6A84D5", 5 | "name" : "Configuration 1", 6 | "options" : { 7 | 8 | } 9 | } 10 | ], 11 | "defaultOptions" : { 12 | "uiTestingScreenshotsLifetime" : "keepAlways" 13 | }, 14 | "testTargets" : [ 15 | 16 | ], 17 | "version" : 1 18 | } 19 | -------------------------------------------------------------------------------- /Plans/iOS-ObjectiveC_Base.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "173FBB9B-B4CC-41DC-83E8-5E77057D3191", 5 | "name" : "Configuration 1", 6 | "options" : { 7 | 8 | } 9 | } 10 | ], 11 | "defaultOptions" : { 12 | "uiTestingScreenshotsLifetime" : "keepAlways" 13 | }, 14 | "testTargets" : [ 15 | { 16 | "target" : { 17 | "containerPath" : "container:iOS-ObjectiveC.xcodeproj", 18 | "identifier" : "943D6C233ABD091EE39BDE11", 19 | "name" : "iOS-ObjectiveC-UITests" 20 | } 21 | } 22 | ], 23 | "version" : 1 24 | } 25 | -------------------------------------------------------------------------------- /Plans/iOS-Swift6_Base.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "909225DF-87C5-4ED2-96FD-C6723E160197", 5 | "name" : "Configuration 1", 6 | "options" : { 7 | 8 | } 9 | } 10 | ], 11 | "defaultOptions" : { 12 | "uiTestingScreenshotsLifetime" : "keepAlways" 13 | }, 14 | "testTargets" : [ 15 | { 16 | "target" : { 17 | "containerPath" : "container:iOS-Swift6.xcodeproj", 18 | "identifier" : "70F6260DD64A9D7AC4C7A53F", 19 | "name" : "iOS-Swift6-UITests" 20 | } 21 | } 22 | ], 23 | "version" : 1 24 | } 25 | -------------------------------------------------------------------------------- /Plans/macOS-SwiftUI_Base.xctestplan: -------------------------------------------------------------------------------- 1 | { 2 | "configurations" : [ 3 | { 4 | "id" : "232A08C3-49ED-43CF-BE70-9AD86310BF97", 5 | "name" : "Configuration 1", 6 | "options" : { 7 | 8 | } 9 | } 10 | ], 11 | "defaultOptions" : { 12 | "uiTestingScreenshotsLifetime" : "keepAlways" 13 | }, 14 | "testTargets" : [ 15 | 16 | ], 17 | "version" : 1 18 | } 19 | -------------------------------------------------------------------------------- /Samples/.swiftlint.yml: -------------------------------------------------------------------------------- 1 | parent_config: ../.swiftlint.yml 2 | 3 | disabled_rules: 4 | - force_cast 5 | - force_try 6 | - force_unwrapping 7 | - identifier_name 8 | - object_literal 9 | - private_outlet 10 | - unused_optional_binding 11 | 12 | # This rule allows UIViewControllers to have only 250 lines of code. The argument is that you should 13 | # extract business logic into extra classes. We deliberately turn this off because the extra classes 14 | # could make our samples harder to read, and our business logic is simple. 15 | - type_body_length 16 | -------------------------------------------------------------------------------- /Samples/Carthage-Validation/XCFramework/Cartfile: -------------------------------------------------------------------------------- 1 | binary "../Sentry.Carthage.json" ~> 1.0 2 | binary "../SentrySwiftUI.Carthage.json" ~> 1.0 3 | -------------------------------------------------------------------------------- /Samples/Carthage-Validation/XCFramework/XCFramework.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Samples/Carthage-Validation/XCFramework/XCFramework.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Samples/Carthage-Validation/XCFramework/XCFramework/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors": [ 3 | { 4 | "idiom": "universal" 5 | } 6 | ], 7 | "info": { 8 | "author": "xcode", 9 | "version": 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Samples/Carthage-Validation/XCFramework/XCFramework/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Samples/Carthage-Validation/XCFramework/XCFramework/CheckTracedView.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import SentrySwiftUI 3 | import SwiftUI 4 | 5 | public struct CheckTracedView: View { 6 | public let content: () -> Content 7 | 8 | public init(content: @escaping () -> Content) { 9 | self.content = content 10 | } 11 | 12 | public var body: some View { 13 | SentryTracedView { 14 | content() 15 | } 16 | } 17 | } 18 | 19 | extension View { 20 | public func traceView(_ viewName: String? = nil) -> some View { 21 | sentryTrace(viewName) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Samples/Carthage-Validation/XCFramework/XCFramework/ContentView.swift: -------------------------------------------------------------------------------- 1 | import Sentry 2 | import SwiftUI 3 | 4 | struct ContentView: View { 5 | var body: some View { 6 | VStack { 7 | Button("CaptureMessage") { 8 | SentrySDK.capture(message: "Yeah captured a message") 9 | } 10 | } 11 | } 12 | } 13 | 14 | struct ContentView_Previews: PreviewProvider { 15 | static var previews: some View { 16 | ContentView() 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Samples/Carthage-Validation/XCFramework/XCFramework/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Samples/SPM-Dynamic/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | /*.xcodeproj 5 | xcuserdata/ 6 | DerivedData/ 7 | .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata 8 | -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/100.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/128 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/128 1.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/144.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/152.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/16 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/16 1.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/167.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/20.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/256 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/256 1.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/256 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/256 2.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/32 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/32 1.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/32 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/32 2.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/50.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/512 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/512 1.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/512 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/512 2.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/64.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/72.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/76.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SampleAssets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /Samples/SampleAssets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Samples/SentrySampleShared/SentrySampleShared/LoremIpsumText.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public class BundleResourceProvider: NSObject { 4 | public static var loremIpsumTextFilePath: String? { 5 | Bundle(for: self).path(forResource: "LoremIpsum", ofType: "txt") 6 | } 7 | 8 | @objc public static var screenshotURL: URL? { 9 | Bundle(for: self).url(forResource: "screenshot", withExtension: "png") 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Samples/SentrySampleShared/SentrySampleShared/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/SentrySampleShared/SentrySampleShared/screenshot.png -------------------------------------------------------------------------------- /Samples/SessionReplay-CameraTest/Sources/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors": [ 3 | { 4 | "idiom": "universal" 5 | } 6 | ], 7 | "info": { 8 | "author": "xcode", 9 | "version": 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Samples/SessionReplay-CameraTest/Sources/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Samples/SessionReplay-CameraTest/Sources/PreviewView.swift: -------------------------------------------------------------------------------- 1 | import AVFoundation 2 | import UIKit 3 | 4 | class PreviewView: UIView { 5 | override class var layerClass: AnyClass { 6 | AVCaptureVideoPreviewLayer.self 7 | } 8 | 9 | /// Convenience wrapper to get layer as its statically known type. 10 | var videoPreviewLayer: AVCaptureVideoPreviewLayer { 11 | layer as! AVCaptureVideoPreviewLayer 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Samples/SessionReplay-CameraTest/Sources/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 4 | var window: UIWindow? 5 | } 6 | -------------------------------------------------------------------------------- /Samples/SessionReplay-CameraTest/Sources/SessionReplay-CameraTest.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/Shared/Config/Architectures.xcconfig: -------------------------------------------------------------------------------- 1 | ONLY_ACTIVE_ARCH_Debug = YES 2 | ONLY_ACTIVE_ARCH_Test = YES 3 | ONLY_ACTIVE_ARCH_TestCI = YES 4 | ONLY_ACTIVE_ARCH_Release = NO 5 | ONLY_ACTIVE_ARCH = $(ONLY_ACTIVE_ARCH_$(CONFIGURATION)) 6 | 7 | SDKROOT = auto 8 | -------------------------------------------------------------------------------- /Samples/Shared/Config/AssetCatalog.xcconfig: -------------------------------------------------------------------------------- 1 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon 2 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor 3 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES 4 | -------------------------------------------------------------------------------- /Samples/Shared/Config/ClangAnalyzer.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_ANALYZER_NONNULL = YES 2 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE 3 | -------------------------------------------------------------------------------- /Samples/Shared/Config/ClangCppLanguage.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_CXX_LANGUAGE_STANDARD = c++14 2 | -------------------------------------------------------------------------------- /Samples/Shared/Config/ClangLanguage.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_C_LANGUAGE_STANDARD = gnu17 2 | CLANG_CXX_LIBRARY = libc++ 3 | -------------------------------------------------------------------------------- /Samples/Shared/Config/ClangModules.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_ENABLE_MODULES = YES 2 | -------------------------------------------------------------------------------- /Samples/Shared/Config/ClangObjCLanguage.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_ENABLE_OBJC_ARC = YES 2 | CLANG_ENABLE_OBJC_WEAK = YES 3 | -------------------------------------------------------------------------------- /Samples/Shared/Config/ClangPreprocessing.xcconfig: -------------------------------------------------------------------------------- 1 | ENABLE_STRICT_OBJC_MSGSEND = YES 2 | 3 | ENABLE_NS_ASSERTIONS_Debug = YES 4 | ENABLE_NS_ASSERTIONS_Test = NO 5 | ENABLE_NS_ASSERTIONS_TestCI = NO 6 | ENABLE_NS_ASSERTIONS_Release = NO 7 | ENABLE_NS_ASSERTIONS = $(ENABLE_NS_ASSERTIONS_$(CONFIGURATION)) 8 | 9 | GCC_PREPROCESSOR_DEFINITIONS_Debug = DEBUG=1 $(inherited) 10 | GCC_PREPROCESSOR_DEFINITIONS_Test = TEST=1 $(inherited) 11 | GCC_PREPROCESSOR_DEFINITIONS_TestCI = TESTCI=1 $(inherited) 12 | GCC_PREPROCESSOR_DEFINITIONS_Release = RELEASE=1 $(inherited) 13 | GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS_$(CONFIGURATION)) 14 | -------------------------------------------------------------------------------- /Samples/Shared/Config/ClangWarningsCpp.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES 2 | CLANG_WARN_SUSPICIOUS_MOVE = YES 3 | -------------------------------------------------------------------------------- /Samples/Shared/Config/ClangWarningsObjC.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES 2 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR 3 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 4 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES 5 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR 6 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 7 | -------------------------------------------------------------------------------- /Samples/Shared/Config/CodeGeneration.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_DYNAMIC_NO_PIC = NO 2 | GCC_NO_COMMON_BLOCKS = YES 3 | 4 | GCC_OPTIMIZATION_LEVEL_Debug = 0 5 | GCC_OPTIMIZATION_LEVEL_Test = 0 6 | GCC_OPTIMIZATION_LEVEL_TestCI = 0 7 | GCC_OPTIMIZATION_LEVEL_Release = s 8 | GCC_OPTIMIZATION_LEVEL = $(GCC_OPTIMIZATION_LEVEL_$(CONFIGURATION)) 9 | -------------------------------------------------------------------------------- /Samples/Shared/Config/Deployment.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Sources/Configuration/DeploymentTargets.xcconfig" 2 | 3 | COPY_PHASE_STRIP = NO 4 | TARGETED_DEVICE_FAMILY = 1,2 5 | -------------------------------------------------------------------------------- /Samples/Shared/Config/Linking.xcconfig: -------------------------------------------------------------------------------- 1 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks 2 | -------------------------------------------------------------------------------- /Samples/Shared/Config/Localization.xcconfig: -------------------------------------------------------------------------------- 1 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES 2 | SWIFT_EMIT_LOC_STRINGS = YES 3 | -------------------------------------------------------------------------------- /Samples/Shared/Config/Metal.xcconfig: -------------------------------------------------------------------------------- 1 | MTL_ENABLE_DEBUG_INFO_Debug = INCLUDE_SOURCE 2 | MTL_ENABLE_DEBUG_INFO_Release = NO 3 | MTL_ENABLE_DEBUG_INFO_Test = NO 4 | MTL_ENABLE_DEBUG_INFO_TestCI = NO 5 | MTL_ENABLE_DEBUG_INFO = $(MTL_ENABLE_DEBUG_INFO_$(CONFIGURATION) 6 | 7 | MTL_FAST_MATH = YES 8 | -------------------------------------------------------------------------------- /Samples/Shared/Config/Packaging.xcconfig: -------------------------------------------------------------------------------- 1 | GENERATE_INFOPLIST_FILE = NO 2 | PRODUCT_NAME = $(TARGET_NAME) 3 | -------------------------------------------------------------------------------- /Samples/Shared/Config/SearchPaths.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_SEARCH_USER_PATHS = NO 2 | -------------------------------------------------------------------------------- /Samples/Shared/Config/Versioning.xcconfig: -------------------------------------------------------------------------------- 1 | CURRENT_PROJECT_VERSION = 1 2 | MARKETING_VERSION = 8.52.1 3 | -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/100.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/1024 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/1024 1.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/1024 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/1024 2.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/128 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/128 1.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/144.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/152.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/16 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/16 1.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/167.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/20.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/256 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/256 1.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/256 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/256 2.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/32 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/32 1.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/32 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/32 2.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/50.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/512 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/512 1.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/512 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/512 2.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/64.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/72.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/76.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/Shared/SampleAssets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /Samples/Shared/SampleAssets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Samples/Shared/inject-git-info.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -x 4 | 5 | GIT_STATUS_CLEAN=1 6 | if test -n "$(git status --porcelain)"; then 7 | GIT_STATUS_CLEAN=0 8 | fi 9 | /usr/libexec/PlistBuddy -c "Set :GIT_STATUS_CLEAN $GIT_STATUS_CLEAN" "${INFOPLIST_FILE}" 10 | 11 | COMMIT_HASH=$(git rev-parse --short HEAD) 12 | /usr/libexec/PlistBuddy -c "Set :GIT_COMMIT_HASH $COMMIT_HASH" "${INFOPLIST_FILE}" 13 | 14 | BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) 15 | /usr/libexec/PlistBuddy -c "Set :GIT_BRANCH $BRANCH_NAME" "${INFOPLIST_FILE}" 16 | -------------------------------------------------------------------------------- /Samples/Shared/reset-git-info.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # we need to reset these after copying the modified plist into the app bundle, so we don't 4 | # constantly have updates being committed to the plist in git 5 | 6 | /usr/libexec/PlistBuddy -c "Set :GIT_COMMIT_HASH " "${INFOPLIST_FILE}" 7 | /usr/libexec/PlistBuddy -c "Set :GIT_BRANCH " "${INFOPLIST_FILE}" 8 | /usr/libexec/PlistBuddy -c "Set :GIT_STATUS_CLEAN " "${INFOPLIST_FILE}" 9 | -------------------------------------------------------------------------------- /Samples/iOS-Cocoapods-Swift6/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '11.0' 2 | use_frameworks! 3 | 4 | target 'App' do 5 | pod 'Sentry', :path => "../../" 6 | end 7 | -------------------------------------------------------------------------------- /Samples/iOS-Cocoapods-Swift6/Sources/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors": [ 3 | { 4 | "idiom": "universal" 5 | } 6 | ], 7 | "info": { 8 | "author": "xcode", 9 | "version": 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Samples/iOS-Cocoapods-Swift6/Sources/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Samples/iOS-Cocoapods-Swift6/Sources/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 4 | var window: UIWindow? 5 | } 6 | -------------------------------------------------------------------------------- /Samples/iOS-Cocoapods-Swift6/Sources/ViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | class ViewController: UIViewController {} 4 | -------------------------------------------------------------------------------- /Samples/iOS-Cocoapods-Swift6/fastlane/.gitignore: -------------------------------------------------------------------------------- 1 | test_output/* 2 | test_results/* 3 | README.md 4 | -------------------------------------------------------------------------------- /Samples/iOS-Cocoapods-Swift6/fastlane/Fastfile: -------------------------------------------------------------------------------- 1 | default_platform(:ios) 2 | 3 | platform :ios do 4 | lane :cocoapods_integration_test do |options| 5 | cocoapods( 6 | clean_install: true 7 | ) 8 | run_tests( 9 | workspace: "iOS-Cocoapods-Swift6.xcworkspace", 10 | scheme: "App", 11 | build_for_testing: true 12 | ) 13 | run_tests( 14 | workspace: "iOS-Cocoapods-Swift6.xcworkspace", 15 | scheme: "App", 16 | test_without_building: true, 17 | result_bundle: true, 18 | result_bundle_path: "fastlane/test_results/results.xcresult" 19 | ) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /Samples/iOS-Cocoapods-Swift6/iOS-Cocoapods-Swift6.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Samples/iOS-ObjectiveC/iOS-ObjectiveC-UITests/LaunchUITests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class LaunchUITests: XCTestCase { 4 | 5 | override func setUpWithError() throws { 6 | try super.setUpWithError() 7 | continueAfterFailure = false 8 | } 9 | 10 | func testLaunch() throws { 11 | let app = XCUIApplication() 12 | app.launch() 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface AppDelegate : UIResponder 4 | 5 | @property (nonatomic, strong) UIWindow *window; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Samples/iOS-ObjectiveC/iOS-ObjectiveC/InitializerViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /** 4 | * An empty ViewController to ensure the swizzling of the SentrySDK doesn't call the initialize 5 | * method from a background thread. The initializer method is called before the runtime sends its 6 | * first message to the class, which is also the case when swizzling a class. For more information 7 | * checkout SentryUIViewControllerSwizzling. 8 | */ 9 | @interface InitializerViewController : UIViewController 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Samples/iOS-ObjectiveC/iOS-ObjectiveC/InitializerViewController.m: -------------------------------------------------------------------------------- 1 | #import "InitializerViewController.h" 2 | #import 3 | 4 | @implementation InitializerViewController 5 | 6 | + (void)initialize 7 | { 8 | NSAssert([NSThread isMainThread], @"Initializer must only be called from the main thread."); 9 | } 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Samples/iOS-ObjectiveC/iOS-ObjectiveC/NoARCCrash.h: -------------------------------------------------------------------------------- 1 | /** 2 | * We need to this into an extra file so we can disable ARC with the -fno-objc-arc Compiler flag. 3 | * Otherwise, we can't call [NSObject release]. 4 | * 5 | */ 6 | void callMessageOnDeallocatedObject(void); 7 | -------------------------------------------------------------------------------- /Samples/iOS-ObjectiveC/iOS-ObjectiveC/NoARCCrash.m: -------------------------------------------------------------------------------- 1 | #import "NoARCCrash.h" 2 | #import 3 | 4 | void 5 | callMessageOnDeallocatedObject(void) 6 | { 7 | NSObject *obj = [[NSObject alloc] init]; 8 | [obj release]; // Manually releasing in MRC, making `obj` a dangling pointer 9 | [obj description]; // Sending a message to a deallocated object causes a SIGSEGV 10 | } 11 | -------------------------------------------------------------------------------- /Samples/iOS-ObjectiveC/iOS-ObjectiveC/Tongariro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-ObjectiveC/iOS-ObjectiveC/Tongariro.jpg -------------------------------------------------------------------------------- /Samples/iOS-ObjectiveC/iOS-ObjectiveC/ViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface ViewController : UIViewController 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Samples/iOS-ObjectiveC/iOS-ObjectiveC/iOS-ObjectiveC.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/iOS-ObjectiveC/iOS-ObjectiveC/main.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import 3 | 4 | int 5 | main(int argc, char *argv[]) 6 | { 7 | NSString *appDelegateClassName; 8 | @autoreleasepool { 9 | // Setup code that might create autoreleased objects goes here. 10 | appDelegateClassName = NSStringFromClass([AppDelegate class]); 11 | } 12 | return UIApplicationMain(argc, argv, nil, appDelegateClassName); 13 | } 14 | -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-Benchmarking/SentryProcessInfo.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | /** 6 | * @return YES if the process has a debugger attached. 7 | * @see https://developer.apple.com/library/archive/qa/qa1361/_index.html 8 | */ 9 | BOOL isDebugging(void); 10 | 11 | /** 12 | * @return YES if the process is running in a simulator. 13 | * @see https://stackoverflow.com/a/45329149 14 | */ 15 | BOOL isSimulator(void); 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-Swift/Sample.xcconfig: -------------------------------------------------------------------------------- 1 | MARKETING_VERSION = 8.50.1 2 | -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-Swift/Tongariro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-Swift/Tongariro.jpg -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-Swift/Tools/SentryExposure.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface SentryBreadcrumbTracker : NSObject 5 | 6 | + (NSDictionary *)extractDataFromView:(UIView *)view 7 | withAccessibilityIdentifier:(BOOL)includeIdentifier; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-Swift/Tools/iOS-Swift-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "SentryBenchmarking.h" 2 | #import "SentryExposure.h" 3 | #import 4 | #import 5 | #import 6 | -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-Swift/ViewControllers/WebViewController.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import WebKit 3 | 4 | class WebViewController: UIViewController { 5 | 6 | let webView = WKWebView() 7 | 8 | override func loadView() { 9 | self.view = webView 10 | } 11 | 12 | override func viewDidLoad() { 13 | super.viewDidLoad() 14 | if let url = URL(string: "https://sentry.io") { 15 | webView.load(URLRequest(url: url)) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-Swift/iOS-Swift.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors": [ 3 | { 4 | "idiom": "universal" 5 | } 6 | ], 7 | "info": { 8 | "author": "xcode", 9 | "version": 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/100.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/128.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/144.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/152.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/16.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/167.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/20.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/256.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/32.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/50.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/512.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/64.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/72.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/76.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/ViewController.swift: -------------------------------------------------------------------------------- 1 | import Sentry 2 | import UIKit 3 | 4 | class ViewController: UIViewController { 5 | 6 | override func viewDidLoad() { 7 | super.viewDidLoad() 8 | // Do any additional setup after loading the view. 9 | } 10 | 11 | @IBAction func crash(_ sender: Any) { 12 | SentrySDK.crash() 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Samples/iOS-Swift/iOS-SwiftClip/iOS_SwiftClip.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.parent-application-identifiers 6 | 7 | $(AppIdentifierPrefix)io.sentry.sample.iOS-Swift 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Samples/iOS-Swift6/iOS-Swift6-UITests/UITests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | final class UITests: XCTestCase { 4 | override func setUpWithError() throws { 5 | continueAfterFailure = false 6 | } 7 | 8 | @MainActor 9 | func testLaunchAndCaptureError() throws { 10 | let app = XCUIApplication() 11 | app.launch() 12 | app.buttons["btError"].tap() 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Samples/iOS-Swift6/iOS-Swift6/ViewController.swift: -------------------------------------------------------------------------------- 1 | import Sentry 2 | import UIKit 3 | 4 | class ViewController: UIViewController { 5 | @IBAction func buttonTapped(_ sender: Any) { 6 | DispatchQueue.global(qos: .utility).async { 7 | SentrySDK.capture(error: NSError(domain: "Swift 6 Test", code: -1)) 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Samples/iOS-Swift6/iOS-Swift6/iOS-Swift6.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/iOS-SwiftUI/iOS-SwiftUI/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Samples/iOS-SwiftUI/iOS-SwiftUI/SwiftUIApp.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Sentry 3 | import SentrySampleShared 4 | import SwiftUI 5 | 6 | @main 7 | struct SwiftUIApp: App { 8 | init() { 9 | SentrySDKWrapper.shared.startSentry() 10 | } 11 | 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Samples/iOS-SwiftUI/iOS-SwiftUI/TestHeaders/SentryDefines.h: -------------------------------------------------------------------------------- 1 | #import 2 | -------------------------------------------------------------------------------- /Samples/iOS-SwiftUI/iOS-SwiftUI/TestHeaders/SentrySpanProtocol.h: -------------------------------------------------------------------------------- 1 | #import 2 | -------------------------------------------------------------------------------- /Samples/iOS-SwiftUI/iOS-SwiftUI/TestHeaders/SentrySpanStatus.h: -------------------------------------------------------------------------------- 1 | #import 2 | -------------------------------------------------------------------------------- /Samples/iOS-SwiftUI/iOS-SwiftUI/bridging-headers.h: -------------------------------------------------------------------------------- 1 | #import "SentryPerformanceTracker.h" 2 | #import "SentryTracer.h" 3 | -------------------------------------------------------------------------------- /Samples/iOS-SwiftUI/iOS-SwiftUI/iOS-SwiftUI.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Samples/iOS13-Swift/iOS13-Swift/SwiftUIView.swift: -------------------------------------------------------------------------------- 1 | import SentrySwiftUI 2 | import SwiftUI 3 | 4 | struct SwiftUIView: View { 5 | var body: some View { 6 | SentryTracedView("SwiftUI View") { 7 | Text("SwiftUI!") 8 | } 9 | } 10 | } 11 | 12 | struct SwiftUIView_Previews: PreviewProvider { 13 | static var previews: some View { 14 | SwiftUIView() 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Samples/iOS13-Swift/iOS13-Swift/iOS13-Swift-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | -------------------------------------------------------------------------------- /Samples/iOS13-Swift/iOS13-Swift/iOS13-Swift.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/iOS15-SwiftUI/iOS15-SwiftUI/App.swift: -------------------------------------------------------------------------------- 1 | import Sentry 2 | import SentrySampleShared 3 | import SwiftUI 4 | 5 | @main 6 | struct SwiftUIApp: App { 7 | init() { 8 | SentrySDKWrapper.shared.startSentry() 9 | } 10 | 11 | var body: some Scene { 12 | WindowGroup { 13 | ContentView() 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Samples/iOS15-SwiftUI/iOS15-SwiftUI/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Samples/iOS15-SwiftUI/iOS15-SwiftUI/iOS15-SwiftUI.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/macOS-SPM-CommandLine/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | /*.xcodeproj 5 | xcuserdata/ 6 | DerivedData/ 7 | .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata 8 | -------------------------------------------------------------------------------- /Samples/macOS-SPM-CommandLine/Sources/macOS-SPM-CommandLine/main.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Sentry 3 | 4 | SentrySDK.start { options in 5 | options.dsn = "https://a92d50327ac74b8b9aa4ea80eccfb267@o447951.ingest.sentry.io/5428557" 6 | options.debug = true 7 | } 8 | 9 | /** 10 | Some func to build a stacktrace. 11 | */ 12 | private func captureMessage() { 13 | let eventId = SentrySDK.capture(message: "Yeah captured a message") 14 | print("\(String(describing: eventId))") 15 | SentrySDK.flush(timeout: 5) 16 | } 17 | 18 | captureMessage() 19 | -------------------------------------------------------------------------------- /Samples/macOS-Swift/Shared/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import Sentry 3 | import SentrySampleShared 4 | 5 | @NSApplicationMain 6 | class AppDelegate: NSObject, NSApplicationDelegate { 7 | func applicationDidFinishLaunching(_ aNotification: Notification) { 8 | SentrySDKWrapper.shared.startSentry() 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Samples/macOS-Swift/Shared/CppSample.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CppSample_hpp 2 | #define CppSample_hpp 3 | #if defined __cplusplus 4 | 5 | # include 6 | 7 | namespace Sentry { 8 | class CppSample { 9 | public: 10 | void throwCPPException(); 11 | void noExceptCppException() noexcept; 12 | void rethrowNoActiveCPPException(); 13 | }; 14 | } 15 | 16 | #endif /* __cplusplus */ 17 | #endif /* CppSample_hpp */ 18 | -------------------------------------------------------------------------------- /Samples/macOS-Swift/Shared/CppWrapper.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CppWrapper : NSObject 4 | - (void)throwCPPException; 5 | - (void)noExceptCppException; 6 | - (void)rethrowNoActiveCPPException; 7 | - (void)throwNSRangeException; 8 | @end 9 | -------------------------------------------------------------------------------- /Samples/macOS-Swift/Shared/MetadataViewController.swift: -------------------------------------------------------------------------------- 1 | import AppKit 2 | 3 | class MetadataViewController: NSViewController { 4 | 5 | @IBOutlet weak var isAppSandboxActive: NSButton! 6 | 7 | override func viewDidLoad() { 8 | super.viewDidLoad() 9 | 10 | // Checks which are not changing during the app lifecycle can be done here. 11 | // Any check that can change over time should be done in other lifecycle methods. 12 | let isInAppSandbox = ProcessInfo.processInfo.environment["APP_SANDBOX_CONTAINER_ID"] != nil 13 | isAppSandboxActive.state = isInAppSandbox ? .on : .off 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Samples/macOS-Swift/Shared/RaiseNSExceptionInLayoutNSView.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | import AppKit 4 | 5 | class RaiseNSExceptionInLayoutNSView: NSView { 6 | override func layout() { 7 | let userInfo: [String: String] = ["user-info-key-1": "user-info-value-1", "user-info-key-2": "user-info-value-2"] 8 | let exception = NSException(name: NSExceptionName("NSException via NSException raise"), reason: "Raised NSException", userInfo: userInfo) 9 | exception.raise() 10 | super.layout() 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Samples/macOS-Swift/Shared/SwiftUIView.swift: -------------------------------------------------------------------------------- 1 | import SentrySwiftUI 2 | import SwiftUI 3 | 4 | struct SwiftUIView: View { 5 | var body: some View { 6 | SentryTracedView("SwiftUI View (macOS)") { 7 | Text("SwiftUI!") 8 | } 9 | } 10 | } 11 | 12 | struct SwiftUIView_Previews: PreviewProvider { 13 | static var previews: some View { 14 | SwiftUIView() 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Samples/macOS-Swift/Shared/Tongariro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/macOS-Swift/Shared/Tongariro.jpg -------------------------------------------------------------------------------- /Samples/macOS-Swift/Shared/macOS-Swift-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "CppWrapper.h" 6 | -------------------------------------------------------------------------------- /Samples/macOS-Swift/Shared/macOS-Swift-Other.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/macOS-Swift/Shared/macOS-Swift-Sandboxed-Other.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Samples/macOS-Swift/Shared/macOS-Swift-Sandboxed.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Samples/macOS-Swift/Shared/macOS-Swift.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/macOS-SwiftUI/macOS-SwiftUI/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Samples/macOS-SwiftUI/macOS-SwiftUI/macOS-SwiftUI.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.network.client 10 | 11 | com.apple.security.network.server 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Samples/macOS-SwiftUI/macOS-SwiftUI/macOS_SwiftUIApp.swift: -------------------------------------------------------------------------------- 1 | import Sentry 2 | import SentrySampleShared 3 | import SwiftUI 4 | 5 | @main 6 | struct MacOSSwiftUIApp: App { 7 | @NSApplicationDelegateAdaptor private var appDelegate: MyAppDelegate 8 | 9 | var body: some Scene { 10 | WindowGroup { 11 | ContentView() 12 | } 13 | } 14 | } 15 | 16 | class MyAppDelegate: NSObject, NSApplicationDelegate, ObservableObject { 17 | func applicationDidFinishLaunching(_ aNotification: Notification) { 18 | SentrySDKWrapper.shared.startSentry() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Samples/tvOS-Swift/tvOS-SBSwift/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Sentry 2 | import SentrySampleShared 3 | import UIKit 4 | 5 | @main 6 | class AppDelegate: UIResponder, UIApplicationDelegate { 7 | var window: UIWindow? 8 | 9 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 10 | SentrySDKWrapper.shared.startSentry() 11 | return true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Samples/tvOS-Swift/tvOS-SBSwift/Controllers/NibViewController.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import UIKit 3 | 4 | class NibViewController: UIViewController { 5 | 6 | @IBOutlet var button: UIButton! 7 | 8 | override func viewDidLoad() { 9 | super.viewDidLoad() 10 | title = "NibViewController" 11 | 12 | button.backgroundColor = .black 13 | 14 | button.layer.cornerRadius = 10 15 | button.layer.masksToBounds = true 16 | 17 | button.accessibilityIdentifier = "LONELY_BUTTON" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Samples/tvOS-Swift/tvOS-SBSwift/tvOS-SBSwift.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/tvOS-Swift/tvOS-Swift/Tongariro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/tvOS-Swift/tvOS-Swift/Tongariro.jpg -------------------------------------------------------------------------------- /Samples/tvOS-Swift/tvOS-Swift/tvOS-Swift.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/visionOS-Swift/visionOS-Swift/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Samples/visionOS-Swift/visionOS-Swift/VisionOSSwiftApp.swift: -------------------------------------------------------------------------------- 1 | import Sentry 2 | import SentrySampleShared 3 | import SwiftUI 4 | 5 | @main 6 | struct VisionOSSwiftApp: App { 7 | init() { 8 | SentrySDKWrapper.shared.startSentry() 9 | } 10 | 11 | var body: some Scene { 12 | WindowGroup { 13 | ContentView() 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Samples/visionOS-Swift/visionOS-Swift/visionOS-Swift.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/watchOS-Swift/.gitignore: -------------------------------------------------------------------------------- 1 | libs -------------------------------------------------------------------------------- /Samples/watchOS-Swift/watchOS-Swift WatchKit App/watchOS-Swift-App.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/watchOS-Swift/watchOS-Swift WatchKit Extension/HostingController.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import SwiftUI 3 | import WatchKit 4 | 5 | @available(watchOSApplicationExtension 7.0, *) 6 | class HostingController: WKHostingController { 7 | override var body: ContentView { 8 | return ContentView() 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Samples/watchOS-Swift/watchOS-Swift WatchKit Extension/NotificationView.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | struct NotificationView: View { 4 | var body: some View { 5 | Text("Hello, World!") 6 | } 7 | } 8 | 9 | struct NotificationView_Previews: PreviewProvider { 10 | static var previews: some View { 11 | NotificationView() 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Samples/watchOS-Swift/watchOS-Swift WatchKit Extension/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Samples/watchOS-Swift/watchOS-Swift WatchKit Extension/Tongariro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/Samples/watchOS-Swift/watchOS-Swift WatchKit Extension/Tongariro.jpg -------------------------------------------------------------------------------- /Samples/watchOS-Swift/watchOS-Swift WatchKit Extension/watchOS-Swift-Extension.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Sentry.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Sentry.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Sentry.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Sentry.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SentryTestUtils/.swiftlint.yml: -------------------------------------------------------------------------------- 1 | parent_config: ../.swiftlint.yml 2 | 3 | disabled_rules: 4 | - force_cast 5 | - force_try 6 | - force_unwrapping 7 | - identifier_name 8 | - large_tuple 9 | -------------------------------------------------------------------------------- /SentryTestUtils/ArrayAccesses.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public extension Array { 4 | func element(at index: Int) -> Self.Element? { 5 | guard count >= index else { 6 | return nil 7 | } 8 | return self[index] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /SentryTestUtils/SentryProfilerMocks.h: -------------------------------------------------------------------------------- 1 | #import "SentryProfilingConditionals.h" 2 | #import 3 | 4 | #if SENTRY_TARGET_PROFILING_SUPPORTED 5 | 6 | # import "SentryBacktrace.hpp" 7 | 8 | using namespace sentry::profiling; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | Backtrace mockBacktrace(thread::TIDType threadID, const int threadPriority, 13 | const char *_Nullable threadName, std::vector addresses); 14 | 15 | NS_ASSUME_NONNULL_END 16 | 17 | #endif // SENTRY_TARGET_PROFILING_SUPPORTED 18 | -------------------------------------------------------------------------------- /SentryTestUtils/TestFramesTracker.swift: -------------------------------------------------------------------------------- 1 | import Sentry 2 | 3 | #if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) 4 | public class TestFramesTracker: SentryFramesTracker { 5 | public var expectedFrames: SentryScreenFrames? 6 | 7 | public override func currentFrames() -> SentryScreenFrames { 8 | expectedFrames ?? super.currentFrames() 9 | } 10 | } 11 | #endif // os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) 12 | -------------------------------------------------------------------------------- /SentryTestUtils/TestOptions.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Sentry 3 | 4 | public extension Options { 5 | func setIntegrations(_ integrations: [AnyClass]) { 6 | self.integrations = integrations.map { 7 | NSStringFromClass($0) 8 | } 9 | } 10 | 11 | func removeAllIntegrations() { 12 | self.integrations = [] 13 | } 14 | 15 | static func noIntegrations() -> Options { 16 | let options = Options() 17 | options.removeAllIntegrations() 18 | return options 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /SentryTestUtils/TestRandom.swift: -------------------------------------------------------------------------------- 1 | import _SentryPrivate 2 | import Foundation 3 | 4 | public class TestRandom: SentryRandomProtocol { 5 | 6 | public var value: Double 7 | 8 | public init(value: Double) { 9 | self.value = value 10 | } 11 | 12 | public func nextNumber() -> Double { 13 | return value 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SentryTestUtils/TimeInterval+Sentry.swift: -------------------------------------------------------------------------------- 1 | public extension TimeInterval { 2 | func toNanoSeconds() -> UInt64 { 3 | return UInt64(self * Double(NSEC_PER_SEC)) 4 | } 5 | } 6 | 7 | public extension UInt64 { 8 | func toTimeInterval() -> TimeInterval { 9 | return Double(self) / Double(NSEC_PER_SEC) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SentryTestUtils/WeakReference.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A wrapper class for a weak reference, which is handy when keeping a list 4 | /// of objects with only weak references. For example, the invocations class 5 | /// keeps track of method invocation arguments. You can use this class if 6 | /// you don't want the invocations class to retain objects. 7 | public class WeakReference { 8 | weak var value: T? 9 | init (value: T) { 10 | self.value = value 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /SentryTestUtilsDynamic/ExternalUIViewController.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | #if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) 4 | import UIKit 5 | 6 | //This class is used to test swizzling of view controllers in external libs 7 | public class ExternalUIViewController: UIViewController { 8 | } 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /SentryTestUtilsDynamic/SentryTestUtilsDynamic.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | //! Project version number for SentryTestUtilsDynamic. 4 | FOUNDATION_EXPORT double SentryTestUtilsDynamicVersionNumber; 5 | 6 | //! Project version string for SentryTestUtilsDynamic. 7 | FOUNDATION_EXPORT const unsigned char SentryTestUtilsDynamicVersionString[]; 8 | 9 | // In this header, you should import all the public headers of your framework using statements like 10 | // #import 11 | -------------------------------------------------------------------------------- /Sources/Configuration/DeploymentTargets.xcconfig: -------------------------------------------------------------------------------- 1 | MACOSX_DEPLOYMENT_TARGET = 10.13 2 | IPHONEOS_DEPLOYMENT_TARGET = 11.0 3 | WATCHOS_DEPLOYMENT_TARGET = 4.0 4 | TVOS_DEPLOYMENT_TARGET = 11.0 5 | XROS_DEPLOYMENT_TARGET = 1.0 6 | -------------------------------------------------------------------------------- /Sources/Configuration/Versioning.xcconfig: -------------------------------------------------------------------------------- 1 | CURRENT_PROJECT_VERSION = 1 2 | MARKETING_VERSION = 8.52.1 3 | -------------------------------------------------------------------------------- /Sources/Resources/SentryWithoutUIKit.modulemap: -------------------------------------------------------------------------------- 1 | framework module SentryWithoutUIKit { 2 | umbrella header "SentryWithoutUIKit.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Sources/Resources/ThreadSanitizer.sup: -------------------------------------------------------------------------------- 1 | # ThreadSanitizer suppressions file 2 | # For syntax details, see https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions 3 | 4 | # Races to fix 5 | race:returnResponse 6 | race:enableNetworkBreadcrumbs 7 | race:disable 8 | race:URLSessionDataTaskMock 9 | race:getOriginalImplementation 10 | race:SentrySpanContext 11 | 12 | # False positives 13 | # SentryLog isn't 100% thread safe, which we accept. For more information read the code docs of SentryLog. 14 | race:SentryLog 15 | -------------------------------------------------------------------------------- /Sources/Sentry/Profiling/SentrySample.m: -------------------------------------------------------------------------------- 1 | #import "SentrySample.h" 2 | 3 | @implementation SentrySample 4 | @end 5 | -------------------------------------------------------------------------------- /Sources/Sentry/Public/SentryCrashExceptionApplication.h: -------------------------------------------------------------------------------- 1 | // Don't move Foundation.h. We need it here in order to have 2 | // TargetConditionals.h automatically imported. This is needed 3 | // so that `#if TARGET_OS_OSX` is working fine. If we move 4 | // this the SDK breaks for MacOS. 5 | #import 6 | 7 | // Required for capturing uncaught exceptions in macOS. For more info see 8 | // https://docs.sentry.io/platforms/apple/guides/macos/usage/#capturing-uncaught-exceptions-in-macos 9 | #if TARGET_OS_OSX 10 | # import 11 | @interface SentryCrashExceptionApplication : NSApplication 12 | @end 13 | #endif 14 | -------------------------------------------------------------------------------- /Sources/Sentry/Public/SentryDsn.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentryDsn : NSObject 6 | 7 | @property (nonatomic, strong, readonly) NSURL *url; 8 | 9 | - (_Nullable instancetype)initWithString:(NSString *)dsnString 10 | didFailWithError:(NSError *_Nullable *_Nullable)error; 11 | 12 | - (NSString *)getHash; 13 | 14 | - (NSURL *)getStoreEndpoint; 15 | - (NSURL *)getEnvelopeEndpoint; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Sources/Sentry/Public/SentryIntegrationProtocol.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @class SentryOptions; 6 | 7 | @protocol SentryIntegrationProtocol 8 | 9 | /** 10 | * Installs the integration and returns YES if successful. 11 | */ 12 | - (BOOL)installWithOptions:(SentryOptions *)options NS_SWIFT_NAME(install(with:)); 13 | 14 | /** 15 | * Uninstalls the integration. 16 | */ 17 | - (void)uninstall; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Sources/Sentry/Public/SentryProfilingConditionals.h: -------------------------------------------------------------------------------- 1 | #ifndef SentryProfilingConditionals_h 2 | #define SentryProfilingConditionals_h 3 | 4 | #include 5 | 6 | // tvOS and watchOS do not support the kernel APIs required by our profiler 7 | // e.g. mach_msg, thread_suspend, thread_resume; we haven't yet tested on 8 | // visionOS 9 | #if TARGET_OS_WATCH || TARGET_OS_TV || (defined(TARGET_OS_VISION) && TARGET_OS_VISION) 10 | # define SENTRY_TARGET_PROFILING_SUPPORTED 0 11 | #else 12 | # define SENTRY_TARGET_PROFILING_SUPPORTED 1 13 | #endif 14 | 15 | #endif /* SentryProfilingConditionals_h */ 16 | -------------------------------------------------------------------------------- /Sources/Sentry/Public/SentrySampleDecision.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /** 4 | * Trace sample decision flag. 5 | */ 6 | typedef NS_ENUM(NSUInteger, SentrySampleDecision) { 7 | /** 8 | * Used when the decision to sample a trace should be postponed. 9 | */ 10 | kSentrySampleDecisionUndecided, 11 | 12 | /** 13 | * The trace should be sampled. 14 | */ 15 | kSentrySampleDecisionYes, 16 | 17 | /** 18 | * The trace should not be sampled. 19 | */ 20 | kSentrySampleDecisionNo 21 | }; 22 | -------------------------------------------------------------------------------- /Sources/Sentry/SentryCrashDefaultBinaryImageProvider.m: -------------------------------------------------------------------------------- 1 | #import "SentryCrashDefaultBinaryImageProvider.h" 2 | #import "SentryCrashBinaryImageProvider.h" 3 | #import "SentryCrashDynamicLinker.h" 4 | #import 5 | 6 | @implementation SentryCrashDefaultBinaryImageProvider 7 | 8 | - (NSInteger)getImageCount 9 | { 10 | return sentrycrashdl_imageCount(); 11 | } 12 | 13 | - (SentryCrashBinaryImage)getBinaryImage:(NSInteger)index isCrash:(BOOL)isCrash 14 | { 15 | SentryCrashBinaryImage image = { 0 }; 16 | sentrycrashdl_getBinaryImage((int)index, &image, isCrash); 17 | return image; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Sources/Sentry/SentryCrashExceptionApplicationHelper.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #if TARGET_OS_OSX 4 | 5 | @interface SentryCrashExceptionApplicationHelper : NSObject 6 | + (void)reportException:(NSException *)exception; 7 | + (void)_crashOnException:(NSException *)exception; 8 | @end 9 | #endif 10 | -------------------------------------------------------------------------------- /Sources/Sentry/SentryLevelHelper.m: -------------------------------------------------------------------------------- 1 | #import "SentryLevelHelper.h" 2 | #import "SentryBreadcrumb+Private.h" 3 | #import "SentryEvent.h" 4 | 5 | @implementation SentryLevelBridge : NSObject 6 | + (NSUInteger)breadcrumbLevel:(SentryBreadcrumb *)breadcrumb 7 | { 8 | return breadcrumb.level; 9 | } 10 | 11 | + (void)setBreadcrumbLevel:(SentryBreadcrumb *)breadcrumb level:(NSUInteger)level 12 | { 13 | breadcrumb.level = level; 14 | } 15 | 16 | + (void)setBreadcrumbLevelOnEvent:(SentryEvent *)event level:(NSUInteger)level 17 | { 18 | event.level = level; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Sources/Sentry/SentryLevelMapper.m: -------------------------------------------------------------------------------- 1 | #import "SentryLevelMapper.h" 2 | #import "SentrySwift.h" 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | SentryLevel 6 | sentryLevelForString(NSString *string) 7 | { 8 | return [SentryLevelHelper levelForName:string]; 9 | } 10 | 11 | NSString * 12 | nameForSentryLevel(SentryLevel level) 13 | { 14 | return [SentryLevelHelper nameForLevel:level]; 15 | } 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Sources/Sentry/SentryNSError.m: -------------------------------------------------------------------------------- 1 | #import "SentryNSError.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @implementation SentryNSError 7 | 8 | - (instancetype)initWithDomain:(NSString *)domain code:(NSInteger)code 9 | { 10 | if (self = [super init]) { 11 | _domain = domain; 12 | _code = code; 13 | } 14 | return self; 15 | } 16 | 17 | - (NSDictionary *)serialize 18 | { 19 | return @{ @"domain" : self.domain, @"code" : @(self.code) }; 20 | } 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Sources/Sentry/SentryPropagationContext.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class SentryId; 4 | @class SentrySpanId; 5 | @class SentryTraceHeader; 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | @interface SentryPropagationContext : NSObject 10 | 11 | @property (nonatomic, strong, readonly) SentryId *traceId; 12 | @property (nonatomic, strong, readonly) SentrySpanId *spanId; 13 | @property (nonatomic, readonly) SentryTraceHeader *traceHeader; 14 | 15 | - (instancetype)initWithTraceId:(SentryId *)traceId spanId:(SentrySpanId *)spanId; 16 | 17 | - (NSDictionary *)traceContextForEvent; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Sources/Sentry/SentryRandom.m: -------------------------------------------------------------------------------- 1 | #import "SentryRandom.h" 2 | 3 | @implementation SentryRandom 4 | 5 | - (instancetype)init 6 | { 7 | if (self = [super init]) { 8 | srand48(time(0)); // drand seed initializer 9 | } 10 | return self; 11 | } 12 | 13 | - (double)nextNumber 14 | { 15 | return drand48(); 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Sources/Sentry/SentrySampleDecision.m: -------------------------------------------------------------------------------- 1 | #import "SentrySampleDecision.h" 2 | 3 | NSNumber * 4 | valueForSentrySampleDecision(SentrySampleDecision decision) 5 | { 6 | switch (decision) { 7 | case kSentrySampleDecisionUndecided: 8 | return nil; 9 | case kSentrySampleDecisionYes: 10 | return @YES; 11 | case kSentrySampleDecisionNo: 12 | return @NO; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Sources/Sentry/SentrySamplerDecision.m: -------------------------------------------------------------------------------- 1 | #import "SentrySamplerDecision.h" 2 | 3 | @implementation SentrySamplerDecision 4 | 5 | - (instancetype)initWithDecision:(SentrySampleDecision)decision 6 | forSampleRate:(nullable NSNumber *)sampleRate 7 | withSampleRand:(nullable NSNumber *)sampleRand 8 | { 9 | if (self = [super init]) { 10 | _decision = decision; 11 | _sampleRate = sampleRate; 12 | _sampleRand = sampleRand; 13 | } 14 | return self; 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Sources/Sentry/SentrySpanDataKey.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NSString *const SentrySpanDataKeyFileSize = @"file.size"; 4 | NSString *const SentrySpanDataKeyFilePath = @"file.path"; 5 | -------------------------------------------------------------------------------- /Sources/Sentry/SentrySwiftAsyncIntegration.m: -------------------------------------------------------------------------------- 1 | #import "SentrySwiftAsyncIntegration.h" 2 | #import "SentryCrashStackCursor_SelfThread.h" 3 | #import "SentryOptions.h" 4 | 5 | @implementation SentrySwiftAsyncIntegration 6 | 7 | - (BOOL)installWithOptions:(nonnull SentryOptions *)options 8 | { 9 | sentrycrashsc_setSwiftAsyncStitching(options.swiftAsyncStacktraces); 10 | return options.swiftAsyncStacktraces; 11 | } 12 | 13 | - (void)uninstall 14 | { 15 | sentrycrashsc_setSwiftAsyncStitching(NO); 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Sources/Sentry/SentryThreadWrapper.m: -------------------------------------------------------------------------------- 1 | #import "SentryThreadWrapper.h" 2 | #import "SentryLog.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @implementation SentryThreadWrapper 7 | 8 | - (void)sleepForTimeInterval:(NSTimeInterval)timeInterval 9 | { 10 | [NSThread sleepForTimeInterval:timeInterval]; 11 | } 12 | 13 | - (void)threadStarted:(NSUUID *)threadID; 14 | { 15 | // No op. Only needed for testing. 16 | } 17 | 18 | - (void)threadFinished:(NSUUID *)threadID 19 | { 20 | // No op. Only needed for testing. 21 | } 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /Sources/Sentry/SentryUserAccess.m: -------------------------------------------------------------------------------- 1 | #import "SentryUserAccess.h" 2 | #import "SentryHub.h" 3 | #import "SentrySDK+Private.h" 4 | #import "SentryScope+Private.h" 5 | 6 | SentryUser *_Nullable sentry_getCurrentUser(void) { return SentrySDK.currentHub.scope.userObject; } 7 | -------------------------------------------------------------------------------- /Sources/Sentry/include/HybridPublic/PrivatesHeader.h: -------------------------------------------------------------------------------- 1 | // We need this because if Sentry library is added as a Framework 2 | // the reference should be in the form of . 3 | // Otherwise, the reference is direct. 4 | #if __has_include() 5 | # import 6 | #else 7 | # import "SentryDefines.h" 8 | #endif 9 | 10 | #if __has_include() 11 | # import 12 | #else 13 | # import "SentryProfilingConditionals.h" 14 | #endif 15 | -------------------------------------------------------------------------------- /Sources/Sentry/include/HybridPublic/SentryBreadcrumb+Private.h: -------------------------------------------------------------------------------- 1 | #if __has_include() 2 | # import 3 | #else 4 | # import "SentryBreadcrumb.h" 5 | #endif 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | @interface SentryBreadcrumb () 10 | 11 | /** 12 | * Initializes a SentryBreadcrumb from a JSON object. 13 | * @param dictionary The dictionary containing breadcrumb data. 14 | * @return The SentryBreadcrumb. 15 | */ 16 | - (instancetype _Nonnull)initWithDictionary:(NSDictionary *_Nonnull)dictionary; 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Sources/Sentry/include/HybridPublic/SentryOptions+HybridSDKs.h: -------------------------------------------------------------------------------- 1 | #if __has_include() 2 | # import 3 | #else 4 | # import "SentryOptions.h" 5 | #endif 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | @interface SentryOptions () 10 | 11 | - (_Nullable instancetype)initWithDict:(NSDictionary *)options 12 | didFailWithError:(NSError *_Nullable *_Nullable)error; 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Sources/Sentry/include/HybridPublic/SentryUser+Private.h: -------------------------------------------------------------------------------- 1 | #if __has_include() 2 | # import 3 | #else 4 | # import "SentryUser.h" 5 | #endif 6 | 7 | @interface SentryUser () 8 | 9 | /** 10 | * Initializes a SentryUser from a dictionary. 11 | * @param dictionary The dictionary containing user data. 12 | * @return The SentryUser. 13 | */ 14 | - (instancetype)initWithDictionary:(NSDictionary *)dictionary; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Sources/Sentry/include/NSArray+SentrySanitize.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentryArray : NSObject 6 | 7 | + (NSArray *)sanitizeArray:(NSArray *)array; 8 | 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /Sources/Sentry/include/NSLocale+Sentry.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SentryLocale : NSObject 4 | 5 | + (BOOL)timeIs24HourFormat; 6 | + (BOOL)isRightToLeftLanguage; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryANRTrackingIntegration.h: -------------------------------------------------------------------------------- 1 | #import "SentryANRTrackerV1.h" 2 | #import "SentryBaseIntegration.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | static NSString *const SentryANRExceptionType = @"App Hanging"; 7 | 8 | @interface SentryANRTrackingIntegration : SentryBaseIntegration 9 | 10 | - (void)pauseAppHangTracking; 11 | - (void)resumeAppHangTracking; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryAppStartTrackingIntegration.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | #if SENTRY_HAS_UIKIT 4 | 5 | # import "SentryBaseIntegration.h" 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | /** 10 | * Tracks cold and warm app start time for iOS, tvOS, and Mac Catalyst. 11 | */ 12 | @interface SentryAppStartTrackingIntegration : SentryBaseIntegration 13 | 14 | - (void)stop; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | 20 | #endif // SENTRY_HAS_UIKIT 21 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryAsynchronousOperation.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentryAsynchronousOperation : NSOperation 6 | 7 | - (void)completeOperation; 8 | 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryAutoBreadcrumbTrackingIntegration.h: -------------------------------------------------------------------------------- 1 | #import "SentryBaseIntegration.h" 2 | #import "SentryBreadcrumbDelegate.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | /** 7 | * This automatically adds breadcrumbs for different user actions. 8 | */ 9 | @interface SentryAutoBreadcrumbTrackingIntegration 10 | : SentryBaseIntegration 11 | 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryAutoSessionTrackingIntegration.h: -------------------------------------------------------------------------------- 1 | #import "SentryBaseIntegration.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | /** 6 | * Automatically tracks session start and end. 7 | */ 8 | @interface SentryAutoSessionTrackingIntegration : SentryBaseIntegration 9 | 10 | - (void)stop; 11 | 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryBreadcrumbDelegate.h: -------------------------------------------------------------------------------- 1 | #import "SentryInternalDefines.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @protocol SentryBreadcrumbDelegate 6 | 7 | - (void)addBreadcrumb:(SentryBreadcrumb *)crumb; 8 | 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryBreadcrumbTracker.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @protocol SentryBreadcrumbDelegate; 6 | 7 | @interface SentryBreadcrumbTracker : NSObject 8 | 9 | SENTRY_NO_INIT 10 | 11 | - (instancetype)initReportAccessibilityIdentifier:(BOOL)report; 12 | 13 | - (void)startWithDelegate:(id)delegate; 14 | #if SENTRY_HAS_UIKIT 15 | - (void)startSwizzle; 16 | #endif // SENTRY_HAS_UIKIT 17 | - (void)stop; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryBuildAppStartSpans.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | @class SentryTracer; 4 | @class SentrySpan; 5 | @class SentryAppStartMeasurement; 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | #if SENTRY_HAS_UIKIT 10 | 11 | NSArray *sentryBuildAppStartSpans( 12 | SentryTracer *tracer, SentryAppStartMeasurement *_Nullable appStartMeasurement); 13 | 14 | #endif // SENTRY_HAS_UIKIT 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryByteCountFormatter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | /** 6 | * We need to have a standart description for bytes count 7 | * but NSByteCountFormatter does not allow to choose locale 8 | * and the result changes according to the device configuration. 9 | * With our own formatter we can control the result. 10 | */ 11 | @interface SentryByteCountFormatter : NSObject 12 | 13 | + (NSString *)bytesCountDescription:(unsigned long)bytes; 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryCoreDataSwizzling.h: -------------------------------------------------------------------------------- 1 | 2 | #import "SentryDefines.h" 3 | #import 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @class SentryCoreDataTracker; 8 | 9 | @interface SentryCoreDataSwizzling : NSObject 10 | SENTRY_NO_INIT 11 | 12 | @property (class, readonly, nonatomic) SentryCoreDataSwizzling *sharedInstance; 13 | 14 | @property (nonatomic, readonly, nullable) SentryCoreDataTracker *coreDataTracker; 15 | 16 | - (void)startWithTracker:(SentryCoreDataTracker *)coreDataTracker; 17 | 18 | - (void)stop; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryCoreDataTrackingIntegration.h: -------------------------------------------------------------------------------- 1 | #import "SentryBaseIntegration.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentryCoreDataTrackingIntegration : SentryBaseIntegration 6 | 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryCrashDefaultBinaryImageProvider.h: -------------------------------------------------------------------------------- 1 | #import "SentryCrashBinaryImageProvider.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface SentryCrashDefaultBinaryImageProvider : NSObject 7 | 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryCrashDefaultMachineContextWrapper.h: -------------------------------------------------------------------------------- 1 | #import "SentryCrashMachineContextWrapper.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface SentryCrashDefaultMachineContextWrapper : NSObject 7 | 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryCrashIntegration.h: -------------------------------------------------------------------------------- 1 | #import "SentryBaseIntegration.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @class SentryCrashWrapper; 6 | @class SentryScope; 7 | 8 | static NSString *const SentryDeviceContextFreeMemoryKey = @"free_memory"; 9 | static NSString *const SentryDeviceContextAppMemoryKey = @"app_memory"; 10 | 11 | @interface SentryCrashIntegration : SentryBaseIntegration 12 | 13 | /** 14 | * Needed for testing. 15 | */ 16 | + (void)sendAllSentryCrashReports; 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryCrashIsAppImage.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentryCrashBinaryImageUtil : NSObject 6 | 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryCrashReportSink.h: -------------------------------------------------------------------------------- 1 | #import "SentryCrash.h" 2 | #import "SentryDefines.h" 3 | 4 | @class SentryCrashWrapper; 5 | @class SentryDispatchQueueWrapper; 6 | @class SentryInAppLogic; 7 | 8 | NS_ASSUME_NONNULL_BEGIN 9 | 10 | @interface SentryCrashReportSink : NSObject 11 | SENTRY_NO_INIT 12 | 13 | - (instancetype)initWithInAppLogic:(SentryInAppLogic *)inAppLogic 14 | crashWrapper:(SentryCrashWrapper *)crashWrapper 15 | dispatchQueue:(SentryDispatchQueueWrapper *)dispatchQueue; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryDateUtil.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @protocol SentryCurrentDateProvider; 6 | 7 | @interface SentryDateUtil : NSObject 8 | SENTRY_NO_INIT 9 | 10 | - (instancetype)initWithCurrentDateProvider:(id)currentDateProvider; 11 | 12 | - (BOOL)isInFuture:(NSDate *_Nullable)date; 13 | 14 | + (NSDate *_Nullable)getMaximumDate:(NSDate *_Nullable)first andOther:(NSDate *_Nullable)second; 15 | 16 | + (long)millisecondsSince1970:(NSDate *)date; 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryDateUtils.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | SENTRY_EXTERN NSDateFormatter *sentryGetIso8601FormatterWithMillisecondPrecision(void); 6 | 7 | SENTRY_EXTERN NSDate *_Nullable sentry_fromIso8601String(NSString *string); 8 | 9 | SENTRY_EXTERN NSString *sentry_toIso8601String(NSDate *date); 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryDefaultObjCRuntimeWrapper.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | #import "SentryObjCRuntimeWrapper.h" 3 | 4 | /** 5 | * A wrapper around the objc runtime functions for testability. 6 | */ 7 | @interface SentryDefaultObjCRuntimeWrapper : NSObject 8 | SENTRY_NO_INIT 9 | 10 | + (instancetype)sharedInstance; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryDispatchFactory.h: -------------------------------------------------------------------------------- 1 | #import "SentryDispatchQueueProviderProtocol.h" 2 | #import "SentryDispatchSourceProviderProtocol.h" 3 | #import 4 | 5 | @class SentryDispatchQueueWrapper; 6 | @class SentryDispatchSourceWrapper; 7 | 8 | NS_ASSUME_NONNULL_BEGIN 9 | 10 | /** 11 | * A type of object that vends wrappers for dispatch queues and sources, which can be subclassed to 12 | * vend their mocked test subclasses. 13 | */ 14 | @interface SentryDispatchFactory 15 | : NSObject 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryDisplayLinkWrapper.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | #if SENTRY_HAS_UIKIT 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | /** 8 | * A wrapper around DisplayLink for testability. 9 | */ 10 | @interface SentryDisplayLinkWrapper : NSObject 11 | 12 | @property (readonly, nonatomic) CFTimeInterval timestamp; 13 | 14 | @property (readonly, nonatomic) CFTimeInterval targetTimestamp API_AVAILABLE(ios(10.0), tvos(10.0)); 15 | 16 | - (void)linkWithTarget:(id)target selector:(SEL)sel; 17 | 18 | - (void)invalidate; 19 | 20 | - (BOOL)isRunning; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryEnvelope+Private.h: -------------------------------------------------------------------------------- 1 | #import "SentryEnvelope.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @class SentryReplayEvent; 6 | @class SentryReplayRecording; 7 | @class SentryClientReport; 8 | 9 | @interface SentryEnvelopeItem () 10 | 11 | - (instancetype)initWithClientReport:(SentryClientReport *)clientReport; 12 | 13 | - (nullable instancetype)initWithReplayEvent:(SentryReplayEvent *)replayEvent 14 | replayRecording:(SentryReplayRecording *)replayRecording 15 | video:(NSURL *)videoURL; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryExtraPackages.h: -------------------------------------------------------------------------------- 1 | #if __has_include() 2 | # import 3 | #else 4 | # import "SentryDefines.h" 5 | #endif 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | @interface SentryExtraPackages : NSObject 10 | SENTRY_NO_INIT 11 | 12 | + (void)addPackageName:(NSString *)name version:(NSString *)version; 13 | + (NSMutableSet *> *)getPackages; 14 | 15 | #if SENTRY_TEST || SENTRY_TEST_CI 16 | + (void)clear; 17 | #endif 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryFileIOTrackingIntegration.h: -------------------------------------------------------------------------------- 1 | #import "SentryBaseIntegration.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentryFileIOTrackingIntegration : SentryBaseIntegration 6 | 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryFramesTrackingIntegration.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | #if SENTRY_HAS_UIKIT 4 | 5 | # import "SentryBaseIntegration.h" 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | @interface SentryFramesTrackingIntegration : SentryBaseIntegration 10 | 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | 15 | #endif // SENTRY_HAS_UIKIT 16 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryGlobalEventProcessor.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | @class SentryEvent; 4 | 5 | typedef SentryEvent *__nullable (^SentryEventProcessor)(SentryEvent *_Nonnull event); 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | @interface SentryGlobalEventProcessor : NSObject 10 | SENTRY_NO_INIT 11 | 12 | @property (nonatomic, strong) NSMutableArray *processors; 13 | 14 | + (instancetype)shared; 15 | 16 | - (void)addEventProcessor:(SentryEventProcessor)newProcessor; 17 | 18 | - (nullable SentryEvent *)reportAll:(SentryEvent *)event; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryHttpDateParser.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | /** 6 | * Parses a string in the format of http date to NSDate. For more details see: 7 | * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Date. 8 | * SentryHttpDateParser is thread safe. 9 | */ 10 | NS_SWIFT_NAME(HttpDateParser) 11 | @interface SentryHttpDateParser : NSObject 12 | 13 | - (NSDate *_Nullable)dateFromString:(NSString *)string; 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryHttpStatusCodeRange+Private.h: -------------------------------------------------------------------------------- 1 | #import "SentryHttpStatusCodeRange.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentryHttpStatusCodeRange () 6 | 7 | - (BOOL)isInRange:(NSInteger)statusCode; 8 | 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryInstallation.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "SentryDefines.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface SentryInstallation : NSObject 8 | 9 | + (NSString *)idWithCacheDirectoryPath:(NSString *)cacheDirectoryPath; 10 | 11 | + (nullable NSString *)idWithCacheDirectoryPathNonCached:(NSString *)cacheDirectoryPath; 12 | 13 | + (void)cacheIDAsyncWithCacheDirectoryPath:(NSString *)cacheDirectoryPath; 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryInternalNotificationNames.h: -------------------------------------------------------------------------------- 1 | /** 2 | * In hybrid SDKs, we might initialize the Cocoa SDK after the hybrid engine is ready. So, we may 3 | * register the didBecomeActive notification after the OS posts it. Therefore the hybrid SDKs can 4 | * post this internal notification after initializing the Cocoa SDK. Hybrid SDKs must only post this 5 | * notification if they are running in the foreground. 6 | */ 7 | static NSString *const SentryHybridSdkDidBecomeActiveNotificationName 8 | = @"SentryHybridSdkDidBecomeActive"; 9 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryLevelHelper.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @class SentryBreadcrumb; 6 | @class SentryEvent; 7 | 8 | /** 9 | * This is a workaround to access SentryLevel value from swift 10 | */ 11 | @interface SentryLevelBridge : NSObject 12 | + (NSUInteger)breadcrumbLevel:(SentryBreadcrumb *)breadcrumb; 13 | + (void)setBreadcrumbLevel:(SentryBreadcrumb *)breadcrumb level:(NSUInteger)level; 14 | + (void)setBreadcrumbLevelOnEvent:(SentryEvent *)event level:(NSUInteger)level; 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryLevelMapper.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | /** 6 | * Maps a string to a SentryLevel. If the passed string doesn't match any level this defaults to 7 | * the 'error' level. See https://develop.sentry.dev/sdk/event-payloads/#optional-attributes 8 | */ 9 | SentryLevel sentryLevelForString(NSString *string); 10 | 11 | NSString *nameForSentryLevel(SentryLevel level); 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryLogC.h: -------------------------------------------------------------------------------- 1 | #ifndef SentryLogC_h 2 | #define SentryLogC_h 3 | #import 4 | 5 | @interface SentryAsyncLogWrapper : NSObject 6 | + (void)initializeAsyncLogFile; 7 | @end 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryMeasurementValue.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | #import "SentryMeasurementUnit.h" 3 | #import "SentrySerializable.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface SentryMeasurementValue : NSObject 8 | SENTRY_NO_INIT 9 | 10 | - (instancetype)initWithValue:(NSNumber *)value; 11 | 12 | - (instancetype)initWithValue:(NSNumber *)value unit:(SentryMeasurementUnit *)unit; 13 | 14 | @property (nonatomic, copy, readonly) NSNumber *value; 15 | @property (nullable, readonly, copy) SentryMeasurementUnit *unit; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryMeta.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentryMeta : NSObject 6 | 7 | /** 8 | * Return a version string e.g: 1.2.3 (3) 9 | */ 10 | @property (nonatomic, class, copy) NSString *versionString; 11 | 12 | /** 13 | * Return a string sentry-cocoa 14 | */ 15 | @property (nonatomic, class, copy) NSString *sdkName; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryNSDataSwizzling.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | #import "SentryFileIOTracker.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @class SentryOptions; 7 | 8 | @interface SentryNSDataSwizzling : NSObject 9 | SENTRY_NO_INIT 10 | 11 | @property (class, readonly) SentryNSDataSwizzling *shared; 12 | 13 | - (void)startWithOptions:(SentryOptions *)options tracker:(SentryFileIOTracker *)tracker; 14 | 15 | - (void)stop; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryNSDataUtils.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | NSData *_Nullable sentry_gzippedWithCompressionLevel( 6 | NSData *data, NSInteger compressionLevel, NSError *_Nullable *_Nullable error); 7 | 8 | /** 9 | * Adds a null character to the end of the byte array. This helps when strings should be null 10 | * terminated. 11 | */ 12 | NSData *_Nullable sentry_nullTerminated(NSData *_Nullable data); 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryNSDictionarySanitize.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | SENTRY_EXTERN NSDictionary *_Nullable sentry_sanitize(NSDictionary *_Nullable dictionary); 7 | 8 | NS_ASSUME_NONNULL_END 9 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryNSFileManagerSwizzling.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | #import "SentryFileIOTracker.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @class SentryOptions; 7 | 8 | @interface SentryNSFileManagerSwizzling : NSObject 9 | SENTRY_NO_INIT 10 | 11 | @property (class, readonly) SentryNSFileManagerSwizzling *shared; 12 | 13 | - (void)startWithOptions:(SentryOptions *)options tracker:(SentryFileIOTracker *)tracker; 14 | 15 | - (void)stop; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryNSURLSessionTaskSearch.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentryNSURLSessionTaskSearch : NSObject 6 | 7 | + (NSArray *)urlSessionTaskClassesToTrack; 8 | 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryNetworkTrackingIntegration.h: -------------------------------------------------------------------------------- 1 | #import "SentryBaseIntegration.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentryNetworkTrackingIntegration : SentryBaseIntegration 6 | 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryObjCRuntimeWrapper.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol SentryObjCRuntimeWrapper 4 | 5 | - (const char **)copyClassNamesForImage:(const char *)image amount:(unsigned int *)outCount; 6 | 7 | - (const char *)class_getImageName:(Class)cls; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryPerformanceTrackingIntegration.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | #if SENTRY_HAS_UIKIT 4 | 5 | # import "SentryBaseIntegration.h" 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | /** 10 | * Integration to setup automatic performance tracking. 11 | * Automatic UI performance setup can be avoided by setting @c enableAutoPerformanceTracing to @c NO 12 | * in @c SentryOptions during SentrySDK initialization. 13 | */ 14 | @interface SentryPerformanceTrackingIntegration : SentryBaseIntegration 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | 20 | #endif // SENTRY_HAS_UIKIT 21 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryPredicateDescriptor.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | /** 6 | * Used to transform an NSPredicate into a human-friendly string. 7 | * This class is used for CoreData and omits variable values 8 | * and doesn't convert CoreData unsupported instructions. 9 | */ 10 | @interface SentryPredicateDescriptor : NSObject 11 | 12 | - (NSString *)predicateDescription:(NSPredicate *)predicate; 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryProfilerState+ObjCpp.h: -------------------------------------------------------------------------------- 1 | #import "SentryProfilingConditionals.h" 2 | 3 | #if SENTRY_TARGET_PROFILING_SUPPORTED 4 | 5 | # import "SentryBacktrace.hpp" 6 | # import "SentryProfilerState.h" 7 | 8 | /* 9 | * This extension defines C++ interface on SentryProfilerState that is not able to be imported into 10 | * a bridging header via SentryProfilerState.h due to C++/Swift interop limitations. 11 | */ 12 | 13 | @interface SentryProfilerState () 14 | 15 | - (void)appendBacktrace:(const sentry::profiling::Backtrace &)backtrace; 16 | 17 | @end 18 | 19 | #endif // SENTRY_TARGET_PROFILING_SUPPORTED 20 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryQueueableRequestManager.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | #import "SentryRequestManager.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface SentryQueueableRequestManager : NSObject 7 | 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryRandom.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @protocol SentryRandom 6 | 7 | /** 8 | * Returns a random number uniformly distributed over the interval [0.0 , 1.0]. 9 | */ 10 | - (double)nextNumber; 11 | 12 | @end 13 | 14 | @interface SentryRandom : NSObject 15 | 16 | - (double)nextNumber; 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryRequestManager.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | NS_SWIFT_NAME(RequestManager) 6 | @protocol SentryRequestManager 7 | 8 | @property (nonatomic, readonly, getter=isReady) BOOL ready; 9 | 10 | - (instancetype)initWithSession:(NSURLSession *)session; 11 | 12 | - (void)addRequest:(NSURLRequest *)request 13 | completionHandler:(_Nullable SentryRequestOperationFinished)completionHandler; 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryRequestOperation.h: -------------------------------------------------------------------------------- 1 | #import "SentryAsynchronousOperation.h" 2 | #import "SentryQueueableRequestManager.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface SentryRequestOperation : SentryAsynchronousOperation 7 | 8 | - (instancetype)initWithSession:(NSURLSession *)session 9 | request:(NSURLRequest *)request 10 | completionHandler:(_Nullable SentryRequestOperationFinished)completionHandler; 11 | 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentrySample.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | /** A storage class to hold the data associated with a single profiler sample. */ 6 | @interface SentrySample : NSObject 7 | @property (nonatomic, assign) uint64_t absoluteTimestamp; 8 | @property (nonatomic, assign) NSTimeInterval absoluteNSDateInterval; 9 | @property (nonatomic, strong) NSNumber *stackIndex; 10 | @property (nonatomic, assign) uint64_t threadID; 11 | @property (nullable, nonatomic, copy) NSString *queueAddress; 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentrySampleDecision+Private.h: -------------------------------------------------------------------------------- 1 | #import "SentrySampleDecision.h" 2 | 3 | /** 4 | Returns the value to use when serializing a SentrySampleDecision. 5 | */ 6 | NSNumber *valueForSentrySampleDecision(SentrySampleDecision decision); 7 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentrySamplerDecision.h: -------------------------------------------------------------------------------- 1 | #import "SentrySampleDecision.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentrySamplerDecision : NSObject 6 | 7 | @property (nonatomic, readonly) SentrySampleDecision decision; 8 | 9 | @property (nonatomic, nullable, strong, readonly) NSNumber *sampleRand; 10 | 11 | @property (nullable, nonatomic, strong, readonly) NSNumber *sampleRate; 12 | 13 | - (instancetype)initWithDecision:(SentrySampleDecision)decision 14 | forSampleRate:(nullable NSNumber *)sampleRate 15 | withSampleRand:(nullable NSNumber *)sampleRand; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryScreenshotIntegration.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | #if SENTRY_TARGET_REPLAY_SUPPORTED 4 | 5 | # import "SentryBaseIntegration.h" 6 | # import "SentryClient+Private.h" 7 | # import "SentryScreenshot.h" 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | @interface SentryScreenshotIntegration : SentryBaseIntegration 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | 17 | #endif // SENTRY_HAS_UIKIT 18 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentrySdkPackage.h: -------------------------------------------------------------------------------- 1 | #if __has_include() 2 | # import 3 | #else 4 | # import "SentryDefines.h" 5 | #endif 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | @interface SentrySdkPackage : NSObject 10 | SENTRY_NO_INIT 11 | 12 | + (nullable NSDictionary *)global; 13 | 14 | #if SENTRY_TEST || SENTRY_TEST_CI 15 | + (void)setPackageManager:(NSUInteger)manager; 16 | + (void)resetPackageManager; 17 | #endif 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentrySession+Private.h: -------------------------------------------------------------------------------- 1 | #import "SentrySession.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | NSString *nameForSentrySessionStatus(SentrySessionStatus status); 6 | 7 | @interface SentrySession () 8 | 9 | @property (nonatomic) NSUInteger errors; 10 | 11 | - (void)setFlagInit; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentrySessionReplayIntegration+Private.h: -------------------------------------------------------------------------------- 1 | #import "SentryBaseIntegration.h" 2 | #import "SentrySessionReplayIntegration.h" 3 | 4 | #if SENTRY_TARGET_REPLAY_SUPPORTED 5 | 6 | @class SentrySessionReplay; 7 | @class SentryViewPhotographer; 8 | 9 | @interface SentrySessionReplayIntegration () 10 | 11 | @property (nonatomic, strong) SentrySessionReplay *sessionReplay; 12 | 13 | @property (nonatomic, strong) SentryViewPhotographer *viewPhotographer; 14 | 15 | - (void)setReplayTags:(NSDictionary *)tags; 16 | 17 | @end 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentrySessionReplaySyncC.h: -------------------------------------------------------------------------------- 1 | #ifndef SentrySessionReplaySyncC_h 2 | #define SentrySessionReplaySyncC_h 3 | #include 4 | 5 | typedef struct { 6 | unsigned int segmentId; 7 | double lastSegmentEnd; 8 | char *path; 9 | } SentryCrashReplay; 10 | 11 | void sentrySessionReplaySync_start(const char *const path); 12 | 13 | void sentrySessionReplaySync_updateInfo(unsigned int segmentId, double lastSegmentEnd); 14 | 15 | void sentrySessionReplaySync_writeInfo(void); 16 | 17 | bool sentrySessionReplaySync_readInfo(SentryCrashReplay *output, const char *const path); 18 | 19 | #endif /* SentrySessionReplaySyncC_h */ 20 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentrySpan+Private.h: -------------------------------------------------------------------------------- 1 | #import "SentrySpan.h" 2 | 3 | #import "SentryProfilingConditionals.h" 4 | 5 | @interface SentrySpan () 6 | 7 | #if SENTRY_TARGET_PROFILING_SUPPORTED 8 | @property (copy, nonatomic) NSString *_Nullable profileSessionID; 9 | #endif // SENTRY_TARGET_PROFILING_SUPPORTED 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentrySwiftAsyncIntegration.h: -------------------------------------------------------------------------------- 1 | #import "SentryBaseIntegration.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentrySwiftAsyncIntegration : SentryBaseIntegration 6 | 7 | @end 8 | 9 | NS_ASSUME_NONNULL_END 10 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryThread+Private.h: -------------------------------------------------------------------------------- 1 | #include "SentryProfilingConditionals.h" 2 | #include "SentryThread.h" 3 | #import 4 | 5 | #if SENTRY_TARGET_PROFILING_SUPPORTED 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | @interface SentryThread () 10 | 11 | + (SentryThread *)threadInfo; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryThreadWrapper.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | /** 6 | * A wrapper around NSThread functions for testability. 7 | */ 8 | @interface SentryThreadWrapper : NSObject 9 | 10 | - (void)sleepForTimeInterval:(NSTimeInterval)timeInterval; 11 | 12 | - (void)threadStarted:(NSUUID *)threadID; 13 | 14 | - (void)threadFinished:(NSUUID *)threadID; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryTracer+Private.h: -------------------------------------------------------------------------------- 1 | #import "SentryTracer.h" 2 | 3 | @interface SentryTracer () 4 | 5 | @property (nonatomic, strong) SentryHub *hub; 6 | 7 | /** 8 | * We need an immutable identifier to e.g. track concurrent tracers against a static profiler where 9 | * we can use the same ID as a key in the concurrent bookkeeping. @c SentryTracer.traceId can be 10 | * changed by consumers so is unfit for this purpose. 11 | */ 12 | @property (nonatomic, strong, readonly) SentryId *profilerReferenceID; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryTransaction.h: -------------------------------------------------------------------------------- 1 | #import "SentryEvent.h" 2 | #import "SentrySpanProtocol.h" 3 | #import "SentryTracer.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @class SentryTracer; 8 | 9 | NS_SWIFT_NAME(Transaction) 10 | @interface SentryTransaction : SentryEvent 11 | SENTRY_NO_INIT 12 | 13 | @property (nonatomic, strong) SentryTracer *trace; 14 | @property (nonatomic, copy, nullable) NSArray *viewNames; 15 | @property (nonatomic, strong) NSArray> *spans; 16 | 17 | - (instancetype)initWithTrace:(SentryTracer *)trace children:(NSArray> *)children; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryTransportFactory.h: -------------------------------------------------------------------------------- 1 | #import "SentryTransport.h" 2 | 3 | @class SentryFileManager; 4 | @class SentryOptions; 5 | @protocol SentryCurrentDateProvider; 6 | @protocol SentryRateLimits; 7 | 8 | NS_ASSUME_NONNULL_BEGIN 9 | 10 | NS_SWIFT_NAME(TransportInitializer) 11 | @interface SentryTransportFactory : NSObject 12 | 13 | + (NSArray> *)initTransports:(SentryOptions *)options 14 | sentryFileManager:(SentryFileManager *)sentryFileManager 15 | rateLimits:(id)rateLimits; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryUIDeviceWrapper.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | #if SENTRY_HAS_UIKIT 4 | 5 | # import 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | @interface SentryUIDeviceWrapper : NSObject 10 | 11 | - (void)start; 12 | - (void)stop; 13 | 14 | # if TARGET_OS_IOS 15 | - (UIDeviceOrientation)orientation; 16 | - (BOOL)isBatteryMonitoringEnabled; 17 | - (UIDeviceBatteryState)batteryState; 18 | - (float)batteryLevel; 19 | # endif // TARGET_OS_IOS 20 | 21 | - (NSString *)getSystemVersion; 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | 27 | #endif // SENTRY_HAS_UIKIT 28 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryUIEventTracker.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | #if SENTRY_HAS_UIKIT 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @class SentryDispatchQueueWrapper; 8 | @protocol SentryUIEventTrackerMode; 9 | 10 | @interface SentryUIEventTracker : NSObject 11 | SENTRY_NO_INIT 12 | 13 | - (instancetype)initWithMode:(id)mode 14 | reportAccessibilityIdentifier:(BOOL)report; 15 | 16 | - (void)start; 17 | - (void)stop; 18 | 19 | + (BOOL)isUIEventOperation:(NSString *)operation; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | 25 | #endif // SENTRY_HAS_UIKIT 26 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryUIEventTrackerMode.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | #if SENTRY_HAS_UIKIT 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @protocol SentryUIEventTrackerMode 8 | 9 | - (void)handleUIEvent:(NSString *)action 10 | operation:(NSString *)operation 11 | accessibilityIdentifier:(nullable NSString *)accessibilityIdentifier; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | 17 | #endif // SENTRY_HAS_UIKIT 18 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryUIEventTrackerTransactionMode.h: -------------------------------------------------------------------------------- 1 | #import "SentryUIEventTrackerMode.h" 2 | 3 | #if SENTRY_HAS_UIKIT 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface SentryUIEventTrackerTransactionMode : NSObject 8 | SENTRY_NO_INIT 9 | 10 | - (instancetype)initWithIdleTimeout:(NSTimeInterval)idleTimeout; 11 | 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | 16 | #endif // SENTRY_HAS_UIKIT 17 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryUIEventTrackingIntegration.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | #if SENTRY_HAS_UIKIT 4 | 5 | # import "SentryBaseIntegration.h" 6 | 7 | @interface SentryUIEventTrackingIntegration : SentryBaseIntegration 8 | 9 | @end 10 | 11 | #endif // SENTRY_HAS_UIKIT 12 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryUserAccess.h: -------------------------------------------------------------------------------- 1 | // This provides convenience access to internal ObjC API of internal Swift implementation, which 2 | // can't be directly imported in SentryPrivate.h 3 | 4 | #import 5 | 6 | @class SentryClient; 7 | @class SentryUser; 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | SentryUser *_Nullable sentry_getCurrentUser(void); 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryUserFeedbackIntegration.h: -------------------------------------------------------------------------------- 1 | #import "SentryBaseIntegration.h" 2 | 3 | #import "SentryDefines.h" 4 | 5 | #if TARGET_OS_IOS && SENTRY_HAS_UIKIT 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | API_AVAILABLE(ios(13.0)) 10 | @interface SentryUserFeedbackIntegration : SentryBaseIntegration 11 | - (void)showWidget; 12 | - (void)hideWidget; 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | 17 | #endif // TARGET_OS_IOS && SENTRY_HAS_UIKIT 18 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryViewHierarchyIntegration.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | #if SENTRY_HAS_UIKIT 4 | 5 | # import "SentryBaseIntegration.h" 6 | # import "SentryClient+Private.h" 7 | 8 | NS_ASSUME_NONNULL_BEGIN 9 | 10 | @interface SentryViewHierarchyIntegration : SentryBaseIntegration 11 | 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | 16 | #endif // SENTRY_HAS_UIKIT 17 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryWatchdogTerminationBreadcrumbProcessor.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @class SentryFileManager; 6 | 7 | @interface SentryWatchdogTerminationBreadcrumbProcessor : NSObject 8 | 9 | - (instancetype)initWithMaxBreadcrumbs:(NSInteger)maxBreadcrumbs 10 | fileManager:(SentryFileManager *)fileManager; 11 | 12 | - (void)addSerializedBreadcrumb:(NSDictionary *)crumb; 13 | 14 | - (void)clearBreadcrumbs; 15 | 16 | - (void)clear; 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /Sources/Sentry/include/SentryWatchdogTerminationTrackingIntegration.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | #if SENTRY_HAS_UIKIT 4 | # import "SentryBaseIntegration.h" 5 | 6 | NS_ASSUME_NONNULL_BEGIN 7 | 8 | @interface SentryWatchdogTerminationTrackingIntegration : SentryBaseIntegration 9 | 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | 14 | #endif // SENTRY_HAS_UIKIT 15 | -------------------------------------------------------------------------------- /Sources/Sentry/include/UIViewController+Sentry.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | #if SENTRY_HAS_UIKIT 4 | # import 5 | 6 | NS_ASSUME_NONNULL_BEGIN 7 | 8 | @interface SentryViewController : NSObject 9 | 10 | /** 11 | * An array of view controllers that are descendants, meaning children, grandchildren, ... , of the 12 | * current view controller. 13 | */ 14 | + (NSArray *)descendantsOfViewController:(UIViewController *)viewController; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | 20 | #endif // SENTRY_HAS_UIKIT 21 | -------------------------------------------------------------------------------- /Sources/Sentry/include/module.modulemap: -------------------------------------------------------------------------------- 1 | module _SentryPrivate { 2 | header "SentryPrivate.h" 3 | } 4 | -------------------------------------------------------------------------------- /Sources/SentryCrash/Recording/SentryCrashDoctor.h: -------------------------------------------------------------------------------- 1 | // Adapted from: https://github.com/kstenerud/KSCrash 2 | // 3 | // SentryCrashDoctor.h 4 | // SentryCrash 5 | // 6 | // Created by Karl Stenerud on 2012-11-10. 7 | // Copyright (c) 2012 Karl Stenerud. All rights reserved. 8 | // 9 | 10 | #import 11 | 12 | @interface SentryCrashDoctor : NSObject 13 | 14 | + (SentryCrashDoctor *)doctor; 15 | 16 | - (NSString *)diagnoseCrash:(NSDictionary *)crashReport; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Sources/SentrySwiftUI/SentryInternal/SentryInternal.m: -------------------------------------------------------------------------------- 1 | // Placeholder file, since SwiftPM requires a source file to create a module. 2 | -------------------------------------------------------------------------------- /Sources/SentrySwiftUI/SentrySwiftUI.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | //! Project version number for SentryUI. 4 | FOUNDATION_EXPORT double SentryUIVersionNumber; 5 | 6 | //! Project version string for SentryUI. 7 | FOUNDATION_EXPORT const unsigned char SentryUIVersionString[]; 8 | 9 | #if __has_include("SentryInternal.h") 10 | # import "SentryInternal.h" 11 | #endif 12 | -------------------------------------------------------------------------------- /Sources/SentrySwiftUI/module.modulemap: -------------------------------------------------------------------------------- 1 | module SentryInternal { 2 | header "SentrySwiftUI.h" 3 | } 4 | 5 | -------------------------------------------------------------------------------- /Sources/Swift/Core/Extensions/NumberExtensions.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension FixedWidthInteger { 4 | 5 | @inlinable 6 | @discardableResult 7 | postfix static func ++ (lhs: inout Self) -> Self { 8 | defer { lhs += 1 } 9 | return lhs 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Swift/Core/Extensions/StringExtensions.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension String { 4 | func snakeToCamelCase() -> String { 5 | var result = "" 6 | 7 | var toUpper = false 8 | for char in self { 9 | if char == "_" { 10 | toUpper = true 11 | } else { 12 | result.append(toUpper ? char.uppercased() : String(char)) 13 | toUpper = false 14 | } 15 | } 16 | 17 | return result 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Sources/Swift/Core/Helper/SentryFileContents.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | @objcMembers 4 | @_spi(Private) public class SentryFileContents: NSObject { 5 | 6 | public let path: String 7 | public let contents: Data 8 | 9 | public init(path: String, contents: Data) { 10 | self.path = path 11 | self.contents = contents 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Sources/Swift/Core/Integrations/ANR/SentryANRTracker.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | @objc 4 | @_spi(Private) public protocol SentryANRTracker { 5 | @objc(addListener:) 6 | func add(listener: SentryANRTrackerDelegate) 7 | @objc(removeListener:) 8 | func remove(listener: SentryANRTrackerDelegate) 9 | 10 | /// Only used for tests. 11 | func clear() 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Swift/Core/Integrations/FramesTracking/SentryFramesDelayResult.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | @objcMembers 4 | class SentryFramesDelayResult: NSObject { 5 | /// The frames delay for the passed time period. If frame delay can't be calculated this is -1. 6 | let delayDuration: CFTimeInterval 7 | let framesContributingToDelayCount: UInt 8 | 9 | init(delayDuration: CFTimeInterval, framesContributingToDelayCount: UInt) { 10 | self.delayDuration = delayDuration 11 | self.framesContributingToDelayCount = framesContributingToDelayCount 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Sources/Swift/Core/Integrations/Performance/SentryTransactionNameSource.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | @objc 4 | public enum SentryTransactionNameSource: Int { 5 | @objc(kSentryTransactionNameSourceCustom) 6 | case custom = 0 7 | 8 | @objc(kSentryTransactionNameSourceUrl) 9 | case url 10 | 11 | @objc(kSentryTransactionNameSourceRoute) 12 | case route 13 | 14 | @objc(kSentryTransactionNameSourceView) 15 | case view 16 | 17 | @objc(kSentryTransactionNameSourceComponent) 18 | case component 19 | 20 | @objc(kSentryTransactionNameSourceTask) 21 | case sourceTask 22 | } 23 | -------------------------------------------------------------------------------- /Sources/Swift/Core/Integrations/Performance/SwizzleClassNameExclude.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | @objcMembers 4 | class SentrySwizzleClassNameExclude: NSObject { 5 | static func shouldExcludeClass(className: String, swizzleClassNameExcludes: Set) -> Bool { 6 | for exclude in swizzleClassNameExcludes { 7 | if className.contains(exclude) { 8 | SentryLog.debug("Excluding class \(className) from swizzling cause it matches the exclude pattern: \(exclude).") 9 | return true 10 | } 11 | } 12 | return false 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Sources/Swift/Core/Protocol/SentryRedactOptions.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | @objc 4 | public protocol SentryRedactOptions { 5 | var maskAllText: Bool { get } 6 | var maskAllImages: Bool { get } 7 | var maskedViewClasses: [AnyClass] { get } 8 | var unmaskedViewClasses: [AnyClass] { get } 9 | } 10 | 11 | @objcMembers 12 | final class SentryRedactDefaultOptions: NSObject, SentryRedactOptions { 13 | var maskAllText: Bool = true 14 | var maskAllImages: Bool = true 15 | var maskedViewClasses: [AnyClass] = [] 16 | var unmaskedViewClasses: [AnyClass] = [] 17 | } 18 | -------------------------------------------------------------------------------- /Sources/Swift/Core/Protocol/SentryViewControllerBreadcrumbTracking.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// 4 | /// Use this protocol to customize the name used in the automatic 5 | /// UIViewController performance tracker, view hierarchy, and breadcrumbs. 6 | /// 7 | @objc 8 | public protocol SentryUIViewControllerDescriptor: NSObjectProtocol { 9 | 10 | /// The custom name of the UIViewController 11 | /// that the Sentry SDK uses for transaction names, breadcrumbs, and 12 | /// view hierarchy. 13 | var sentryName: String { get } 14 | } 15 | -------------------------------------------------------------------------------- /Sources/Swift/Core/Tools/HTTPHeaderSanitizer.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | @objcMembers 4 | @_spi(Private) public class HTTPHeaderSanitizer: NSObject { 5 | public static func sanitizeHeaders(_ headers: [String: String]) -> [String: String] { 6 | let _securityHeaders = Set([ 7 | "X-FORWARDED-FOR", "AUTHORIZATION", "COOKIE", "SET-COOKIE", "X-API-KEY", "X-REAL-IP", 8 | "REMOTE-ADDR", "FORWARDED", "PROXY-AUTHORIZATION", "X-CSRF-TOKEN", "X-CSRFTOKEN", 9 | "X-XSRF-TOKEN" 10 | ]) 11 | 12 | return headers.filter { !_securityHeaders.contains($0.key.uppercased()) } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Sources/Swift/Core/Tools/SentryLogOutput.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | class SentryLogOutput { 4 | func log(_ message: String) { 5 | print(message) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Sources/Swift/Core/Tools/ViewCapture/SentryDefaultViewRenderer.swift: -------------------------------------------------------------------------------- 1 | #if canImport(UIKit) && !SENTRY_NO_UIKIT 2 | #if os(iOS) || os(tvOS) 3 | 4 | import UIKit 5 | 6 | @objcMembers 7 | class SentryDefaultViewRenderer: NSObject, SentryViewRenderer { 8 | func render(view: UIView) -> UIImage { 9 | let image = UIGraphicsImageRenderer(size: view.bounds.size).image { _ in 10 | view.drawHierarchy(in: view.bounds, afterScreenUpdates: false) 11 | } 12 | return image 13 | } 14 | } 15 | 16 | #endif // os(iOS) || os(tvOS) 17 | #endif // canImport(UIKit) && !SENTRY_NO_UIKIT 18 | -------------------------------------------------------------------------------- /Sources/Swift/Core/Tools/ViewCapture/SentryMaskRenderer.swift: -------------------------------------------------------------------------------- 1 | #if canImport(UIKit) && !SENTRY_NO_UIKIT 2 | #if os(iOS) || os(tvOS) 3 | 4 | import UIKit 5 | 6 | protocol SentryMaskRenderer { 7 | func maskScreenshot(screenshot image: UIImage, size: CGSize, masking: [RedactRegion]) -> UIImage 8 | } 9 | 10 | protocol SentryMaskRendererContext { 11 | var cgContext: CGContext { get } 12 | var currentImage: UIImage { get } 13 | } 14 | 15 | #endif // os(iOS) || os(tvOS) 16 | #endif // canImport(UIKit) && !SENTRY_NO_UIKIT 17 | -------------------------------------------------------------------------------- /Sources/Swift/Core/Tools/ViewCapture/SentryViewRenderer.swift: -------------------------------------------------------------------------------- 1 | #if canImport(UIKit) && !SENTRY_NO_UIKIT 2 | #if os(iOS) || os(tvOS) 3 | 4 | import UIKit 5 | 6 | @objc protocol SentryViewRenderer { 7 | func render(view: UIView) -> UIImage 8 | } 9 | 10 | #endif // os(iOS) || os(tvOS) 11 | #endif // canImport(UIKit) && !SENTRY_NO_UIKIT 12 | -------------------------------------------------------------------------------- /Sources/Swift/Core/Tools/ViewCapture/SentryViewScreenshotProvider.swift: -------------------------------------------------------------------------------- 1 | #if canImport(UIKit) && !SENTRY_NO_UIKIT 2 | #if os(iOS) || os(tvOS) 3 | import Foundation 4 | import UIKit 5 | 6 | typealias ScreenshotCallback = (UIImage) -> Void 7 | 8 | @objc 9 | protocol SentryViewScreenshotProvider: NSObjectProtocol { 10 | func image(view: UIView, onComplete: @escaping ScreenshotCallback) 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /Sources/Swift/Integrations/SessionReplay/RRWeb/SentryRRWebCustomEvent.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | @objcMembers 4 | class SentryRRWebCustomEvent: SentryRRWebEvent { 5 | let tag: String 6 | 7 | init(timestamp: Date, tag: String, payload: [String: Any]) { 8 | self.tag = tag 9 | super.init(type: .custom, timestamp: timestamp, data: ["tag": tag, "payload": payload]) 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Sources/Swift/Integrations/SessionReplay/RRWeb/SentryRRWebMetaEvent.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | @objcMembers 4 | class SentryRRWebMetaEvent: SentryRRWebEvent { 5 | init(timestamp: Date, height: Int, width: Int) { 6 | super.init(type: .meta, timestamp: timestamp, data: ["href": "", "height": height, "width": width]) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Sources/Swift/Integrations/SessionReplay/SentryOnDemandReplayError.swift: -------------------------------------------------------------------------------- 1 | enum SentryOnDemandReplayError: Error { 2 | case cantReadVideoSize 3 | case cantCreatePixelBuffer 4 | case errorRenderingVideo 5 | case cantReadVideoStartTime 6 | } 7 | -------------------------------------------------------------------------------- /Sources/Swift/Integrations/SessionReplay/SentryRenderVideoResult.swift: -------------------------------------------------------------------------------- 1 | struct SentryRenderVideoResult { 2 | let info: SentryVideoInfo? 3 | let finalFrameIndex: Int 4 | } 5 | -------------------------------------------------------------------------------- /Sources/Swift/Integrations/SessionReplay/SentryReplayFrame.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct SentryReplayFrame { 4 | let imagePath: String 5 | let time: Date 6 | let screenName: String? 7 | } 8 | -------------------------------------------------------------------------------- /Sources/Swift/Integrations/SessionReplay/SentrySessionReplayDelegate.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | #if (os(iOS) || os(tvOS)) && !SENTRY_NO_UIKIT 3 | 4 | @objc 5 | protocol SentrySessionReplayDelegate: NSObjectProtocol { 6 | func sessionReplayShouldCaptureReplayForError() -> Bool 7 | func sessionReplayNewSegment(replayEvent: SentryReplayEvent, replayRecording: SentryReplayRecording, videoUrl: URL) 8 | func sessionReplayStarted(replayId: SentryId) 9 | func breadcrumbsForSessionReplay() -> [Breadcrumb] 10 | func currentScreenNameForSessionReplay() -> String? 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /Sources/Swift/Protocol/Codable/SentryEventDecoder.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | @objcMembers 4 | public class SentryEventDecoder: NSObject { 5 | @_spi(Private) public static func decodeEvent(jsonData: Data) -> Event? { 6 | return decodeFromJSONData(jsonData: jsonData) as SentryEventDecodable? 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Sources/Swift/Protocol/Codable/SentryNSErrorCodable.swift: -------------------------------------------------------------------------------- 1 | @_implementationOnly import _SentryPrivate 2 | import Foundation 3 | 4 | extension SentryNSError: Decodable { 5 | 6 | enum CodingKeys: String, CodingKey { 7 | case domain 8 | case code 9 | } 10 | 11 | required convenience public init(from decoder: any Decoder) throws { 12 | let container = try decoder.container(keyedBy: CodingKeys.self) 13 | 14 | let domain = try container.decode(String.self, forKey: .domain) 15 | let code = try container.decode(Int.self, forKey: .code) 16 | self.init(domain: domain, code: code) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sources/Swift/Protocol/SentrySessionListener.swift: -------------------------------------------------------------------------------- 1 | @_implementationOnly import _SentryPrivate 2 | import Foundation 3 | 4 | @objc 5 | protocol SentrySessionListener: NSObjectProtocol { 6 | func sentrySessionEnded(_ session: SentrySession) 7 | func sentrySessionStarted(_ session: SentrySession) 8 | } 9 | -------------------------------------------------------------------------------- /TestSamples/SwiftUITestSample/.gitignore: -------------------------------------------------------------------------------- 1 | MaestroLogs/ 2 | -------------------------------------------------------------------------------- /TestSamples/SwiftUITestSample/Maestro/corruptEnvelope.yaml: -------------------------------------------------------------------------------- 1 | appId: io.sentry.tests.SwiftUITestSample 2 | --- 3 | - launchApp 4 | - tapOn: "Write Corrupted Envelope" 5 | # The close here ensures the next corrupted envelope 6 | # will be present on the next app launch 7 | - tapOn: "Close SDK" 8 | - tapOn: "Write Corrupted Envelope" 9 | - stopApp 10 | - launchApp 11 | - assertVisible: "Welcome!" 12 | -------------------------------------------------------------------------------- /TestSamples/SwiftUITestSample/Maestro/crash.yaml: -------------------------------------------------------------------------------- 1 | appId: io.sentry.tests.SwiftUITestSample 2 | --- 3 | - launchApp 4 | - tapOn: "Crash" 5 | - launchApp 6 | - assertVisible: "Welcome!" 7 | -------------------------------------------------------------------------------- /TestSamples/SwiftUITestSample/SwiftUITestSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/.swiftlint.yml: -------------------------------------------------------------------------------- 1 | parent_config: ../.swiftlint.yml 2 | 3 | enabled_rules: 4 | - test_case_accessibility 5 | 6 | disabled_rules: 7 | - force_cast 8 | - force_try 9 | - force_unwrapping 10 | - function_body_length 11 | - identifier_name 12 | - large_tuple 13 | - type_body_length 14 | - weak_delegate 15 | 16 | file_length: 17 | warning: 1000 18 | error: 1000 19 | -------------------------------------------------------------------------------- /Tests/DuplicatedSDKTest/DuplicatedSDKTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/DuplicatedSDKTest/DuplicatedSDKTest/DuplicatedSDKTest-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | @interface SentrySDK (DuplicatedSDKTest) 5 | 6 | + (SentryHub *)currentHub; 7 | 8 | @end 9 | 10 | @interface SentryHub (DuplicatedSDKTest) 11 | 12 | @property (nonatomic, strong) NSMutableArray> *installedIntegrations; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Tests/DuplicatedSDKTest/DuplicatedSDKTest/SomeWork.swift: -------------------------------------------------------------------------------- 1 | import Sentry 2 | 3 | class SomeWork { 4 | func doSomeWork() { 5 | SentrySDK.capture(message: "Some work") 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Tests/DuplicatedSDKTest/DuplicatedSDKTest/UITest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | final class UITestDuplicatedSDK: XCTestCase { 4 | 5 | @MainActor 6 | func testLoadIntegrations() throws { 7 | let app = XCUIApplication() 8 | app.launch() 9 | XCTAssertEqual(app.staticTexts["TEST_RESULT"].label, "true", "SentrySDK integrations are not being loaded from the same binary. This will lead to undefined behavior.") 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tests/HybridSDKTest/HybridTest.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Sentry 3 | 4 | public class HybridTest { 5 | 6 | var sentry: SentrySDK? 7 | 8 | } 9 | -------------------------------------------------------------------------------- /Tests/Perf/metrics-test.yml: -------------------------------------------------------------------------------- 1 | apps: 2 | - name: io.sentry.cocoa.perf-test-app-plain 3 | path: test-app-plain.ipa 4 | - name: io.sentry.cocoa.perf-test-app-sentry 5 | path: test-app-sentry.ipa 6 | 7 | startupTimeTest: 8 | runs: 50 9 | diffMin: 0 10 | diffMax: 150 11 | 12 | binarySizeTest: 13 | diffMin: 200 KiB 14 | diffMax: 870 KiB 15 | -------------------------------------------------------------------------------- /Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors": [ 3 | { 4 | "idiom": "universal" 5 | } 6 | ], 7 | "info": { 8 | "author": "xcode", 9 | "version": 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Tests/Perf/test-app-plain/test-app-plain/ContentView.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | struct ContentView: View { 4 | var body: some View { 5 | Text("Hello, world!") 6 | .padding() 7 | } 8 | } 9 | 10 | struct ContentView_Previews: PreviewProvider { 11 | static var previews: some View { 12 | ContentView() 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Tests/Perf/test-app-plain/test-app-plain/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Tests/Perf/test-app-plain/test-app-plain/test_app_plainApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | @main 4 | struct test_app_plainApp: App { 5 | var body: some Scene { 6 | WindowGroup { 7 | ContentView() 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors": [ 3 | { 4 | "idiom": "universal" 5 | } 6 | ], 7 | "info": { 8 | "author": "xcode", 9 | "version": 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Tests/Perf/test-app-sentry/test-app-sentry/ContentView.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | struct ContentView: View { 4 | var body: some View { 5 | Text("Hello, world!") 6 | .padding() 7 | } 8 | } 9 | 10 | struct ContentView_Previews: PreviewProvider { 11 | static var previews: some View { 12 | ContentView() 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Tests/Perf/test-app-sentry/test-app-sentry/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Tests/Perf/test-app-sentry/test-app-sentry/test_app_sentryApp.swift: -------------------------------------------------------------------------------- 1 | import Sentry 2 | import Sentry 3 | import SwiftUI 4 | 5 | @main 6 | struct test_app_sentryApp: App { 7 | init() { 8 | SentrySDK.start { options in 9 | options.dsn = "https://a92d50327ac74b8b9aa4ea80eccfb267@o447951.ingest.sentry.io/5428557" 10 | } 11 | } 12 | 13 | var body: some Scene { 14 | WindowGroup { 15 | ContentView() 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Tests/README.md: -------------------------------------------------------------------------------- 1 | # Tests 2 | 3 | For test guidelines please checkout the [Contributing Guidelines](../CONTRIBUTING.md). 4 | 5 | # Integration tests 6 | 7 | - [SessionGeneratorTests](./SentryTests/Integrations/SentrySessionGeneratorTests.swift) generates session data to validate release health. 8 | - [External integration tests](../.github/workflows/integration-tests.yml) integrate the Sentry SDK via CocoaPods into some open source apps and run their tests. 9 | -------------------------------------------------------------------------------- /Tests/Resources/CrashState_legacy_1.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "crashedLastLaunch": false, 4 | "activeDurationSinceLastCrash": 2.5, 5 | "backgroundDurationSinceLastCrash": 5.0, 6 | "launchesSinceLastCrash": 10, 7 | "sessionsSinceLastCrash": 10 8 | } 9 | -------------------------------------------------------------------------------- /Tests/Resources/CrashState_unsupported_fields.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 9223372036854775808, 3 | "crashedLastLaunch": "false", 4 | "activeDurationSinceLastCrash": null, 5 | "backgroundDurationSinceLastCrash": { 6 | "not": "supported" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Tests/Resources/CrashState_wrong.json: -------------------------------------------------------------------------------- 1 | 501 2 | -------------------------------------------------------------------------------- /Tests/Resources/breadcrumb.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": { 3 | "breadcrumbs": [ 4 | { 5 | "category": "ui.lifecycle", 6 | "type": "navigation", 7 | "data": { 8 | "screen": "UIInputWindowController" 9 | }, 10 | "level": "info", 11 | "timestamp": "2020-02-06T01:00:32Z" 12 | } 13 | ] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Tests/Resources/breadcrumb_sdk_scope.json: -------------------------------------------------------------------------------- 1 | { 2 | "sentry_sdk_scope": { 3 | "breadcrumbs": [ 4 | { 5 | "category": "ui.lifecycle", 6 | "type": "navigation", 7 | "data": { 8 | "screen": "UIInputWindowController" 9 | }, 10 | "level": "info", 11 | "timestamp": "2020-02-06T01:00:32Z" 12 | } 13 | ] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Tests/SentryProfilerTests/SentryNSProcessInfoWrapperTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class SentryNSProcessInfoWrapperTests: XCTestCase { 4 | private struct Fixture { 5 | lazy var processInfoWrapper = SentryNSProcessInfoWrapper() 6 | } 7 | lazy private var fixture = Fixture() 8 | 9 | func testProcessorCount() { 10 | XCTAssert((0...UInt.max).contains(fixture.processInfoWrapper.processorCount)) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Tests/SentryTests/Categories/SentryNSDictionarySanitize+Tests.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | NSDictionary *_Nullable sentry_sanitize_with_nsnull(void); 6 | NSDictionary *_Nullable sentry_sanitize_with_non_dictionary(void); 7 | 8 | NS_ASSUME_NONNULL_END 9 | -------------------------------------------------------------------------------- /Tests/SentryTests/Categories/SentryNSDictionarySanitize+Tests.m: -------------------------------------------------------------------------------- 1 | #import "SentryNSDictionarySanitize.h" 2 | 3 | NSDictionary *_Nullable sentry_sanitize_with_nsnull(void) 4 | { 5 | // Cast [NSNull null] to NSDictionary to avoid compiler warnings/errors 6 | return sentry_sanitize((NSDictionary *)[NSNull null]); 7 | } 8 | 9 | NSDictionary *_Nullable sentry_sanitize_with_non_dictionary(void) 10 | { 11 | // Cast @"non-dictionary" to NSDictionary to avoid compiler warnings/errors 12 | return sentry_sanitize((NSDictionary *)@"non-dictionary"); 13 | } 14 | -------------------------------------------------------------------------------- /Tests/SentryTests/Extensions/StringExtensionsTests.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | @testable import Sentry 3 | import XCTest 4 | 5 | class StringExtensionsTests: XCTestCase { 6 | func testSnakeToCamelCase() { 7 | XCTAssertEqual("name_something".snakeToCamelCase(), "nameSomething") 8 | XCTAssertEqual("name_something_else".snakeToCamelCase(), "nameSomethingElse") 9 | XCTAssertEqual("KEEP_CASE".snakeToCamelCase(), "KEEPCASE") 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tests/SentryTests/Helper/ExceptionCatcher.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @class NSException; 6 | 7 | @interface ExceptionCatcher : NSObject 8 | 9 | + (NSException *_Nullable)tryBlock:(void (^)(void))tryBlock; 10 | 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /Tests/SentryTests/Helper/ExceptionCatcher.m: -------------------------------------------------------------------------------- 1 | #import "ExceptionCatcher.h" 2 | 3 | @implementation ExceptionCatcher 4 | 5 | + (NSException *)tryBlock:(void (^)(void))tryBlock 6 | { 7 | @try { 8 | tryBlock(); 9 | return nil; 10 | } @catch (NSException *exception) { 11 | return exception; 12 | } 13 | } 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Tests/SentryTests/Helper/SentryLogTestHelper.h: -------------------------------------------------------------------------------- 1 | #import "SentryLog.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | void sentryLogDebugWithMacroArgsNotEvaluated(void); 6 | void sentryLogErrorWithMacro(NSString *message); 7 | 8 | NS_ASSUME_NONNULL_END 9 | -------------------------------------------------------------------------------- /Tests/SentryTests/Helper/SentryLogTestHelper.m: -------------------------------------------------------------------------------- 1 | #import "SentryLogTestHelper.h" 2 | #import 3 | 4 | NSString * 5 | doNotCallMe(void) 6 | { 7 | XCTFail("The args for the log macro must not be evaluated."); 8 | return @"Don't call me"; 9 | } 10 | 11 | void 12 | sentryLogDebugWithMacroArgsNotEvaluated(void) 13 | { 14 | SENTRY_LOG_DEBUG(@"%@", doNotCallMe()); 15 | } 16 | 17 | void 18 | sentryLogErrorWithMacro(NSString *message) 19 | { 20 | SENTRY_LOG_ERROR(@"%@", message); 21 | } 22 | -------------------------------------------------------------------------------- /Tests/SentryTests/Helper/TestFileManagerDelegate.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import SentryTestUtils 3 | 4 | class TestFileManagerDelegate: NSObject, SentryFileManagerDelegate { 5 | 6 | var envelopeItemsDeleted = Invocations() 7 | func envelopeItemDeleted(_ envelopeItem: SentryEnvelopeItem, with dataCategory: SentryDataCategory) { 8 | envelopeItemsDeleted.record(dataCategory) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Tests/SentryTests/Integrations/Breadcrumbs/SentryBreadcrumbTestDelegate.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import SentryTestUtils 3 | 4 | class SentryBreadcrumbTestDelegate: NSObject, SentryBreadcrumbDelegate { 5 | 6 | var addCrumbInvocations = Invocations() 7 | func add(_ crumb: Breadcrumb) { 8 | print("crumb: \(crumb)") 9 | addCrumbInvocations.record(crumb) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tests/SentryTests/Integrations/Performance/CoreData/SentryCoreDataTracker+Test.h: -------------------------------------------------------------------------------- 1 | #import "SentryCoreDataTracker.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentryCoreDataTracker (Test) 6 | 7 | - (BOOL)saveManagedObjectContextWithNilError:(NSManagedObjectContext *)context 8 | originalImp:(BOOL(NS_NOESCAPE ^)(NSError **))original; 9 | 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /Tests/SentryTests/Integrations/Performance/CoreData/SentryCoreDataTracker+Test.m: -------------------------------------------------------------------------------- 1 | #import "SentryCoreDataTracker+Test.h" 2 | 3 | @implementation SentryCoreDataTracker (Test) 4 | 5 | - (BOOL)saveManagedObjectContextWithNilError:(NSManagedObjectContext *)context 6 | originalImp:(BOOL(NS_NOESCAPE ^)(NSError **))original 7 | { 8 | return [self managedObjectContext:context save:nil originalImp:original]; 9 | } 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Tests/SentryTests/Integrations/Performance/IO/SentryFileIoTrackingUnitTests.swift: -------------------------------------------------------------------------------- 1 | import Sentry 2 | import XCTest 3 | 4 | class SentryFileIoTrackingUnitTests: XCTestCase { 5 | 6 | func test_FileIOTracking_Disabled() { 7 | let options = Options() 8 | options.enableFileIOTracing = false 9 | let sut = SentryFileIOTrackingIntegration() 10 | let result = sut.install(with: options) 11 | 12 | XCTAssertFalse(result) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Tests/SentryTests/Integrations/Performance/SentryPerformanceTracker+Testing.h: -------------------------------------------------------------------------------- 1 | #import "SentryPerformanceTracker.h" 2 | #import "SentrySpan.h" 3 | #import "SentrySpanId.h" 4 | #import "SentryTracer.h" 5 | 6 | NS_ASSUME_NONNULL_BEGIN 7 | 8 | @interface SentryPerformanceTracker (Testing) 9 | 10 | - (void)clear; 11 | 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /Tests/SentryTests/Integrations/Screenshot/TestSentryScreenShot.swift: -------------------------------------------------------------------------------- 1 | #if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) 2 | 3 | class TestSentryScreenshot: SentryScreenshot { 4 | 5 | var result: [Data] = [] 6 | var images: [UIImage] = [] 7 | var processScreenshotsCallback: (() -> Void)? 8 | 9 | override func appScreenshotsData() -> [Data] { 10 | processScreenshotsCallback?() 11 | return result 12 | } 13 | 14 | override func appScreenshotsFromMainThread() -> [UIImage] { 15 | return images 16 | } 17 | } 18 | 19 | #endif // os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) 20 | -------------------------------------------------------------------------------- /Tests/SentryTests/Integrations/SentryCrash/SentryCrashIntegration+TestInit.h: -------------------------------------------------------------------------------- 1 | #import "SentryCrashIntegration.h" 2 | #import "SentryDispatchQueueWrapper.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface SentryCrashIntegration (TestInit) 7 | 8 | - (instancetype)initWithCrashAdapter:(SentryCrashWrapper *)crashWrapper 9 | andDispatchQueueWrapper:(SentryDispatchQueueWrapper *)dispatchQueueWrapper; 10 | 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /Tests/SentryTests/Integrations/SentryCrash/SentryTestIntegration.h: -------------------------------------------------------------------------------- 1 | #import "Sentry/SentryIntegrationProtocol.h" 2 | #import 3 | 4 | @class SentryOptions; 5 | 6 | NS_ASSUME_NONNULL_BEGIN 7 | 8 | @interface SentryTestIntegration : NSObject 9 | 10 | @property (nonatomic, strong) SentryOptions *options; 11 | 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /Tests/SentryTests/Integrations/SentryCrash/SentryTestIntegration.m: -------------------------------------------------------------------------------- 1 | #import "SentryTestIntegration.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @implementation SentryTestIntegration 6 | 7 | - (BOOL)installWithOptions:(SentryOptions *)options 8 | { 9 | self.options = options; 10 | return YES; 11 | } 12 | 13 | - (void)uninstall 14 | { 15 | } 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayIntegration+Test.h: -------------------------------------------------------------------------------- 1 | #import "SentrySessionReplayIntegration.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentrySessionReplayIntegration (Test) 6 | 7 | - (NSURL *)replayDirectory; 8 | - (void)moveCurrentReplay; 9 | 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END 13 | -------------------------------------------------------------------------------- /Tests/SentryTests/Integrations/ViewHierarchy/TestSentryViewHierarchy.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | #if SENTRY_HAS_UIKIT 4 | 5 | # import "SentryCrashJSONCodec.h" 6 | # import "SentryViewHierarchy.h" 7 | 8 | void saveViewHierarchy(const char *path); 9 | 10 | @interface SentryViewHierarchy (Test) 11 | - (int)viewHierarchyFromView:(UIView *)view intoContext:(SentryCrashJSONEncodeContext *)context; 12 | - (BOOL)processViewHierarchy:(NSArray *)windows 13 | addFunction:(SentryCrashJSONAddDataFunc)addJSONDataFunc 14 | userData:(void *const)userData; 15 | @end 16 | 17 | #endif // SENTRY_HAS_UIKIT 18 | -------------------------------------------------------------------------------- /Tests/SentryTests/MockUIScene.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | 3 | #if SENTRY_HAS_UIKIT 4 | # import 5 | 6 | NS_ASSUME_NONNULL_BEGIN 7 | 8 | API_AVAILABLE(ios(13.0)) 9 | @interface MockUIScene : UIScene 10 | 11 | - (instancetype)init; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | #endif 17 | -------------------------------------------------------------------------------- /Tests/SentryTests/MockUIScene.m: -------------------------------------------------------------------------------- 1 | #import "MockUIScene.h" 2 | #if SENTRY_HAS_UIKIT 3 | @implementation MockUIScene 4 | 5 | - (instancetype)init 6 | { 7 | return self; 8 | } 9 | 10 | - (UISceneActivationState)activationState 11 | { 12 | return UISceneActivationStateForegroundActive; 13 | } 14 | 15 | @end 16 | #endif 17 | -------------------------------------------------------------------------------- /Tests/SentryTests/Networking/HttpDateFormatter.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | class HttpDateFormatter { 4 | static func string(from date: Date) -> String { 5 | let dateFormatter = DateFormatter() 6 | dateFormatter.dateFormat = "EEE',' dd' 'MMM' 'yyyy HH':'mm':'ss zzz" 7 | dateFormatter.timeZone = TimeZone(abbreviation: "GMT") 8 | 9 | return dateFormatter.string(from: date) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tests/SentryTests/Networking/RateLimits/TestEnvelopeRateLimitDelegate.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import SentryTestUtils 3 | 4 | class TestEnvelopeRateLimitDelegate: NSObject, SentryEnvelopeRateLimitDelegate { 5 | 6 | var envelopeItemsDropped = Invocations() 7 | func envelopeItemDropped(_ envelopeItem: SentryEnvelopeItem, with dataCategory: SentryDataCategory) { 8 | envelopeItemsDropped.record(dataCategory) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Tests/SentryTests/Networking/TestNSURLRequestBuilder.h: -------------------------------------------------------------------------------- 1 | #import "SentryNSURLRequestBuilder.h" 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface TestNSURLRequestBuilder : SentryNSURLRequestBuilder 7 | 8 | @property (nonatomic, assign) BOOL shouldFailWithError; 9 | @property (nonatomic, assign) BOOL shouldFailReturningNil; 10 | 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /Tests/SentryTests/Networking/TestRateLimits.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public class TestRateLimits: NSObject, RateLimits { 4 | 5 | public var responses: [HTTPURLResponse] = [] 6 | public var isLimitForAllActive: Bool = false 7 | public var rateLimits: [SentryDataCategory] = [] 8 | 9 | public func isRateLimitActive(_ category: SentryDataCategory) -> Bool { 10 | return isLimitForAllActive || rateLimits.contains(category) 11 | } 12 | 13 | public func update(_ response: HTTPURLResponse) { 14 | responses.append(response) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Tests/SentryTests/Protocol/SentryAppState+Equality.h: -------------------------------------------------------------------------------- 1 | #import "SentryAppState.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentryAppState (Equality) 6 | 7 | - (BOOL)isEqual:(id _Nullable)object; 8 | 9 | - (NSUInteger)hash; 10 | 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /Tests/SentryTests/Protocol/SentryAttachment+Equality.h: -------------------------------------------------------------------------------- 1 | #import "SentryAttachment.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentryAttachment (Equality) 6 | 7 | - (BOOL)isEqual:(id _Nullable)other; 8 | 9 | - (BOOL)isEqualToAttachment:(SentryAttachment *)attachment; 10 | 11 | - (NSUInteger)hash; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /Tests/SentryTests/Protocol/SentryDiscardedEventTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class SentryDiscardedEventTests: XCTestCase { 4 | 5 | func testSerialize() { 6 | let discardedEvent = SentryDiscardedEvent(reason: SentryDiscardReason.sampleRate, category: SentryDataCategory.transaction, quantity: 2) 7 | 8 | let actual = discardedEvent.serialize() 9 | 10 | XCTAssertEqual("sample_rate", actual["reason"] as? String) 11 | XCTAssertEqual("transaction", actual["category"] as? String) 12 | XCTAssertEqual(discardedEvent.quantity, actual["quantity"] as? UInt) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Tests/SentryTests/Protocol/SentryMessage+Equality.h: -------------------------------------------------------------------------------- 1 | #import "SentryMessage.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentryMessage (Equality) 6 | 7 | - (BOOL)isEqual:(id _Nullable)object; 8 | 9 | - (BOOL)isEqualToMessage:(SentryMessage *)message; 10 | 11 | - (NSUInteger)hash; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /Tests/SentryTests/Protocol/SentryRedactDefaultOptionsTests.swift: -------------------------------------------------------------------------------- 1 | @testable import Sentry 2 | import XCTest 3 | 4 | class SentryRedactDefaultOptionsTests: XCTestCase { 5 | 6 | func testDefaultOptions() { 7 | // -- Act -- 8 | let options = SentryRedactDefaultOptions() 9 | 10 | // -- Assert -- 11 | XCTAssertTrue(options.maskAllText) 12 | XCTAssertTrue(options.maskAllImages) 13 | XCTAssertEqual(options.maskedViewClasses.count, 0) 14 | XCTAssertEqual(options.unmaskedViewClasses.count, 0) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Tests/SentryTests/Protocol/SentrySdkInfo+Equality.h: -------------------------------------------------------------------------------- 1 | #import "SentrySdkInfo.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentrySdkInfo (Equality) 6 | 7 | - (BOOL)isEqual:(id _Nullable)object; 8 | 9 | - (NSUInteger)hash; 10 | 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /Tests/SentryTests/Protocol/SentrySession+Equality.h: -------------------------------------------------------------------------------- 1 | #import "SentrySession.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentrySession (Equality) 6 | 7 | - (BOOL)isEqual:(id _Nullable)object; 8 | 9 | - (BOOL)isEqualToSession:(SentrySession *)session; 10 | 11 | - (NSUInteger)hash; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /Tests/SentryTests/Protocol/SentryStacktraceEquality.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SentryStacktraceEquality.swift 3 | // SentryTests 4 | // 5 | // Created by Philipp Hofmann on 18.06.20. 6 | // Copyright © 2020 Sentry. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | -------------------------------------------------------------------------------- /Tests/SentryTests/SentryBinaryImageCache+Private.h: -------------------------------------------------------------------------------- 1 | #import "SentryBinaryImageCache.h" 2 | #import "SentryCrashBinaryImageCache.h" 3 | 4 | @interface SentryBinaryImageCache () 5 | 6 | @property (nonatomic, strong) NSArray *cache; 7 | 8 | - (void)binaryImageAdded:(const SentryCrashBinaryImage *)image; 9 | 10 | - (void)binaryImageRemoved:(const SentryCrashBinaryImage *)image; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Tests/SentryTests/SentryContinuousProfiler+Test.h: -------------------------------------------------------------------------------- 1 | #import "SentryProfilingConditionals.h" 2 | 3 | #if SENTRY_TARGET_PROFILING_SUPPORTED 4 | 5 | # import "SentryContinuousProfiler.h" 6 | 7 | @class SentryProfiler; 8 | 9 | @interface SentryContinuousProfiler () 10 | 11 | + (void)stopTimerAndCleanup; 12 | + (nullable SentryProfiler *)profiler; 13 | 14 | @end 15 | 16 | #endif // SENTRY_TARGET_PROFILING_SUPPORTED 17 | -------------------------------------------------------------------------------- /Tests/SentryTests/SentryCrash/SentryCrash+Test.h: -------------------------------------------------------------------------------- 1 | #import "SentryCrash.h" 2 | 3 | @interface SentryCrash (Test) 4 | - (NSString *)getBundleName; 5 | @end 6 | -------------------------------------------------------------------------------- /Tests/SentryTests/SentryCrash/SentryDebugImageProvider+TestInit.h: -------------------------------------------------------------------------------- 1 | #import "SentryDebugImageProvider.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @class SentryBinaryImageCache; 6 | 7 | @interface SentryDebugImageProvider (TestInit) 8 | 9 | - (instancetype)initWithBinaryImageProvider:(id)binaryImageProvider 10 | binaryImageCache:(SentryBinaryImageCache *)binaryImageCache; 11 | 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /Tests/SentryTests/SentrySDK+Tests.h: -------------------------------------------------------------------------------- 1 | #import "SentryDefines.h" 2 | #import "SentrySDK.h" 3 | 4 | @class SentryEnvelope; 5 | @class SentryHub; 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | @interface SentrySDK () 10 | 11 | + (void)setCurrentHub:(nullable SentryHub *)hub; 12 | 13 | + (void)setStartOptions:(nullable SentryOptions *)options; 14 | 15 | + (void)captureEnvelope:(SentryEnvelope *)envelope; 16 | 17 | + (void)storeEnvelope:(SentryEnvelope *)envelope; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Tests/SentryTests/SentryScope+Equality.h: -------------------------------------------------------------------------------- 1 | #import "SentryScope.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentryScope (Equality) 6 | 7 | - (BOOL)isEqual:(id _Nullable)other; 8 | - (BOOL)isEqualToScope:(SentryScope *)scope; 9 | - (NSUInteger)hash; 10 | 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /Tests/SentryTests/SentryUIApplication+Private.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef SentryUIApplication_Private_h 3 | #define SentryUIApplication_Private_h 4 | 5 | #import "SentryDefines.h" 6 | #import "SentryUIApplication.h" 7 | 8 | #if SENTRY_HAS_UIKIT 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface SentryUIApplication () 13 | 14 | - (NSArray *)relevantViewControllers; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | 20 | #endif /* SentryUIApplication_Private_h */ 21 | #endif 22 | -------------------------------------------------------------------------------- /Tests/SentryTests/State/SentryInstallation+Test.h: -------------------------------------------------------------------------------- 1 | #import "SentryInstallation.h" 2 | 3 | @interface SentryInstallation (Test) 4 | @property (class, nonatomic, readonly) 5 | NSMutableDictionary *installationStringsByCacheDirectoryPaths; 6 | @end 7 | -------------------------------------------------------------------------------- /Tests/SentryTests/TestUtils/EmptyIntegration.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | class EmptyIntegration: NSObject, SentryIntegrationProtocol { 4 | func install(with options: Options) -> Bool { 5 | return true 6 | } 7 | 8 | func uninstall() { 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tests/SentryTests/TestUtils/FormatHexAddress.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | func formatHexAddress(value: UInt64) -> String { 4 | return String(format: "0x%016llx", value) 5 | } 6 | -------------------------------------------------------------------------------- /Tests/SentryTests/TestUtils/SentryBooleanSerialization.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol SentrySerializable; 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface SentryBooleanSerialization : NSObject 8 | 9 | + (void)testBooleanSerialization:(id)serializable property:(NSString *)property; 10 | 11 | + (void)testBooleanSerialization:(id)serializable 12 | property:(NSString *)property 13 | serializedProperty:(NSString *)serializedProperty; 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Tests/SentryTests/TestUtils/SentryClassRegistrator.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | /** 6 | * To easier register classes to the Objective-C runtime from Swift. 7 | */ 8 | @interface SentryClassRegistrator : NSObject 9 | 10 | + (void)registerClass:(NSString *)name; 11 | 12 | + (void)unregisterClass:(NSString *)name; 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /Tests/SentryTests/TestUtils/SentryClassRegistrator.m: -------------------------------------------------------------------------------- 1 | #import "SentryClassRegistrator.h" 2 | #import 3 | #import 4 | 5 | @implementation SentryClassRegistrator 6 | 7 | + (void)registerClass:(NSString *)name 8 | { 9 | Class c = objc_allocateClassPair( 10 | [NSObject class], [name cStringUsingEncoding:NSUTF8StringEncoding], 0); 11 | 12 | objc_registerClassPair(c); 13 | } 14 | 15 | + (void)unregisterClass:(NSString *)name 16 | { 17 | Class c = NSClassFromString(name); 18 | if (c) { 19 | objc_disposeClassPair(c); 20 | } 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Tests/SentryTests/TestUtils/TestExtensions.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import XCTest 3 | 4 | extension XCTest { 5 | func contentsOfResource(_ resource: String, ofType: String = "json") throws -> Data { 6 | let path = Bundle(for: type(of: self)).path(forResource: "Resources/\(resource)", ofType: "json") 7 | return try Data(contentsOf: URL(fileURLWithPath: path ?? "")) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Tests/SentryTests/Transaction/SentryTracer+Test.h: -------------------------------------------------------------------------------- 1 | #import "SentryTracer.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface SentryTracer (Test) 6 | 7 | + (void)resetAppStartMeasurementRead; 8 | 9 | - (void)updateStartTime:(NSDate *)startTime; 10 | 11 | @end 12 | 13 | void testing_setMeasurementWithNilName(SentryTracer *tracer, NSNumber *value); 14 | 15 | void testing_setMeasurementWithNilNameAndUnit( 16 | SentryTracer *tracer, NSNumber *value, SentryMeasurementUnit *unit); 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /Tests/SentryTests/Transaction/TestSentrySpan.h: -------------------------------------------------------------------------------- 1 | #import "SentrySpan.h" 2 | #import "SentrySpanProtocol.h" 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface TestSentrySpan : SentrySpan 7 | 8 | - (instancetype)init; 9 | 10 | - (void)setExtraValue:(nullable id)value forKey:(nonnull NSString *)key DEPRECATED_ATTRIBUTE; 11 | 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /Tests/SentryTests/Transactions/SentrySpanKeyTests.swift: -------------------------------------------------------------------------------- 1 | @testable import Sentry 2 | import XCTest 3 | 4 | class SentrySpanDataKeyTests: XCTestCase { 5 | func testFileSize_shouldBeExpectedValue() { 6 | XCTAssertEqual(SentrySpanDataKeyFileSize, "file.size") 7 | } 8 | 9 | func testFilePath_shouldBeExpectedValue() { 10 | XCTAssertEqual(SentrySpanDataKeyFilePath, "file.path") 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Utils/VersionBump/.swiftlint.yml: -------------------------------------------------------------------------------- 1 | parent_config: ../.swiftlint.yml 2 | 3 | disabled_rules: 4 | - force_try 5 | -------------------------------------------------------------------------------- /Utils/VersionBump/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.3 2 | import PackageDescription 3 | 4 | let package = Package( 5 | name: "VersionBump", 6 | products: [ 7 | .executable(name: "VersionBump", targets: ["VersionBump"]) 8 | ], 9 | dependencies: [ 10 | .package(url: "https://github.com/kareman/SwiftShell.git", from: "5.1.0"), 11 | .package(url: "https://github.com/sharplet/Regex.git", from: "2.1.1") 12 | ], 13 | targets: [ 14 | .target( 15 | name: "VersionBump", 16 | dependencies: ["SwiftShell", "Regex"], 17 | path: "./") 18 | ] 19 | ) 20 | -------------------------------------------------------------------------------- /develop-docs/disabling_tests_xcode_test_plan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/develop-docs/disabling_tests_xcode_test_plan.png -------------------------------------------------------------------------------- /develop-docs/xcode_test_plan_uicapture_playback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/develop-docs/xcode_test_plan_uicapture_playback.png -------------------------------------------------------------------------------- /develop-docs/xcode_test_plan_uicapture_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/develop-docs/xcode_test_plan_uicapture_settings.png -------------------------------------------------------------------------------- /develop-docs/xcode_tests_navigator_with_skipped_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/develop-docs/xcode_tests_navigator_with_skipped_test.png -------------------------------------------------------------------------------- /dprint.json: -------------------------------------------------------------------------------- 1 | { 2 | "json": { 3 | "indentWidth": 2, 4 | "useTabs": false 5 | }, 6 | "markdown": { 7 | }, 8 | "yaml": { 9 | "indentWidth": 2 10 | }, 11 | "excludes": [ 12 | ".github/labeler.yml", 13 | "Tests/Resources/**/*garbage*.json", 14 | "sdk_api.json" 15 | ], 16 | "plugins": [ 17 | "https://plugins.dprint.dev/json-0.20.0.wasm", 18 | "https://plugins.dprint.dev/markdown-0.18.0.wasm", 19 | "https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.1.wasm" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /fastlane/Appfile: -------------------------------------------------------------------------------- 1 | app_identifier("io.sentry.sample.iOS-Swift") # The bundle identifier of your app 2 | 3 | itc_team_id("96157806") # App Store Connect Team ID 4 | team_id("97JCY7859U") # Developer Portal Team ID 5 | 6 | # For more information about the Appfile, see: 7 | # https://docs.fastlane.tools/advanced/#appfile 8 | 9 | -------------------------------------------------------------------------------- /fastlane/Matchfile: -------------------------------------------------------------------------------- 1 | git_url("git@github.com:getsentry/codesigning.git") 2 | storage_mode("git") 3 | username("bot@getsentry.com") # Your Apple Developer Portal username 4 | 5 | shallow_clone(true) 6 | readonly(true) 7 | 8 | # The docs are available on https://docs.fastlane.tools/actions/match 9 | -------------------------------------------------------------------------------- /fastlane/Pluginfile: -------------------------------------------------------------------------------- 1 | # Autogenerated by fastlane 2 | # 3 | # Ensure this file is checked in to source control! 4 | 5 | gem 'fastlane-plugin-sentry' 6 | -------------------------------------------------------------------------------- /scripts/.clang-format-version: -------------------------------------------------------------------------------- 1 | 20.1.6 2 | -------------------------------------------------------------------------------- /scripts/.swiftlint-version: -------------------------------------------------------------------------------- 1 | 0.59.1 2 | -------------------------------------------------------------------------------- /scripts/bump.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eux 3 | SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" 4 | cd "$SCRIPT_DIR/.." 5 | 6 | OLD_VERSION="${1}" 7 | NEW_VERSION="${2}" 8 | 9 | echo "--> Clean VersionBump" 10 | cd Utils/VersionBump && swift build 11 | cd "$SCRIPT_DIR/.." 12 | echo "--> Bumping version to ${OLD_VERSION} ${NEW_VERSION}" 13 | ./Utils/VersionBump/.build/debug/VersionBump --update "${NEW_VERSION}" 14 | 15 | ./scripts/update-package-sha.sh 16 | -------------------------------------------------------------------------------- /scripts/ci-select-xcode.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # For available Xcode versions see: 4 | # - https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md 5 | # - https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md 6 | # - https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md 7 | 8 | set -euo pipefail 9 | 10 | XCODE_VERSION="${1}" 11 | 12 | # We prefer this over calling `sudo xcode-select` because it will fail if the Xcode version 13 | # is not installed. Also xcodes is preinstalled on the GH runners. 14 | xcodes select "$XCODE_VERSION" 15 | swiftc --version 16 | -------------------------------------------------------------------------------- /scripts/create-carthage-json.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | echo "{ \"1.0\": \"file:///$(pwd)/Carthage/Sentry.framework.zip?alt=file:///$(pwd)/Carthage/Sentry.xcframework.zip\" }" > ./Samples/Carthage-Validation/Sentry.Carthage.json 5 | echo "{ \"1.0\": \"file:///$(pwd)/Carthage/SentrySwiftUI.framework.zip?alt=file:///$(pwd)/Carthage/SentrySwiftUI.xcframework.zip\" }" > ./Samples/Carthage-Validation/SentrySwiftUI.Carthage.json 6 | -------------------------------------------------------------------------------- /scripts/update-api.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | ./scripts/build-xcframework.sh iOSOnly 5 | 6 | xcrun --sdk iphoneos swift-api-digester \ 7 | -dump-sdk \ 8 | -o sdk_api.json \ 9 | -abort-on-module-fail \ 10 | -avoid-tool-args \ 11 | -avoid-location \ 12 | -module Sentry \ 13 | -target arm64-apple-ios10.0 \ 14 | -iframework ./Carthage/Sentry-Dynamic.xcframework/ios-arm64_arm64e 15 | -------------------------------------------------------------------------------- /scripts/update-tooling-versions.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | # Store current working directory 6 | pushd "$(pwd)" > /dev/null 7 | # Change to script directory 8 | cd "${0%/*}" 9 | 10 | # -- Begin Script -- 11 | 12 | clang-format --version | awk '{print $3}' > .clang-format-version 13 | swiftlint version > .swiftlint-version 14 | 15 | # -- End Script -- 16 | 17 | # Return to original working directory 18 | popd > /dev/null 19 | -------------------------------------------------------------------------------- /scripts/xcframework-generated-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cat .github/last-release-runid 3 | -------------------------------------------------------------------------------- /scripts/xcode-slowest-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | # Finds the x amount of slowest test cases in the raw-test-output.log file. 5 | # Logic copied from https://stanislaw.github.io/2016/08/04/how-to-find-the-slowest-xctest.html. 6 | 7 | RAW_TEST_OUTPUT_LOG=${1:-raw-test-output.log} 8 | NUMBER_OF_SLOWEST_TEST="${2:-20}" 9 | 10 | echo "The $NUMBER_OF_SLOWEST_TEST slowest test cases:" 11 | grep 'Test\ Case.*seconds' "$RAW_TEST_OUTPUT_LOG" | awk -F '[()]' '{print $2 " -> " $1}' | sort -rn | head -n "$NUMBER_OF_SLOWEST_TEST" 12 | -------------------------------------------------------------------------------- /test-server/.dockerignore: -------------------------------------------------------------------------------- 1 | .build/ 2 | .swiftpm/ 3 | -------------------------------------------------------------------------------- /test-server/.gitignore: -------------------------------------------------------------------------------- 1 | Packages 2 | .build 3 | xcuserdata 4 | *.xcodeproj 5 | DerivedData/ 6 | .DS_Store 7 | db.sqlite 8 | .swiftpm 9 | -------------------------------------------------------------------------------- /test-server/Public/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "employee": { 3 | "name": "Max", 4 | "salary": 56000, 5 | "married": true 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test-server/Public/sentry-logo-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/test-server/Public/sentry-logo-black.png -------------------------------------------------------------------------------- /test-server/Sources/App/Controllers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getsentry/sentry-cocoa/e25f701cb7e7293d794b4212dda4e4cd40251c86/test-server/Sources/App/Controllers/.gitkeep -------------------------------------------------------------------------------- /test-server/Sources/App/configure.swift: -------------------------------------------------------------------------------- 1 | import Vapor 2 | 3 | // configures your application 4 | public func configure(_ app: Application) throws { 5 | // uncomment to serve files from /Public folder 6 | app.middleware.use(FileMiddleware(publicDirectory: app.directory.publicDirectory)) 7 | 8 | // register routes 9 | try routes(app) 10 | } 11 | -------------------------------------------------------------------------------- /test-server/Sources/Run/main.swift: -------------------------------------------------------------------------------- 1 | import App 2 | import Vapor 3 | 4 | var env = try Environment.detect() 5 | try LoggingSystem.bootstrap(from: &env) 6 | let app = Application(env) 7 | defer { app.shutdown() } 8 | try configure(app) 9 | try app.run() 10 | -------------------------------------------------------------------------------- /test-server/Tests/AppTests/AppTests.swift: -------------------------------------------------------------------------------- 1 | @testable import App 2 | import XCTVapor 3 | 4 | final class AppTests: XCTestCase { 5 | func testHelloWorld() throws { 6 | let app = Application(.testing) 7 | defer { app.shutdown() } 8 | try configure(app) 9 | 10 | try app.test(.GET, "hello", afterResponse: { res in 11 | XCTAssertEqual(res.status, .ok) 12 | XCTAssertEqual(res.body.string, "Hello, world!") 13 | }) 14 | } 15 | } 16 | --------------------------------------------------------------------------------