WKWebsiteDataStore

Hi, I'm playing around with WKWebsiteDataStore, and throwing an exception each time I attempt to ask for the default store using:

[WKWebsiteDataStore WKWebsiteDataStore];


Stack Trace:

2015-06-10 14:26:35.264 iOS9Sample[34994:293382] +[WKWebsiteDataStore WKWebsiteDataStore]: unrecognized selector sent to class 0x2447458
2015-06-10 14:26:35.266 iOS9Sample[34994:293382] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[WKWebsiteDataStore WKWebsiteDataStore]: unrecognized selector sent to class 0x2447458'
*** First throw call stack:
(
  0   CoreFoundation                      0x00aa4c54 __exceptionPreprocess + 180
  1   libobjc.A.dylib                     0x00564e26 objc_exception_throw + 50
  2   CoreFoundation                      0x00aadaa3 +[NSObject(NSObject) doesNotRecognizeSelector:] + 275
  3   CoreFoundation                      0x009eb32d ___forwarding___ + 1037
  4   CoreFoundation                      0x009eaefe _CF_forwarding_prep_0 + 14
  5   iOS9Sample                          0x0009aee1 -[ViewController webView:didFinishNavigation:] + 113
  6   WebKit                              0x021bb1fd _ZN6WebKit15NavigationState16NavigationClient19didFinishNavigationERNS_12WebPageProxyEPN3API10NavigationEPNS4_6ObjectE + 91
  7   WebKit                              0x022f74d3 _ZN6WebKit12WebPageProxy21didFinishLoadForFrameEyyRKNS_8UserDataE + 269
  8   WebKit                              0x02318eda _ZN3IPC13handleMessageIN8Messages12WebPageProxy21DidFinishLoadForFrameEN6WebKit12WebPageProxyEMS5_FvyyRKNS4_8UserDataEEEEvRNS_14MessageDecoderEPT0_T1_ + 113
  9   WebKit                              0x023131ba _ZN6WebKit12WebPageProxy17didReceiveMessageERN3IPC10ConnectionERNS1_14MessageDecoderE + 5012
  10  WebKit                              0x023167be _ZThn12_N6WebKit12WebPageProxy17didReceiveMessageERN3IPC10ConnectionERNS1_14MessageDecoderE + 34
  11  WebKit                              0x021b8049 _ZN3IPC18MessageReceiverMap15dispatchMessageERNS_10ConnectionERNS_14MessageDecoderE + 121
  12  WebKit                              0x0217246a _ZN6WebKit17ChildProcessProxy15dispatchMessageERN3IPC10ConnectionERNS1_14MessageDecoderE + 34
  13  WebKit                              0x02352e23 _ZN6WebKit15WebProcessProxy17didReceiveMessageERN3IPC10ConnectionERNS1_14MessageDecoderE + 43
  14  WebKit                              0x02352e9e _ZThn4_N6WebKit15WebProcessProxy17didReceiveMessageERN3IPC10ConnectionERNS1_14MessageDecoderE + 34
  15  WebKit                              0x02173635 _ZN3IPC10Connection15dispatchMessageENSt3__110unique_ptrINS_14MessageDecoderENS1_14default_deleteIS3_EEEE + 115
  16  WebKit                              0x0217573d _ZN3IPC10Connection18dispatchOneMessageEv + 97
  17  WebKit                              0x02176456 _ZNSt3__110__function6__funcIZN3IPC10Connection22enqueueIncomingMessageENS_10unique_ptrINS2_14MessageDecoderENS_14default_deleteIS5_EEEEE3$_9NS_9allocatorIS9_EEFvvEEclEv + 20
  18  JavaScriptCore                      0x09e4619b _ZN3***7RunLoop11performWorkEv + 379
  19  JavaScriptCore                      0x09e4676e _ZN3***7RunLoop11performWorkEPv + 30
  20  CoreFoundation                      0x009bdc7f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
  21  CoreFoundation                      0x009b376b __CFRunLoopDoSources0 + 523
  22  CoreFoundation                      0x009b2b88 __CFRunLoopRun + 1032
  23  CoreFoundation                      0x009b24c6 CFRunLoopRunSpecific + 470
  24  CoreFoundation                      0x009b22db CFRunLoopRunInMode + 123
  25  GraphicsServices                    0x0452675f GraphicsServices + 55135
  26  GraphicsServices                    0x0452659c GraphicsServices + 54684
  27  UIKit                               0x00e3130f UIApplicationMain + 160
  28  iOS9Sample                          0x0009b72a main + 138
  29  libdyld.dylib                       0x03517b11 libdyld.dylib + 6929
  30  ???                                 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException


The nonPersistentDataStore is working fine, just wondering why I'm seeing this issue on the default store?


Also, the documentation seems to be missing on the WebKit Framework Reference pages:


https://developer.apple.com/library/prerelease/ios/documentation/Cocoa/Reference/WebKit/ObjC_classic/index.html#//apple_ref/doc/uid/TP30000745

WKWebsiteDataStore is the class name, not a method name. The class method that gets you the default data store is +defaultDataStore. You can also use +nonPersistentDataStore to get a new non-persistent data store.

WKWebsiteDataStore
 
 
Q