Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions FirebasePerformance/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
falsely classifying 60 FPS frames as slow on ProMotion devices,
while preserving dynamic frame rate support for tvOS.
- [fixed] Fixed a crash caused due to ISA swizzling weak ivars. (#16469)
- [fixed] Honor `firebase_performance_swizzle_denylist` when registering objects,
proxies and additional classes for swizzling. (#16469)

# 12.16.0
- [fixed] Fixed a crash in `FPRMemoryGaugeCollector` by collecting memory usage
Expand Down
32 changes: 25 additions & 7 deletions FirebasePerformance/Sources/Instrumentation/FPRInstrument.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#import <objc/runtime.h>

#import "FirebasePerformance/Sources/Instrumentation/FPRInstrument.h"
#import "FirebasePerformance/Sources/Instrumentation/FPRInstrument_Private.h"

Expand Down Expand Up @@ -49,22 +51,38 @@ - (void)registerInstrumentors {
}

- (BOOL)isObjectInstrumentable:(id)object {
if ([object isKindOfClass:[NSOperation class]]) {
if (!object || (![object isProxy] && [object isKindOfClass:[NSOperation class]])) {
return NO;
}
Class objectClass = [object isProxy] ? object_getClass(object) : [object class];
return [self isClassInstrumentable:objectClass];
}

- (BOOL)isClassInstrumentable:(Class)aClass {
NSString *className = NSStringFromClass(aClass);
if (!className) {
// If the className is nil, it should be a no-op.
return NO;
}

if ([[FPRConfigurations sharedInstance].swizzleClassDenylist containsObject:className]) {
FPRLogInfo(kFPRSwizzleClassDenylisted,
@"Skipped swizzling %@ because it is listed in "
@"firebase_performance_swizzle_denylist.",
className);
return NO;
}

return YES;
}

- (BOOL)registerClassInstrumentor:(FPRClassInstrumentor *)instrumentor {
@synchronized(self) {
NSString *className = NSStringFromClass(instrumentor.instrumentedClass);
if ([[FPRConfigurations sharedInstance].swizzleClassDenylist containsObject:className]) {
FPRLogInfo(kFPRSwizzleClassDenylisted,
@"Skipped swizzling %@ because it is listed in "
@"firebase_performance_swizzle_denylist.",
className);
// Check if it's in the denylist.
if (![self isClassInstrumentable:instrumentor.instrumentedClass]) {
return NO;
}

if ([_instrumentedClasses containsObject:instrumentor.instrumentedClass] ||
[instrumentor.instrumentedClass instancesRespondToSelector:@selector(gul_class)]) {
return NO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ NS_ASSUME_NONNULL_BEGIN

@interface FPRInstrument ()

/** Verifies whether the class should be instrumented. The decision is based on
* `FPRConfigurations`.
*
* @param aClass The class to verify if it's in the denylist.
* @return NO if the class is in the denylist, YES otherwise.
*/
- (BOOL)isClassInstrumentable:(Class)aClass;

/** Registers an instrumentor for a class. Should be called by subclasses.
*
* @param instrumentor The instrumentor to register.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,14 @@ - (void)registerClass:(Class)aClass {

- (void)registerObject:(id)object {
dispatch_sync(GetInstrumentationQueue(), ^{
if (![self isObjectInstrumentable:object]) {
return;
}

if ([object respondsToSelector:@selector(gul_class)]) {
return;
}

FPRObjectInstrumentor *instrumentor = [[FPRObjectInstrumentor alloc] initWithObject:object];

// Register the non-swizzled versions of these methods.
Expand All @@ -266,6 +271,10 @@ - (void)registerObject:(id)object {
}

- (void)registerProxy:(id)proxy {
if (![self isObjectInstrumentable:proxy]) {
return;
}

[FPRProxyObjectHelper registerProxyObject:proxy
forProtocol:@protocol(NSURLSessionDelegate)
varFoundHandler:^(id ivar) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@ - (void)dealloc {

- (void)registerInstrumentors {
dispatch_sync(GetInstrumentationQueue(), ^{
// Check if it's in the denylist. This is needed because it's
// a top level class, otherwise the FPRAssert is wrongly trigerred.
if (![self isClassInstrumentable:[NSURLConnection class]]) {
return;
}

FPRClassInstrumentor *instrumentor =
[[FPRClassInstrumentor alloc] initWithClass:[NSURLConnection class]];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,10 @@ - (void)registerInstrumentorForClass:(Class)aClass {
}

- (void)registerProxyObject:(id)proxy {
if (![self isObjectInstrumentable:proxy]) {
return;
}

[FPRProxyObjectHelper registerProxyObject:proxy
forSuperclass:[NSURLSession class]
varFoundHandler:^(id ivar) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ void InstrumentViewDidDisappear(FPRUIViewControllerInstrument *instrument,

- (void)registerInstrumentors {
dispatch_sync(GetInstrumentationQueue(), ^{
// Check if it's in the denylist. This is needed because it's
// a top level class, otherwise the FPRAssert is wrongly trigerred.
if (![self isClassInstrumentable:[UIViewController class]]) {
return;
}

FPRClassInstrumentor *instrumentor =
[[FPRClassInstrumentor alloc] initWithClass:[UIViewController class]];

Expand Down
40 changes: 40 additions & 0 deletions FirebasePerformance/Tests/Unit/FPRInstrumentTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#import <XCTest/XCTest.h>

#import "FirebasePerformance/Sources/Configurations/FPRConfigurations.h"
#import "FirebasePerformance/Sources/Instrumentation/FPRClassInstrumentor.h"
#import "FirebasePerformance/Sources/Instrumentation/FPRInstrument.h"
#import "FirebasePerformance/Sources/Instrumentation/FPRInstrument_Private.h"
Expand Down Expand Up @@ -63,6 +64,45 @@
[instrument deregisterInstrumentors];
}

- (void)testIsObjectInstrumentableWithValidObject {
FPRInstrument *instrument = [[FPRInstrument alloc] init];
NSObject *object = [[NSObject alloc] init];
XCTAssertTrue([instrument isObjectInstrumentable:object]);
}

- (void)testIsObjectInstrumentableWithNSOperation {
FPRInstrument *instrument = [[FPRInstrument alloc] init];
NSOperation *operation = [[NSOperation alloc] init];
XCTAssertFalse([instrument isObjectInstrumentable:operation]);
}

- (void)testIsObjectInstrumentableWithNil {
FPRInstrument *instrument = [[FPRInstrument alloc] init];
XCTAssertFalse([instrument isObjectInstrumentable:nil]);

Check warning on line 81 in FirebasePerformance/Tests/Unit/FPRInstrumentTest.m

View workflow job for this annotation

GitHub Actions / spm / spm (macos-26, Xcode_26.4, tvOS)

null passed to a callee that requires a non-null argument [-Wnonnull]

Check warning on line 81 in FirebasePerformance/Tests/Unit/FPRInstrumentTest.m

View workflow job for this annotation

GitHub Actions / spm / spm (macos-15, Xcode_26.2, tvOS)

null passed to a callee that requires a non-null argument [-Wnonnull]

Check warning on line 81 in FirebasePerformance/Tests/Unit/FPRInstrumentTest.m

View workflow job for this annotation

GitHub Actions / spm / spm (macos-26, Xcode_26.4, iOS)

null passed to a callee that requires a non-null argument [-Wnonnull]

Check warning on line 81 in FirebasePerformance/Tests/Unit/FPRInstrumentTest.m

View workflow job for this annotation

GitHub Actions / spm / spm (macos-15, Xcode_26.2, iOS)

null passed to a callee that requires a non-null argument [-Wnonnull]

Check warning on line 81 in FirebasePerformance/Tests/Unit/FPRInstrumentTest.m

View workflow job for this annotation

GitHub Actions / spm / spm (macos-26, Xcode_26.4, tvOS)

null passed to a callee that requires a non-null argument [-Wnonnull]

Check warning on line 81 in FirebasePerformance/Tests/Unit/FPRInstrumentTest.m

View workflow job for this annotation

GitHub Actions / spm / spm (macos-15, Xcode_26.2, tvOS)

null passed to a callee that requires a non-null argument [-Wnonnull]

Check warning on line 81 in FirebasePerformance/Tests/Unit/FPRInstrumentTest.m

View workflow job for this annotation

GitHub Actions / spm / spm (macos-26, Xcode_26.4, iOS)

null passed to a callee that requires a non-null argument [-Wnonnull]

Check warning on line 81 in FirebasePerformance/Tests/Unit/FPRInstrumentTest.m

View workflow job for this annotation

GitHub Actions / spm / spm (macos-15, Xcode_26.2, iOS)

null passed to a callee that requires a non-null argument [-Wnonnull]
}

- (void)testIsObjectInstrumentableWithDenylistedClass {
FPRInstrument *instrument = [[FPRInstrument alloc] init];
NSObject *object = [[NSObject alloc] init];
id mockConfig = [OCMockObject partialMockForObject:[FPRConfigurations sharedInstance]];
[[[mockConfig stub] andReturn:@[ NSStringFromClass([NSObject class]) ]] swizzleClassDenylist];
XCTAssertFalse([instrument isObjectInstrumentable:object]);
[mockConfig stopMocking];
}

- (void)testRegisterClassInstrumentorWithDenylistedClass {
FPRInstrument *instrument = [[FPRInstrument alloc] init];
FPRClassInstrumentor *instrumentor =
[[FPRClassInstrumentor alloc] initWithClass:[NSObject class]];
id mockConfig = [OCMockObject partialMockForObject:[FPRConfigurations sharedInstance]];
[[[mockConfig stub] andReturn:@[ NSStringFromClass([NSObject class]) ]] swizzleClassDenylist];
BOOL success = [instrument registerClassInstrumentor:instrumentor];
XCTAssertFalse(success);
XCTAssertEqual(instrument.classInstrumentors.count, 0);
XCTAssertEqual(instrument.instrumentedClasses.count, 0);
[mockConfig stopMocking];
}

#pragma mark - Unswizzle based tests

#if !SWIFT_PACKAGE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@

#import "FirebasePerformance/Tests/Unit/Instruments/FPRNSURLConnectionInstrumentTestDelegates.h"

#import <OCMock/OCMock.h>
#import <XCTest/XCTest.h>

#import "FirebasePerformance/Sources/Configurations/FPRConfigurations+Private.h"
#import "FirebasePerformance/Sources/Configurations/FPRConfigurations.h"
#import "FirebasePerformance/Sources/FPRClient.h"
#import "FirebasePerformance/Sources/Instrumentation/Network/Delegates/FPRNSURLConnectionDelegateInstrument.h"
#import "FirebasePerformance/Sources/Instrumentation/Network/FPRNSURLConnectionInstrument.h"
#import "FirebasePerformance/Sources/Public/FirebasePerformance/FIRPerformance.h"

Expand Down Expand Up @@ -168,6 +170,24 @@
[instrument deregisterInstrumentors];
}

/** Tests that registerObject: skips swizzling when the delegate class is in swizzleClassDenylist.
*/
- (void)testRegisterObjectSkippedWhenClassIsDenylisted {
FPRNSURLConnectionCompleteTestDelegate *delegate =
[[FPRNSURLConnectionCompleteTestDelegate alloc] init];
FPRNSURLConnectionDelegateInstrument *delegateInstrument =
[[FPRNSURLConnectionDelegateInstrument alloc] init];
id mockConfig = [OCMockObject partialMockForObject:[FPRConfigurations sharedInstance]];
[[[mockConfig stub]
andReturn:@[ NSStringFromClass([FPRNSURLConnectionCompleteTestDelegate class]) ]]
swizzleClassDenylist];

[delegateInstrument registerObject:delegate];
XCTAssertFalse([delegate respondsToSelector:@selector(gul_class)]);

[mockConfig stopMocking];
}

/** Tests calling -initWithRequest:delegate: is wrapped and calls through with nil delegate. */
- (void)testInitWithRequestAndNilDelegate {
FPRNSURLConnectionInstrument *instrument = [[FPRNSURLConnectionInstrument alloc] init];
Expand Down Expand Up @@ -202,8 +222,8 @@
[connection start];
XCTAssertNotNil([FPRNetworkTrace networkTraceFromObject:connection]);
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:1.0]];
XCTAssertTrue(delegate.connectionDidFailWithErrorCalled);

Check failure on line 225 in FirebasePerformance/Tests/Unit/Instruments/FPRNSURLConnectionInstrumentTest.m

View workflow job for this annotation

GitHub Actions / performance (iOS, unit) / build

testInitWithRequestDelegateStartImmediately, ((delegate.connectionDidFailWithErrorCalled) is true) failed
XCTAssertNil([FPRNetworkTrace networkTraceFromObject:connection]);

Check failure on line 226 in FirebasePerformance/Tests/Unit/Instruments/FPRNSURLConnectionInstrumentTest.m

View workflow job for this annotation

GitHub Actions / performance (iOS, unit) / build

testInitWithRequestDelegateStartImmediately, (([FPRNetworkTrace networkTraceFromObject:connection]) == nil) failed: "Request: <NSURLRequest: 0x107e9fee0> { URL: http://localhost:50278/ }"
[self.testServer start];
[instrument deregisterInstrumentors];
}
Expand Down Expand Up @@ -293,8 +313,8 @@
[connection start];
XCTAssertNotNil([FPRNetworkTrace networkTraceFromObject:connection]);
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:2.0]];
XCTAssertTrue(delegate.connectionDidFailWithErrorCalled);

Check failure on line 316 in FirebasePerformance/Tests/Unit/Instruments/FPRNSURLConnectionInstrumentTest.m

View workflow job for this annotation

GitHub Actions / performance (iOS, unit) / build

testConnectionDidFailWithError, ((delegate.connectionDidFailWithErrorCalled) is true) failed
XCTAssertNil([FPRNetworkTrace networkTraceFromObject:connection]);

Check failure on line 317 in FirebasePerformance/Tests/Unit/Instruments/FPRNSURLConnectionInstrumentTest.m

View workflow job for this annotation

GitHub Actions / performance (iOS, unit) / build

testConnectionDidFailWithError, (([FPRNetworkTrace networkTraceFromObject:connection]) == nil) failed: "Request: <NSURLRequest: 0x107f03ae0> { URL: http://nonurl/ }"
[self.testServer start];
[instrument deregisterInstrumentors];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#import "FirebasePerformance/Tests/Unit/Instruments/FPRNSURLSessionInstrumentTestDelegates.h"

#import <OCMock/OCMock.h>
#import <XCTest/XCTest.h>
#import <objc/runtime.h>

Expand Down Expand Up @@ -608,8 +609,8 @@
NSURLSessionDownloadTask *downloadTask = [session downloadTaskWithURL:URL];
[downloadTask resume];
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:5.0]];
XCTAssertNil([FPRNetworkTrace networkTraceFromObject:downloadTask]);

Check failure on line 612 in FirebasePerformance/Tests/Unit/Instruments/FPRNSURLSessionInstrumentTest.m

View workflow job for this annotation

GitHub Actions / performance (iOS, unit) / build

testDelegateURLSessionDownloadTaskDidResumeAtOffsetExpectedTotalBytes, (([FPRNetworkTrace networkTraceFromObject:downloadTask]) == nil) failed: "Request: <NSURLRequest: 0x107e9f620> { URL: http://localhost:50394/testBigDownload }"
XCTAssertTrue(delegate.URLSessionDownloadTaskDidResumeAtOffsetExpectedTotalBytesCalled);

Check failure on line 613 in FirebasePerformance/Tests/Unit/Instruments/FPRNSURLSessionInstrumentTest.m

View workflow job for this annotation

GitHub Actions / performance (iOS, unit) / build

testDelegateURLSessionDownloadTaskDidResumeAtOffsetExpectedTotalBytes, ((delegate.URLSessionDownloadTaskDidResumeAtOffsetExpectedTotalBytesCalled) is true) failed
[instrument deregisterInstrumentors];
}

