diff --git a/Libraries/AdSupport/RCTAdSupport.h b/Libraries/AdSupport/RCTAdSupport.h index d55d503a1..56e561f74 100644 --- a/Libraries/AdSupport/RCTAdSupport.h +++ b/Libraries/AdSupport/RCTAdSupport.h @@ -7,8 +7,6 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -#import - #import "RCTBridgeModule.h" @interface RCTAdSupport : NSObject diff --git a/Libraries/AdSupport/RCTAdSupport.m b/Libraries/AdSupport/RCTAdSupport.m index 1b2ad92de..dff794e34 100644 --- a/Libraries/AdSupport/RCTAdSupport.m +++ b/Libraries/AdSupport/RCTAdSupport.m @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ +#import + #import "RCTAdSupport.h" @implementation RCTAdSupport diff --git a/Libraries/Network/RCTNetworking.m b/Libraries/Network/RCTNetworking.m index b4ae07c1a..e6785c5ad 100644 --- a/Libraries/Network/RCTNetworking.m +++ b/Libraries/Network/RCTNetworking.m @@ -285,7 +285,7 @@ RCT_EXPORT_MODULE() }]; id handler = [handlers lastObject]; if (!handler) { - RCTLogError(@"No suitable request handler found for %@", request); + RCTLogError(@"No suitable request handler found for %@", request.URL); } return handler; } @@ -322,6 +322,9 @@ RCT_EXPORT_MODULE() NSURLRequest *request = [RCTConvert NSURLRequest:query[@"uri"]]; if (request) { id handler = [self handlerForRequest:request]; + if (!handler) { + return; + } (void)[[RCTDataLoader alloc] initWithRequest:request handler:handler callback:^(NSData *data, NSString *MIMEType, NSError *error) { if (data) { callback(nil, @{@"body": data, @"contentType": MIMEType});