<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div apple-content-edited="true" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I tried this in a testing project, producing an app with a single window with a webView in it, and it doesn’t work. (setting the env variable in the scheme)</div></div></div></div><div apple-content-edited="true" class=""><br class=""></div>What’s even worse, I actually need to link to the custom WebKit.framework from a dynamic library, not an executable and I guess even if this works for executable, it will not work for a dynamic library project? (It’s a plugin project and an executable I have no control over will load it)</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Nov 29, 2015, at 5:39 AM, Dan Bernstein &lt;<a href="mailto:mitz@apple.com" class="">mitz@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Nov 11, 2015, at 2:06 AM, Nikolay Tsenkov &lt;<a href="mailto:nikolay@tsenkov.net" class="">nikolay@tsenkov.net</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello,<div class=""><br class=""></div><div class="">First of all, thanks for the awesome OSS software that WebKit is!</div><div class=""><br class=""></div><div class="">I need some help with linking to a fresh build of WebKit.framework on OS X:</div><div class="">&nbsp;- I am building a modified version of WebKit.framework (my changes are in WebCore and WebKit projects) on OS X 10.11, but I am not able to use that framework in another project - somehow the project always resorts to the default system WebKit.framework.</div><div class=""><br class=""></div><div class=""><div class="">Setup:</div><div class="">&nbsp;- OS X 10.11.0 (just saw there is 10.11.1 available, but haven’t installed it yet)</div><div class="">&nbsp;- System Integrity Protection (SIP)&nbsp;<b class="">disabled</b>&nbsp;(I couldn’t build when ON)</div></div><div class=""><br class=""></div><div class="">Changes:</div><div class="">&nbsp;- (Gist) I am making a version of the WebView (the legacy one, the single-process model) which can be used in DAW plugin, exposing API for rendering the audio, settings the sampling rate, not rendering to the audio hardware directly, etc.</div><div class="">&nbsp;- (Specific)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp;- (WebCore) -Replaced- <b class="">AudioDestinationMac</b> with AudioDestinationDaw;</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp;- (WebCore) -Add- <b class="">DawStateSingleton</b> which exposes the custom destination node to the WebView;</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>&nbsp;- (WebKit) -Modify- <b class="">WebView</b> to include a new constructor and couple of new methods:</div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">- (<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">instancetype</span>)initWithFrame:(<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">NSRect</span>)frame samplingRate:(<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">float</span>)samplingRate frameName:(<span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">NSString</span> *)frameName groupName:(<span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">NSString</span> *)groupName;</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">- (<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">void</span>)setDawSamplingRate:(<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">float</span>)samplingRate;</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">- (<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">void</span>)renderAudio:(<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">int</span>) numberOfFrames bufferList:(<span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">AudioBufferList</span>*) bufferList;</div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><div style="font-family: Helvetica; font-size: 12px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px;" class="">In a new project, I am trying to use the new WebView. If I don’t link to WebKit.framework, of course, the build fails because it can’t find the framework. But if I link to the custom build (the WebView header is the new one, I’ve checked) in run time the app breaks with “<b style="font-family: Menlo; font-size: 11px;" class="">-[WebView initWithFrame:samplingRate:frameName:groupName:]: unrecognized selector sent to instance</b>” from which I infer it’s using the system version of the WebView.</div><div style="font-family: Helvetica; font-size: 12px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px;" class="">I’ve tried to inspect how the MiniBrowser project correctly is referring to the new build, but I don’t see how the linking is happening…</div><div style="font-family: Helvetica; font-size: 12px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px;" class="">Could someone help me out with this?</div><div style="font-family: Helvetica; font-size: 12px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px;" class="">Please, accept my apologies, if there is something simple that I’ve missed.</div></div></div></div></blockquote><div class=""><br class=""></div><div class="">The most common way to get your executable to pick up your custom built WebKit instead of the system WebKit is to have your executable run with the DYLD_FRAMEWORK_PATH environment variable set to the the path where your built frameworks are. The run-webkit-app script in&nbsp;Tools/Scripts does this. Or if you’re running your up from within Xcode you can set the environment variable for the Run action in the scheme editor. There are a few other ways to get the environment variable set, and some other ways to get your program to pick up your framework, but I think the above should give you a good start.</div></div></div></div></blockquote></div><br class=""></body></html>