Expand Down Expand Up @@ -671,8 +672,8 @@
[[FPRNSURLSessionDelegateProxy alloc] initWithDelegate:delegate];
NSURLSessionConfiguration *configuration =
[NSURLSessionConfiguration defaultSessionConfiguration];
[NSURLSession sessionWithConfiguration:configuration delegate:proxyDelegate delegateQueue:nil];

Check warning on line 675 in FirebasePerformance/Tests/Unit/Instruments/FPRNSURLSessionInstrumentTest.m

View workflow job for this annotation

GitHub Actions / performance (iOS, unit) / build

sending 'FPRNSURLSessionDelegateProxy *__strong' to parameter of incompatible type 'id<NSURLSessionDelegate> _Nullable'
[NSURLSession sessionWithConfiguration:configuration delegate:proxyDelegate delegateQueue:nil];

Check warning on line 676 in FirebasePerformance/Tests/Unit/Instruments/FPRNSURLSessionInstrumentTest.m

View workflow job for this annotation

GitHub Actions / performance (iOS, unit) / build

sending 'FPRNSURLSessionDelegateProxy *__strong' to parameter of incompatible type 'id<NSURLSessionDelegate> _Nullable'
XCTAssertEqual(instrument.delegateInstrument.classInstrumentors.count, 1);
XCTAssertEqual(instrument.delegateInstrument.instrumentedClasses.count, 1);
XCTAssertTrue(
Expand All @@ -690,13 +691,70 @@
[[FPRNSURLSessionDelegateWeakProxy alloc] initWithDelegate:delegate];
NSURLSessionConfiguration *configuration =
[NSURLSessionConfiguration defaultSessionConfiguration];
[NSURLSession sessionWithConfiguration:configuration delegate:proxyDelegate delegateQueue:nil];

Check warning on line 694 in FirebasePerformance/Tests/Unit/Instruments/FPRNSURLSessionInstrumentTest.m

View workflow job for this annotation

GitHub Actions / performance (iOS, unit) / build

sending 'FPRNSURLSessionDelegateWeakProxy *__strong' to parameter of incompatible type 'id<NSURLSessionDelegate> _Nullable'
[NSURLSession sessionWithConfiguration:configuration delegate:proxyDelegate delegateQueue:nil];

Check warning on line 695 in FirebasePerformance/Tests/Unit/Instruments/FPRNSURLSessionInstrumentTest.m

View workflow job for this annotation

GitHub Actions / performance (iOS, unit) / build

sending 'FPRNSURLSessionDelegateWeakProxy *__strong' to parameter of incompatible type 'id<NSURLSessionDelegate> _Nullable'
XCTAssertEqual(instrument.delegateInstrument.classInstrumentors.count, 0);
XCTAssertEqual(instrument.delegateInstrument.instrumentedClasses.count, 0);
[instrument deregisterInstrumentors];
}

