PDA

View Full Version : Swizzle help




BollywooD
Sep 25, 2009, 01:43 AM
Would any OpenSource devs like to help get my project updated for Snow Leopard.


I am maintaining Safari Cookies (http://sweetpproductions.com/safaricookies/index.htm)
I have a couple poseAsClass methods that I need to replace with Swizzle methods, but are not quite sure where to start.
I poseAsClass for NSPreferences, and NSHTTPCookieStorage

I have updated the code to work as a SIMBL plugin.
and I would love to get this working in 64bit mode on Snow Leopard, but ive hit a stumbling block on Swizzle methods.....

If anyone can help, please email me at

sweetpproductions at gmail dot com

and I can send the latest source code.


many thanks



BollywooD
Sep 25, 2009, 08:12 PM
I figured it out myself!

so much more satisfying.....
:D

Briann
Oct 8, 2009, 04:16 PM
Can you post what you did ? I haven't solved it.

My swizzle works in 32 bits but not in 64 bits. I originally used categories, but plugin will fail to load.

10/7/09 5:13:11 PM Safari[1458] Error loading /Users/me/Library/Application Support/SIMBL/Plugins/MyPlugin.bundle/Contents/MacOS/MyPlugin: dlopen(/Users/me/Library/Application Support/SIMBL/Plugins/MyPlugin.bundle/Contents/MacOS/MyPlugin, 265): Symbol not found: _OBJC_CLASS_$_BrowserWindowController
Referenced from: /Users/me/Library/Application Support/SIMBL/Plugins/MyPlugin.bundle/Contents/MacOS/MyPlugin
Expected in: flat namespace
in /Users/me/Library/Application Support/SIMBL/Plugins/MyPlugin.bundle/Contents/MacOS/MyPlugin

Tried writing function in C. Added it with class_addMethod. But I crash inside the swizzle function doing method_exchangeImplementations. Again everything works in 32 bits.