class-dump安装

作者: 7分醉 | 来源:发表于2016-05-21 13:58 被阅读1179次

    下载

    下载地址:
    http://stevenygard.com/projects/class-dump
    下载class-dump-3.5.dmg后双击打开

    Paste_Image.png

    移动到/usr/bin下

    这时你会发现不论是复制还是移动都不行,如下:

    MacBook-Air:/ Mark$ sudo cp class-dump /usr/bin
    Password:
    cp: /usr/bin/class-dump: Operation not permitted
    MacBook-Air:/ Mark$ sudo mv class-dump /usr/bin
    mv: rename class-dump to /usr/bin/class-dump: Operation not permitted
    

    解决方法如下:
    1.重启mac
    2.在启动时按下cmd+r直到出现苹果logo
    3.这时有可能要你选择语言
    4.选择工具(Utilities)打开终端(terminal)执行如下命令
    csrutil disable
    reboot
    4.在次启动后重新执行移动命令~OK

    更改权限

    chmod 777 /usr/bin/class-bump

    测试

    执行class-bump

    isoftstonedeMacBook-Pro:~ isoftstone$ cd /usr/bin/
    isoftstonedeMacBook-Pro:bin isoftstone$ class-dump 
    class-dump 3.5 (64 bit)
    Usage: class-dump [options] <mach-o-file>
    
      where options are:
            -a             show instance variable offsets
            -A             show implementation addresses
            --arch <arch>  choose a specific architecture from a universal binary (ppc, ppc64, i386, x86_64, armv6, armv7, armv7s, arm64)
            -C <regex>     only display classes matching regular expression
            -f <str>       find string in method name
            -H             generate header files in current directory, or directory specified with -o
            -I             sort classes, categories, and protocols by inheritance (overrides -s)
            -o <dir>       output directory used for -H
            -r             recursively expand frameworks and fixed VM shared libraries
            -s             sort classes and categories by name
            -S             sort methods by name
            -t             suppress header in output, for testing
            --list-arches  list the arches in the file, then exit
            --sdk-ios      specify iOS SDK version (will look in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS<version>.sdk
            --sdk-mac      specify Mac OS X version (will look in /Developer/SDKs/MacOSX<version>.sdk
            --sdk-root     specify the full SDK root path (or use --sdk-ios/--sdk-mac for a shortcut)
    isoftstonedeMacBook-Pro:bin isoftstone$ 
    

    安装成功

    相关文章

      网友评论

      • wokenshin:我当前的系统是mac10.13.1 还是没有成功呢
      • 旅店老板:首先感谢作者的方法解决了我的问题。
        文中
        “更改权限
        chmod 777 /usr/bin/class-bump
        测试
        执行class-bump”
        这里的bump拼写错了。。:sweat:

      本文标题:class-dump安装

      本文链接:https://www.haomeiwen.com/subject/rbxorttx.html