mirror of
https://github.com/status-im/react-native-webview.git
synced 2026-08-31 11:41:08 +00:00
fix(ios): Add missing nullability specifiers; fix if block warning (#1898)
This commit is contained in:
+7
-4
@@ -20,8 +20,11 @@
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
@interface RNCWeakScriptMessageDelegate : NSObject<WKScriptMessageHandler>
|
@interface RNCWeakScriptMessageDelegate : NSObject<WKScriptMessageHandler>
|
||||||
@property (nonatomic, weak) id<WKScriptMessageHandler> scriptDelegate;
|
|
||||||
- (instancetype)initWithDelegate:(id<WKScriptMessageHandler>)scriptDelegate;
|
@property (nonatomic, weak, nullable) id<WKScriptMessageHandler> scriptDelegate;
|
||||||
|
|
||||||
|
- (nullable instancetype)initWithDelegate:(id<WKScriptMessageHandler> _Nullable)scriptDelegate;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface RNCWebView : RCTView
|
@interface RNCWebView : RCTView
|
||||||
@@ -66,7 +69,7 @@
|
|||||||
@property (nonatomic, copy) NSString * _Nullable allowingReadAccessToURL;
|
@property (nonatomic, copy) NSString * _Nullable allowingReadAccessToURL;
|
||||||
@property (nonatomic, assign) BOOL pullToRefreshEnabled;
|
@property (nonatomic, assign) BOOL pullToRefreshEnabled;
|
||||||
#if !TARGET_OS_OSX
|
#if !TARGET_OS_OSX
|
||||||
@property (nonatomic, weak) UIRefreshControl * refreshControl;
|
@property (nonatomic, weak) UIRefreshControl * _Nullable refreshControl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 /* iOS 13 */
|
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 /* iOS 13 */
|
||||||
@@ -83,7 +86,7 @@
|
|||||||
- (void)stopLoading;
|
- (void)stopLoading;
|
||||||
#if !TARGET_OS_OSX
|
#if !TARGET_OS_OSX
|
||||||
- (void)addPullToRefreshControl;
|
- (void)addPullToRefreshControl;
|
||||||
- (void)pullToRefresh:(UIRefreshControl *)refreshControl;
|
- (void)pullToRefresh:(UIRefreshControl *_Nonnull)refreshControl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
+2
-1
@@ -1064,7 +1064,8 @@ static NSDictionary* customCertificatesForHost;
|
|||||||
return;
|
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
|
// 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
|
// when the URL is from an http redirect. This is a common pattern when
|
||||||
// implementing OAuth with a WebView.
|
// implementing OAuth with a WebView.
|
||||||
|
|||||||
Reference in New Issue
Block a user