Documentation Archive Developer
Search

WebKit Changes for Objective-C

WebKit

DOMCSSRule.h

DOMDocument.h

Declaration
From
- (DOMNodeList *)getElementsByClassName:(NSString *)tagname
To
- (DOMNodeList *)getElementsByClassName:(NSString *)classNames

DOMElement.h

DOMEventListener.h

Declaration
From
- (void)handleEvent:(DOMEvent *)evt
To
- (void)handleEvent:(DOMEvent *)event

DOMHTMLElement.h

Removed DOMHTMLElement.innerHTML
Removed DOMHTMLElement.outerHTML

DOMMutationEvent.h

Introduction
FromOS X 10.3
ToOS X 10.5

DOMNotation.h (Removed)

Removed DOMNotation
Removed DOMNotation.publicId
Removed DOMNotation.systemId

npapi.h

npfunctions.h

WebDownload.h

Removed NSObject(WebDownloadDelegate)

WebEditingDelegate.h

Removed NSObject(WebViewEditingDelegate)
Added NSObject(WebEditingDelegate)

WebFrameLoadDelegate.h

Removed NSObject(WebFrameLoadDelegate)

WebPolicyDelegate.h

WebPreferences.h

WebResourceLoadDelegate.h

WebUIDelegate.h

Removed NSObject(WebUIDelegate)
Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

Optional
From--
Toyes

WebView.h

Declaration
From
@property(nonatomic, assign) id downloadDelegate
To
@property(nonatomic, assign) id<WebDownloadDelegate> downloadDelegate

Declaration
From
@property(nonatomic, assign) id frameLoadDelegate
To
@property(nonatomic, assign) id<WebFrameLoadDelegate> frameLoadDelegate

Declaration
From
@property(nonatomic, assign) id policyDelegate
To
@property(nonatomic, assign) id<WebPolicyDelegate> policyDelegate

Declaration
From
@property(nonatomic, assign) id resourceLoadDelegate
To
@property(nonatomic, assign) id<WebResourceLoadDelegate> resourceLoadDelegate

Declaration
From
@property(nonatomic, assign) id UIDelegate
To
@property(nonatomic, assign) id<WebUIDelegate> UIDelegate

WKBackForwardList.h

Declaration
From
@property(nonatomic, readonly, strong) WKBackForwardListItem *backItem
To
@property(nonatomic, readonly, strong, nullable) WKBackForwardListItem *backItem

Declaration
From
@property(nonatomic, readonly, copy) NSArray *backList
To
@property(nonatomic, readonly, copy, nonnull) NSArray<WKBackForwardListItem *> *backList

Declaration
From
@property(nonatomic, readonly, strong) WKBackForwardListItem *currentItem
To
@property(nonatomic, readonly, strong, nullable) WKBackForwardListItem *currentItem

Declaration
From
@property(nonatomic, readonly, strong) WKBackForwardListItem *forwardItem
To
@property(nonatomic, readonly, strong, nullable) WKBackForwardListItem *forwardItem

Declaration
From
@property(nonatomic, readonly, copy) NSArray *forwardList
To
@property(nonatomic, readonly, copy, nonnull) NSArray<WKBackForwardListItem *> *forwardList

Declaration
From
- (WKBackForwardListItem *)itemAtIndex:(NSInteger)index
To
- (WKBackForwardListItem * _Nullable)itemAtIndex:(NSInteger)index

WKBackForwardListItem.h

Declaration
From
@property(readonly, copy) NSURL *initialURL
To
@property(readonly, copy, nonnull) NSURL *initialURL

Declaration
From
@property(readonly, copy) NSString *title
To
@property(readonly, copy, nullable) NSString *title

Declaration
From
@property(readonly, copy) NSURL *URL
To
@property(readonly, copy, nonnull) NSURL *URL

WKError.h

WKFrameInfo.h

Declaration
From
@property(nonatomic, readonly, copy) NSURLRequest *request
To
@property(nonatomic, readonly, copy, nonnull) NSURLRequest *request

WKNavigationAction.h

