Skip to content

Instantly share code, notes, and snippets.

@leptos-null
Last active April 4, 2023 18:48
Show Gist options
  • Save leptos-null/43298878fd4da5c07084022e423feb92 to your computer and use it in GitHub Desktop.
Save leptos-null/43298878fd4da5c07084022e423feb92 to your computer and use it in GitHub Desktop.
Using cycript on macOS Mojave

Cycript on Mojave

Cycript is a tool I find very helpful. It's an effective REPL for Objective-C. When I updated to macOS Mojave, I found that cycript no longer worked because it was linked against an old version of Ruby. After attempting to compile from source, I tried another solution. install_name_tool is an open source tool for modifying the names of linked shared libraries in a Mach-O.

Solution

$ install_name_tool -change /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/libruby.dylib Cycript.lib/cycript-apl
$ install_name_tool -change /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/libruby.dylib Cycript.lib/libcycript.dylib
@kuustudio
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment