Jump to content

Embedded Firefox in Cocoa app

7 posts in this topic

Recommended Posts

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?



Link to comment
Share on other sites

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.




(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
Share on other sites

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
Share on other sites


  • Create New...