title: Setting a custom WKWebViewConfiguration for WKWebView generated from Nib or Storyboard
body: <p>I would like to use a custom URL Scheme for my app, but having trouble getting the URL scheme configured.</p>
  <p>When I create a WKWebView object programmatically (with initWithFrame:...) I am able to specify my own WKWebViewConfiguration object, but when WKWebView in Nib/Storyboard is created automatically (via initWithCoder:) I am not able to specify a configuration. The configuration is read-only so I can't change it after the fact. I really would prefer to avoid creating the WkWebView programmatically if possible.</p>
  <p><em>Note: there is an existing question related to this (<a href="https://stackoverflow.com/questions/48451264/set-wkwebviewconfiguration-on-wkwebview-from-nib-or-storyboard">here</a>), but the answer that was accepted there only solves a subset of the actual program (it involves adding a user script instead of an configuration object, so a custom URL scheme handler cannot be added). Other answers there either do not help with this issue, so I have opened another question.</em></p>
  <p>Update: I wanted to give some clarification here based on a comment I received.</p>
  <p>WKWebViewConfiguration is a &quot;copy&quot; property, as defined here:</p>
  <p>*@property (nonatomic, readonly, copy) WKWebViewConfiguration <em>configuration;</em></p>
  <p>I tried to print it out multiple times and I see it is changing:</p>
  <blockquote>
  <p>2019-05-30 15:02:25.724312-0700 MyTest [916:72204] configuration = 0x101b06b50</p>
  <p>2019-05-30 15:02:25.724499-0700 MyTest [916:72204] configuration = 0x101a37110</p>
  </blockquote>
  <p>Using LLDB gives the same result (different each time):</p>
  <blockquote>
  <p>(lldb) print [self configuration] (WKWebViewConfiguration *) $17 =
  0x0000000102e0b990</p>
  <p>(lldb) print [self configuration]
  (WKWebViewConfiguration *) $18 = 0x0000000102f3bd40</p>
  </blockquote>