Skip to content

Commit 62db6a9

Browse files
committed
Remove assertion around swizzling
1 parent 25a120b commit 62db6a9

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

FirebasePerformance/Sources/Instrumentation/FPRSelectorInstrumentor.m

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
#import "FirebasePerformance/Sources/Common/FPRDiagnostics.h"
1818

1919
#import <GoogleUtilities/GULSwizzler.h>
20-
#ifdef FPR_UNSWIZZLE_AVAILABLE
21-
#import <GoogleUtilities/GULSwizzler+Unswizzle.h>
22-
#endif
2320

2421
@implementation FPRSelectorInstrumentor {
2522
// The class this instrumentor operates on.
@@ -76,11 +73,8 @@ - (void)swizzle {
7673

7774
- (void)unswizzle {
7875
_swizzled = NO;
79-
#ifdef FPR_UNSWIZZLE_AVAILABLE
80-
[GULSwizzler unswizzleClass:_class selector:_selector isClassSelector:_isClassSelector];
81-
#else
82-
NSAssert(NO, @"Unswizzling is disabled.");
83-
#endif
76+
// For the SDK, we do not unswizzle, but this does run in unit tests,
77+
// though it does not seem to have any effect
8478
}
8579

8680
- (IMP)currentIMP {

Package.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,6 @@ let package = Package(
884884
.product(name: "GoogleDataTransport", package: "GoogleDataTransport"),
885885
.product(name: "GULEnvironment", package: "GoogleUtilities"),
886886
.product(name: "GULMethodSwizzler", package: "GoogleUtilities"),
887-
.product(name: "GULSwizzlerTestHelpers", package: "GoogleUtilities"),
888887
.product(name: "GULUserDefaults", package: "GoogleUtilities"),
889888
.product(name: "nanopb", package: "nanopb"),
890889
],
@@ -896,7 +895,6 @@ let package = Package(
896895
.define("PB_NO_PACKED_STRUCTS", to: "1"),
897896
.define("PB_ENABLE_MALLOC", to: "1"),
898897
.define("FIRPerformance_LIB_VERSION", to: firebaseVersion),
899-
.define("FPR_UNSWIZZLE_AVAILABLE", to: "1"),
900898
],
901899
linkerSettings: [
902900
.linkedFramework("MobileCoreServices", .when(platforms: [.iOS, .tvOS])),
@@ -924,6 +922,7 @@ let package = Package(
924922
.define("PB_FIELD_32BIT", to: "1"),
925923
.define("PB_NO_PACKED_STRUCTS", to: "1"),
926924
.define("PB_ENABLE_MALLOC", to: "1"),
925+
.define("FPR_UNSWIZZLE_AVAILABLE", to: "1"),
927926
]
928927
),
929928

0 commit comments

Comments
 (0)