diff --git a/apple/RNCWebView.h b/apple/RNCWebView.h index 5a28a11..7eea051 100644 --- a/apple/RNCWebView.h +++ b/apple/RNCWebView.h @@ -20,8 +20,11 @@ @end @interface RNCWeakScriptMessageDelegate : NSObject -@property (nonatomic, weak) id scriptDelegate; -- (instancetype)initWithDelegate:(id)scriptDelegate; + +@property (nonatomic, weak, nullable) id scriptDelegate; + +- (nullable instancetype)initWithDelegate:(id _Nullable)scriptDelegate; + @end @interface RNCWebView : RCTView @@ -66,7 +69,7 @@ @property (nonatomic, copy) NSString * _Nullable allowingReadAccessToURL; @property (nonatomic, assign) BOOL pullToRefreshEnabled; #if !TARGET_OS_OSX -@property (nonatomic, weak) UIRefreshControl * refreshControl; +@property (nonatomic, weak) UIRefreshControl * _Nullable refreshControl; #endif #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 /* iOS 13 */ @@ -83,7 +86,7 @@ - (void)stopLoading; #if !TARGET_OS_OSX - (void)addPullToRefreshControl; -- (void)pullToRefresh:(UIRefreshControl *)refreshControl; +- (void)pullToRefresh:(UIRefreshControl *_Nonnull)refreshControl; #endif @end diff --git a/apple/RNCWebView.m b/apple/RNCWebView.m index f840059..0cd79a6 100644 --- a/apple/RNCWebView.m +++ b/apple/RNCWebView.m @@ -1064,7 +1064,8 @@ static NSDictionary* customCertificatesForHost; return; } - if ([error.domain isEqualToString:@"WebKitErrorDomain"] && error.code == 102 || [error.domain isEqualToString:@"WebKitErrorDomain"] && error.code == 101) { + if ([error.domain isEqualToString:@"WebKitErrorDomain"] && + (error.code == 102 || error.code == 101)) { // Error code 102 "Frame load interrupted" is raised by the WKWebView // when the URL is from an http redirect. This is a common pattern when // implementing OAuth with a WebView.