-
-
Notifications
You must be signed in to change notification settings - Fork 375
Convert SentryWatchdogTerminationIntegration to Swift
#7119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ref/watchdog-logic-tracker-to-swift
Are you sure you want to change the base?
Convert SentryWatchdogTerminationIntegration to Swift
#7119
Conversation
Migrate the Integration class from Objective-C to Swift, building on top of the previously migrated Logic and Tracker Swift classes. The Swift Integration uses a protocol-based dependency injection pattern for better testability. Changes: - Add SentryWatchdogTerminationTrackingIntegration.swift with generics - Remove old Objective-C Integration implementation - Update Integrations.swift to register the Swift integration - Update SentrySDKInternal.m to remove ObjC registration - Update Integration tests to work with new Swift implementation
Update the scope observer API to be more Swift-friendly. Rename addObserver to addScopeObserver and make it accept Any type with runtime validation, allowing Swift-defined protocols to work properly with Objective-C. Changes: - Rename addObserver: to addScopeObserver: in SentryScope - Update addScopeObserver to accept Any with runtime protocol checking - Remove addObserver from SentryScope+Private.h header - Add addScopeObserver to SentryScope+PrivateSwift.h - Update SentryCrashIntegration to use new API - Update tests to cast observer to Any when needed - Update Xcode project to include Integration Swift file
...s/Swift/Integrations/WatchdogTerminations/SentryWatchdogTerminationTrackingIntegration.swift
Outdated
Show resolved
Hide resolved
b6b35bb to
7145675
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## ref/watchdog-logic-tracker-to-swift #7119 +/- ##
=========================================================================
- Coverage 84.739% 84.457% -0.282%
=========================================================================
Files 459 454 -5
Lines 27515 27383 -132
Branches 12111 11986 -125
=========================================================================
- Hits 23316 23127 -189
- Misses 4157 4209 +52
- Partials 42 47 +5
... and 50 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
📜 Description
Converts SentryWatchdogTerminationIntegration to Swift
💡 Motivation and Context
Less ObjC code, more Swift type safety
💚 How did you test it?
📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.#skip-changelog