@@ -12,13 +12,11 @@ class SentryUIViewControllerSwizzlingTests: XCTestCase {
1212 let objcRuntimeWrapper = SentryTestObjCRuntimeWrapper ( )
1313 let subClassFinder : TestSubClassFinder
1414 let processInfoWrapper = MockSentryProcessInfo ( )
15- let binaryImageCache : SentryBinaryImageCache
1615 let performanceTracker = SentryUIViewControllerPerformanceTracker ( )
1716 var options : Options
1817
1918 init ( ) {
2019 subClassFinder = TestSubClassFinder ( dispatchQueue: dispatchQueue, objcRuntimeWrapper: objcRuntimeWrapper, swizzleClassNameExcludes: [ ] )
21- binaryImageCache = SentryDependencyContainer . sharedInstance ( ) . binaryImageCache
2220
2321 options = Options . noIntegrations ( )
2422
@@ -29,15 +27,15 @@ class SentryUIViewControllerSwizzlingTests: XCTestCase {
2927 }
3028
3129 var sut : SentryUIViewControllerSwizzling {
32- return SentryUIViewControllerSwizzling ( options: options, dispatchQueue: dispatchQueue, objcRuntimeWrapper: objcRuntimeWrapper, subClassFinder: subClassFinder, processInfoWrapper: processInfoWrapper, binaryImageCache : binaryImageCache , performanceTracker: performanceTracker)
30+ return SentryUIViewControllerSwizzling ( options: options, dispatchQueue: dispatchQueue, objcRuntimeWrapper: objcRuntimeWrapper, subClassFinder: subClassFinder, processInfoWrapper: processInfoWrapper, performanceTracker: performanceTracker)
3331 }
3432
3533 var sutWithDefaultObjCRuntimeWrapper : SentryUIViewControllerSwizzling {
36- return SentryUIViewControllerSwizzling ( options: options, dispatchQueue: dispatchQueue, objcRuntimeWrapper: SentryDependencyContainer . sharedInstance ( ) . objcRuntimeWrapper, subClassFinder: subClassFinder, processInfoWrapper: processInfoWrapper, binaryImageCache : binaryImageCache , performanceTracker: performanceTracker)
34+ return SentryUIViewControllerSwizzling ( options: options, dispatchQueue: dispatchQueue, objcRuntimeWrapper: SentryDependencyContainer . sharedInstance ( ) . objcRuntimeWrapper, subClassFinder: subClassFinder, processInfoWrapper: processInfoWrapper, performanceTracker: performanceTracker)
3735 }
3836
3937 var testableSut : TestSentryUIViewControllerSwizzling {
40- return TestSentryUIViewControllerSwizzling ( options: options, dispatchQueue: dispatchQueue, objcRuntimeWrapper: objcRuntimeWrapper, subClassFinder: subClassFinder, processInfoWrapper: processInfoWrapper, binaryImageCache : binaryImageCache , performanceTracker: performanceTracker)
38+ return TestSentryUIViewControllerSwizzling ( options: options, dispatchQueue: dispatchQueue, objcRuntimeWrapper: objcRuntimeWrapper, subClassFinder: subClassFinder, processInfoWrapper: processInfoWrapper, performanceTracker: performanceTracker)
4139 }
4240
4341 var delegate : MockApplication . MockApplicationDelegate {
@@ -187,30 +185,6 @@ class SentryUIViewControllerSwizzlingTests: XCTestCase {
187185 XCTAssertNotNil ( SentrySDK . span)
188186 }
189187
190- /// Xcode 16 introduces a new flag ENABLE_DEBUG_DYLIB (https://developer.apple.com/documentation/xcode/build-settings-reference#Enable-Debug-Dylib-Support)
191- /// If this flag is enabled, debug builds of app and app extension targets on supported platforms and SDKs
192- /// will be built with the main binary code in a separate “NAME.debug.dylib”.
193- /// This test adds this debug.dylib and checks if it gets swizzled.
194- func testSwizzle_DebugDylib_GetsSwizzled( ) {
195- let imageName = String (
196- cString: class_getImageName ( SentryUIViewControllerSwizzlingTests . self) !,
197- encoding: . utf8) ! as NSString
198-
199- let debugDylib = " \( imageName) .debug.dylib "
200-
201- let image = createCrashBinaryImage ( 0 , name: debugDylib)
202- SentryDependencyContainer . sharedInstance ( ) . binaryImageCache. start ( false )
203- SentryDependencyContainer . sharedInstance ( ) . binaryImageCache. binaryImageAdded ( image: image)
204-
205- let sut = fixture. sut
206- sut. start ( )
207-
208- let subClassFinderInvocations = fixture. subClassFinder. invocations
209- let result = subClassFinderInvocations. invocations. filter { $0. imageName == debugDylib }
210-
211- XCTAssertEqual ( 1 , result. count)
212- }
213-
214188 func testSwizzle_fromScene_invalidNotification_NoObject( ) {
215189 let swizzler = fixture. testableSut
216190
0 commit comments