Declaration
From
@property(nonatomic, readonly, copy) NSURLRequest *request
To
@property(nonatomic, readonly, copy, nonnull) NSURLRequest *request

Declaration
From
@property(nonatomic, readonly, copy) WKFrameInfo *sourceFrame
To
@property(nonatomic, readonly, copy, nonnull) WKFrameInfo *sourceFrame

Declaration
From
@property(nonatomic, readonly, copy) WKFrameInfo *targetFrame
To
@property(nonatomic, readonly, copy, nullable) WKFrameInfo *targetFrame

WKNavigationDelegate.h

Declaration
From
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler
To
- (void)webView:(WKWebView * _Nonnull)webView decidePolicyForNavigationAction:(WKNavigationAction * _Nonnull)navigationAction decisionHandler:(void (^ _Nonnull)(WKNavigationActionPolicy))decisionHandler

Declaration
From
- (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicy))decisionHandler
To
- (void)webView:(WKWebView * _Nonnull)webView decidePolicyForNavigationResponse:(WKNavigationResponse * _Nonnull)navigationResponse decisionHandler:(void (^ _Nonnull)(WKNavigationResponsePolicy))decisionHandler

Declaration
From
- (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation
To
- (void)webView:(WKWebView * _Nonnull)webView didCommitNavigation:(WKNavigation * _Null_unspecified)navigation

Declaration
From
- (void)webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error
To
- (void)webView:(WKWebView * _Nonnull)webView didFailNavigation:(WKNavigation * _Null_unspecified)navigation withError:(NSError * _Nonnull)error

Declaration
From
- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error
To
- (void)webView:(WKWebView * _Nonnull)webView didFailProvisionalNavigation:(WKNavigation * _Null_unspecified)navigation withError:(NSError * _Nonnull)error

Declaration
From
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation
To
- (void)webView:(WKWebView * _Nonnull)webView didFinishNavigation:(WKNavigation * _Null_unspecified)navigation

Declaration
From
- (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler
To
- (void)webView:(WKWebView * _Nonnull)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge * _Nonnull)challenge completionHandler:(void (^ _Nonnull)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler

Declaration
From
- (void)webView:(WKWebView *)webView didReceiveServerRedirectForProvisionalNavigation:(WKNavigation *)navigation
To
- (void)webView:(WKWebView * _Nonnull)webView didReceiveServerRedirectForProvisionalNavigation:(WKNavigation * _Null_unspecified)navigation

Declaration
From
- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation
To
- (void)webView:(WKWebView * _Nonnull)webView didStartProvisionalNavigation:(WKNavigation * _Null_unspecified)navigation

WKNavigationResponse.h

Declaration
From
@property(nonatomic, readonly, copy) NSURLResponse *response
To
@property(nonatomic, readonly, copy, nonnull) NSURLResponse *response

WKScriptMessage.h

Declaration
From
@property(nonatomic, readonly, copy) id body
To
@property(nonatomic, readonly, copy, nonnull) id body

Declaration
From
@property(nonatomic, readonly, copy) WKFrameInfo *frameInfo
To
@property(nonatomic, readonly, copy, nonnull) WKFrameInfo *frameInfo

Declaration
From
@property(nonatomic, readonly, copy) NSString *name
To
@property(nonatomic, readonly, copy, nonnull) NSString *name

Declaration
From
@property(nonatomic, readonly, weak) WKWebView *webView
To
@property(nonatomic, readonly, weak, nullable) WKWebView *webView

WKScriptMessageHandler.h

Declaration
From
- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message
To
- (void)userContentController:(WKUserContentController * _Nonnull)userContentController didReceiveScriptMessage:(WKScriptMessage * _Nonnull)message

WKSecurityOrigin.h (Added)

WKUIDelegate.h

Declaration
From
- (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures
To
- (WKWebView * _Nullable)webView:(WKWebView * _Nonnull)webView createWebViewWithConfiguration:(WKWebViewConfiguration * _Nonnull)configuration forNavigationAction:(WKNavigationAction * _Nonnull)navigationAction windowFeatures:(WKWindowFeatures * _Nonnull)windowFeatures

Declaration
From
- (void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(void))completionHandler
To
- (void)webView:(WKWebView * _Nonnull)webView runJavaScriptAlertPanelWithMessage:(NSString * _Nonnull)message initiatedByFrame:(WKFrameInfo * _Nonnull)frame completionHandler:(void (^ _Nonnull)(void))completionHandler

Declaration
From
- (void)webView:(WKWebView *)webView runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(BOOL result))completionHandler
To
- (void)webView:(WKWebView * _Nonnull)webView runJavaScriptConfirmPanelWithMessage:(NSString * _Nonnull)message initiatedByFrame:(WKFrameInfo * _Nonnull)frame completionHandler:(void (^ _Nonnull)(BOOL result))completionHandler

Declaration
From
- (void)webView:(WKWebView *)webView runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSString *result))completionHandler
To
- (void)webView:(WKWebView * _Nonnull)webView runJavaScriptTextInputPanelWithPrompt:(NSString * _Nonnull)prompt defaultText:(NSString * _Nullable)defaultText initiatedByFrame:(WKFrameInfo * _Nonnull)frame completionHandler:(void (^ _Nonnull)(NSString * _Nullable result))completionHandler

