tags:

views:

2369

answers:

5

I want to develop a Safari plugin using xCode, and I want to access bookmarks. What API should I use?

And, since I'm asking, are there any tutorials out there for plugin dev under Safari?

A: 

There is no documented or Apple-supported way to create plug-ins for Safari.

That hasn't stopped many people creating add-ons, as you can see by browsing through Pimp My Safari.

Many of the plug-ins use SIMBL to load themselves into Safari, after which you can mess around with Safari's insides to do whatever you want. See the Armchair Guide To Cocoa Reverse Engineering.

One thing is for sure - it won't be a walk in the park!

Good luck =]

Nick Dowell
Now I want to make a safari plugin with simbl , and I have read the Armchair Guide To Cocoa Reverse Engineering. but when implement the method - (void)load; how to use the plugin to get the safari DOM object ,just like PIC or Flash URL ? Thank you very much !
jin
The first line of this is wrong. http://developer.apple.com/mac/library/documentation/InternetWeb/Conceptual/WebKit_PluginProgTopic/WebKitPluginTopics.html
dlamblin
It's not that simple; there are 2 distinct types of browser plug-in...1. The kind of plug-in that can be embedded in a web page (e.g. flash) - this is, as you say, supported and documented.2. The equivalent of firefox extensions / 3rd party toolbars for ie. This is what the original question seems to be about, since access to bookmarks was mentioned. This kind of plugin is not officially supported or documented, and requires a bit of reverse engineering. An example of this would be Inquisitor - http://www.inquisitorx.com
Nick Dowell
+3  A: 

Safari plugins are well-supported, both for the Netscape-style NSAPI and the 'native' Cocoa plugins. There are dozens, if not hundreds, of official Safari plugins.

However, not everything you might want to do is possible through plugins. I'm not clear if accessing bookmarks is possible.

There are lots of other docs on Safari plugins at the Safari Dev Center and Reference Library, including WebKit Plug-In Programming Topics.

Jasonian
A: 

Since you want to write a plugin for Safari, you might also be interested in reading about developing plugins for webkit.

dlamblin
+1  A: 

Safari 5 allows to create extensions in a similar way of what Google Chrome allows. See Safari Extensions Development Guide: About Safari Extensions.

kiamlaluno
A: 

I searched the Safari Extension Development guide, and I couldnot find any descriptions related with the bookmark operation. So it is bad for us to create some extension to operate the bookmark.

Anyone knows how? Thank you!

mxi1