/** Tests that registerObject: skips swizzling when the delegate class is in swizzleClassDenylist.
*/
- (void)testRegisterObjectSkippedWhenClassIsDenylisted {
FPRNSURLSessionTestDelegate *delegate = [[FPRNSURLSessionTestDelegate alloc] init];
FPRNSURLSessionDelegateInstrument *delegateInstrument =
[[FPRNSURLSessionDelegateInstrument alloc] init];
id mockConfig = [OCMockObject partialMockForObject:[FPRConfigurations sharedInstance]];
[[[mockConfig stub] andReturn:@[ NSStringFromClass([FPRNSURLSessionTestDelegate class]) ]]
swizzleClassDenylist];

XCTAssertFalse([delegate respondsToSelector:@selector(URLSession:task:didCompleteWithError:)]);
[delegateInstrument registerObject:delegate];
XCTAssertFalse([delegate respondsToSelector:@selector(URLSession:task:didCompleteWithError:)]);
XCTAssertFalse([delegate respondsToSelector:@selector(gul_class)]);

[mockConfig stopMocking];
}

/** Tests that registerProxy: skips swizzling when the proxy class is in swizzleClassDenylist. */
- (void)testRegisterProxySkippedWhenProxyClassIsDenylisted {
FPRNSURLSessionTestDelegate *delegate = [[FPRNSURLSessionTestDelegate alloc] init];
FPRNSURLSessionDelegateProxy *proxyDelegate =
[[FPRNSURLSessionDelegateProxy alloc] initWithDelegate:delegate];
FPRNSURLSessionDelegateInstrument *delegateInstrument =
[[FPRNSURLSessionDelegateInstrument alloc] init];
id mockConfig = [OCMockObject partialMockForObject:[FPRConfigurations sharedInstance]];
[[[mockConfig stub] andReturn:@[ NSStringFromClass(object_getClass(proxyDelegate)) ]]
swizzleClassDenylist];

XCTAssertFalse([delegate respondsToSelector:@selector(URLSession:task:didCompleteWithError:)]);
[delegateInstrument registerProxy:proxyDelegate];
XCTAssertFalse([delegate respondsToSelector:@selector(URLSession:task:didCompleteWithError:)]);
XCTAssertEqual(delegateInstrument.classInstrumentors.count, 0);

[mockConfig stopMocking];
}

