Zaiden Posted August 16, 2008 Share Posted August 16, 2008 Hi! I've recently developed a fullscreen Cocoa app that has an embedded browser using WebView. The problem I have is that my client told me that the browser that is shown has to be firefox-compatible. So, my question is: how do I include a firefox control (or something like that) in my Cocoa app, the way I did with WebView? Thanks! Link to comment https://www.insanelymac.com/forum/topic/121356-embedded-firefox-in-cocoa-app/ Share on other sites More sharing options...
alloutmacstoday Posted August 16, 2008 Share Posted August 16, 2008 [<your webView> setCustomUserAgent:@"Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7a) Gecko/20040614 Firefox/0.9.0+" or w/e the new firefox user agent is Link to comment https://www.insanelymac.com/forum/topic/121356-embedded-firefox-in-cocoa-app/#findComment-858809 Share on other sites More sharing options...
Zaiden Posted August 16, 2008 Author Share Posted August 16, 2008 Correct me if i'm wrong... but i think the only thing that instruction would do is to make the website belive i'm using firefox. The problem I have is that I must use the firefox engine. Link to comment https://www.insanelymac.com/forum/topic/121356-embedded-firefox-in-cocoa-app/#findComment-858877 Share on other sites More sharing options...
alloutmacstoday Posted August 16, 2008 Share Posted August 16, 2008 Ohhhh! Whoops! Yeah, pretty much impossible... Link to comment https://www.insanelymac.com/forum/topic/121356-embedded-firefox-in-cocoa-app/#findComment-858899 Share on other sites More sharing options...
bofors Posted August 16, 2008 Share Posted August 16, 2008 This actually doesn't sound that hard to do, because it looks like others are doing it (apparently "Second Life" does) but I have yet to look at the Firefox code. I think there is two ways to approach this: (1) Try to use the Firefox source code as a framework that you link to and either access or create your own NSFireFoxWebView class, which of course would use the Gecko engine instead of WebKit. or (2) Launch Firefox invisibly in the background and Distributed Objects to take the Firefox NSView, put it into your application and sync it with the Firefox app running in the background. I would post this question on Apple's "Cocoa-Dev", "Webkitsdk-dev" & "Web-dev" lists or better yet just ask the Cocoa Firefox developers what they recommend: http://lists.apple.com/mailman/listinfo Link to comment https://www.insanelymac.com/forum/topic/121356-embedded-firefox-in-cocoa-app/#findComment-858916 Share on other sites More sharing options...
Zaiden Posted August 16, 2008 Author Share Posted August 16, 2008 I've found something that might work here: http://www.artlogic.com/resources/embedding-mozilla/ This project is not approved yet, but I think it won't be too hard to get it done... If it gets approved, I'll continue researching. Thanks! Link to comment https://www.insanelymac.com/forum/topic/121356-embedded-firefox-in-cocoa-app/#findComment-858922 Share on other sites More sharing options...
bofors Posted August 17, 2008 Share Posted August 17, 2008 I've found something that might work here: http://www.artlogic.com/resources/embedding-mozilla/ This project is not approved yet, but I think it won't be too hard to get it done... If it gets approved, I'll continue researching. That embedding mozilla link looks good. This is approach (1) that outlined above, where you would be using their CHBrowerView (which I called NSFireFoxWebView). Those instruction are over five years old, so you may have to tweak a couple of things to make it work 10.5 and you might want to eventually use up to date Firefox source code. But I would start by trying to make it work by following those instructions and using the old code. Link to comment https://www.insanelymac.com/forum/topic/121356-embedded-firefox-in-cocoa-app/#findComment-858961 Share on other sites More sharing options...
Recommended Posts