WKUserContentController.h

Declaration
From
- (void)addScriptMessageHandler:(id<WKScriptMessageHandler>)scriptMessageHandler name:(NSString *)name
To
- (void)addScriptMessageHandler:(id<WKScriptMessageHandler> _Nonnull)scriptMessageHandler name:(NSString * _Nonnull)name

Declaration
From
- (void)addUserScript:(WKUserScript *)userScript
To
- (void)addUserScript:(WKUserScript * _Nonnull)userScript

Declaration
From
- (void)removeScriptMessageHandlerForName:(NSString *)name
To
- (void)removeScriptMessageHandlerForName:(NSString * _Nonnull)name

Declaration
From
@property(nonatomic, readonly, copy) NSArray *userScripts
To
@property(nonatomic, readonly, copy, nonnull) NSArray<WKUserScript *> *userScripts

WKUserScript.h

Declaration
From
- (instancetype)initWithSource:(NSString *)source injectionTime:(WKUserScriptInjectionTime)injectionTime forMainFrameOnly:(BOOL)forMainFrameOnly
To
- (instancetype _Nonnull)initWithSource:(NSString * _Nonnull)source injectionTime:(WKUserScriptInjectionTime)injectionTime forMainFrameOnly:(BOOL)forMainFrameOnly

Declaration
From
@property(nonatomic, readonly, copy) NSString *source
To
@property(nonatomic, readonly, copy, nonnull) NSString *source

WKWebsiteDataRecord.h (Added)

WKWebsiteDataStore.h (Added)

WKWebView.h

Declaration
From
@property(nonatomic, readonly, strong) WKBackForwardList *backForwardList
To
@property(nonatomic, readonly, strong, nonnull) WKBackForwardList *backForwardList

Declaration
From
@property(nonatomic, readonly, copy) WKWebViewConfiguration *configuration
To
@property(nonatomic, readonly, copy, nonnull) WKWebViewConfiguration *configuration

Declaration
From
- (void)evaluateJavaScript:(NSString *)javaScriptString completionHandler:(void (^)(id, NSError *))completionHandler
To
- (void)evaluateJavaScript:(NSString * _Nonnull)javaScriptString completionHandler:(void (^ _Nullable)(id _Nullable, NSError * _Nullable error))completionHandler

Declaration
From
- (WKNavigation *)goBack
To
- (WKNavigation * _Nullable)goBack

Declaration
From
- (IBAction)goBack:(id)sender
To
- (IBAction)goBack:(id _Nullable)sender

Declaration
From
- (WKNavigation *)goForward
To
- (WKNavigation * _Nullable)goForward

Declaration
From
- (IBAction)goForward:(id)sender
To
- (IBAction)goForward:(id _Nullable)sender

