Swizzle help

Discussion in 'Mac Programming' started by BollywooD, Sep 24, 2009.

  1. BollywooD macrumors 6502

    BollywooD

    Joined:
    Apr 27, 2005
    Location:
    Surfers Paradise
    #1
    Would any OpenSource devs like to help get my project updated for Snow Leopard.


    I am maintaining Safari Cookies
    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
     
  2. BollywooD thread starter macrumors 6502

    BollywooD

    Joined:
    Apr 27, 2005
    Location:
    Surfers Paradise
    #2
    I figured it out myself!

    so much more satisfying.....
    :D
     
  3. Briann macrumors newbie

    Joined:
    Oct 8, 2009
    #3
    Swizzle help

    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.
     

Share This Page