/** Tests that registerProxy: skips the wrapped delegate when its class is in swizzleClassDenylist.
*/
- (void)testRegisterProxySkipsWrappedDelegateWhenWrappedClassIsDenylisted {
FPRNSURLSessionTestDelegate *delegate = [[FPRNSURLSessionTestDelegate alloc] init];
FPRNSURLSessionDelegateProxy *proxyDelegate =
[[FPRNSURLSessionDelegateProxy alloc] initWithDelegate:delegate];
FPRNSURLSessionDelegateInstrument *delegateInstrument =
[[FPRNSURLSessionDelegateInstrument alloc] init];
id mockConfig = [OCMockObject partialMockForObject:[FPRConfigurations sharedInstance]];
[[[mockConfig stub] andReturn:@[ NSStringFromClass([FPRNSURLSessionTestDelegate class]) ]]
swizzleClassDenylist];

XCTAssertFalse([delegate respondsToSelector:@selector(URLSession:task:didCompleteWithError:)]);
[delegateInstrument registerProxy:proxyDelegate];
XCTAssertFalse([delegate respondsToSelector:@selector(URLSession:task:didCompleteWithError:)]);
XCTAssertEqual(delegateInstrument.classInstrumentors.count, 0);

[mockConfig stopMocking];
}

/** Tests that the called delegate selector is wrapped and calls through. */
- (void)testProxyDelegateURLSessionTaskDidCompleteWithError {
[self.testServer stop];
Expand All @@ -710,7 +768,7 @@
NSURLSessionConfiguration *configuration =
[NSURLSessionConfiguration defaultSessionConfiguration];
NSURLSession *session = [NSURLSession sessionWithConfiguration:configuration
delegate:proxyDelegate

Check warning on line 771 in FirebasePerformance/Tests/Unit/Instruments/FPRNSURLSessionInstrumentTest.m

View workflow job for this annotation

GitHub Actions / performance (iOS, unit) / build

sending 'FPRNSURLSessionDelegateProxy *__strong' to parameter of incompatible type 'id<NSURLSessionDelegate> _Nullable'
delegateQueue:nil];
NSURLSessionTask *task;
@autoreleasepool {
Expand All @@ -736,7 +794,7 @@
NSURLSessionConfiguration *configuration =
[NSURLSessionConfiguration defaultSessionConfiguration];
NSURLSession *session = [NSURLSession sessionWithConfiguration:configuration
delegate:proxyDelegate

Check warning on line 797 in FirebasePerformance/Tests/Unit/Instruments/FPRNSURLSessionInstrumentTest.m

View workflow job for this annotation

GitHub Actions / performance (iOS, unit) / build

sending 'FPRNSURLSessionDelegateProxy *__strong' to parameter of incompatible type 'id<NSURLSessionDelegate> _Nullable'
delegateQueue:nil];
NSURL *URL = [self.testServer.serverURL URLByAppendingPathComponent:@"testUpload"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
Expand Down Expand Up @@ -773,7 +831,7 @@
NSURL *URL = [self.testServer.serverURL URLByAppendingPathComponent:@"testRedirect"];
NSURLRequest *request = [NSURLRequest requestWithURL:URL];
NSURLSession *session = [NSURLSession sessionWithConfiguration:configuration
delegate:proxyDelegate

Check warning on line 834 in FirebasePerformance/Tests/Unit/Instruments/FPRNSURLSessionInstrumentTest.m

View workflow job for this annotation

GitHub Actions / performance (iOS, unit) / build

sending 'FPRNSURLSessionDelegateProxy *__strong' to parameter of incompatible type 'id<NSURLSessionDelegate> _Nullable'
delegateQueue:nil];
NSURLSessionTask *task = [session dataTaskWithRequest:request];
[task resume];
Expand All @@ -800,7 +858,7 @@
NSURLSessionConfiguration *configuration =
[NSURLSessionConfiguration defaultSessionConfiguration];
NSURLSession *session = [NSURLSession sessionWithConfiguration:configuration
delegate:proxyDelegate

Check warning on line 861 in FirebasePerformance/Tests/Unit/Instruments/FPRNSURLSessionInstrumentTest.m

View workflow job for this annotation

GitHub Actions / performance (iOS, unit) / build

sending 'FPRNSURLSessionDelegateProxy *__strong' to parameter of incompatible type 'id<NSURLSessionDelegate> _Nullable'
delegateQueue:nil];
NSURL *URL = [self.testServer.serverURL URLByAppendingPathComponent:@"testBigDownload"];
dataTask = [session dataTaskWithURL:URL];
Expand Down
Loading