Declaration
From
- (WKNavigation *)goToBackForwardListItem:(WKBackForwardListItem *)item
To
- (WKNavigation * _Nullable)goToBackForwardListItem:(WKBackForwardListItem * _Nonnull)item

Declaration
From
- (instancetype)initWithFrame:(CGRect)frame configuration:(WKWebViewConfiguration *)configuration
To
- (instancetype _Nonnull)initWithFrame:(CGRect)frame configuration:(WKWebViewConfiguration * _Nonnull)configuration

Declaration
From
- (WKNavigation *)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL
To
- (WKNavigation * _Nullable)loadHTMLString:(NSString * _Nonnull)string baseURL:(NSURL * _Nullable)baseURL

Declaration
From
- (WKNavigation *)loadRequest:(NSURLRequest *)request
To
- (WKNavigation * _Nullable)loadRequest:(NSURLRequest * _Nonnull)request

Declaration
From
@property(nonatomic, weak) id<WKNavigationDelegate> navigationDelegate
To
@property(nonatomic, weak, nullable) id<WKNavigationDelegate> navigationDelegate

Declaration
From
- (WKNavigation *)reload
To
- (WKNavigation * _Nullable)reload

Declaration
From
- (IBAction)reload:(id)sender
To
- (IBAction)reload:(id _Nullable)sender

Declaration
From
- (WKNavigation *)reloadFromOrigin
To
- (WKNavigation * _Nullable)reloadFromOrigin

Declaration
From
- (IBAction)reloadFromOrigin:(id)sender
To
- (IBAction)reloadFromOrigin:(id _Nullable)sender

Declaration
From
- (IBAction)stopLoading:(id)sender
To
- (IBAction)stopLoading:(id _Nullable)sender

Declaration
From
@property(nonatomic, readonly, copy) NSString *title
To
@property(nonatomic, readonly, copy, nullable) NSString *title

Declaration
From
@property(nonatomic, weak) id<WKUIDelegate> UIDelegate
To
@property(nonatomic, weak, nullable) id<WKUIDelegate> UIDelegate

Modified WKWebView.URL
Declaration
From
@property(nonatomic, readonly, copy) NSURL *URL
To
@property(nonatomic, readonly, copy, nullable) NSURL *URL

WKWebViewConfiguration.h

Declaration
From
@property(nonatomic, strong) WKPreferences *preferences
To
@property(nonatomic, strong, nonnull) WKPreferences *preferences

Declaration
From
@property(nonatomic, strong) WKProcessPool *processPool
To
@property(nonatomic, strong, nonnull) WKProcessPool *processPool

Declaration
From
@property(nonatomic, strong) WKUserContentController *userContentController
To
@property(nonatomic, strong, nonnull) WKUserContentController *userContentController

WKWindowFeatures.h

Declaration
From
@property(nonatomic, readonly) NSNumber *allowsResizing
To
@property(nonatomic, readonly, nullable) NSNumber *allowsResizing

Declaration
From
@property(nonatomic, readonly) NSNumber *height
To
@property(nonatomic, readonly, nullable) NSNumber *height

Declaration
From
@property(nonatomic, readonly) NSNumber *menuBarVisibility
To
@property(nonatomic, readonly, nullable) NSNumber *menuBarVisibility

Declaration
From
@property(nonatomic, readonly) NSNumber *statusBarVisibility
To
@property(nonatomic, readonly, nullable) NSNumber *statusBarVisibility

Declaration
From
@property(nonatomic, readonly) NSNumber *toolbarsVisibility
To
@property(nonatomic, readonly, nullable) NSNumber *toolbarsVisibility

Declaration
From
@property(nonatomic, readonly) NSNumber *width
To
@property(nonatomic, readonly, nullable) NSNumber *width

Declaration
From
@property(nonatomic, readonly) NSNumber *x
To
@property(nonatomic, readonly, nullable) NSNumber *x

Declaration
From
@property(nonatomic, readonly) NSNumber *y
To
@property(nonatomic, readonly, nullable) NSNumber *y