美文网首页
查看runtime文件

查看runtime文件

作者: iOS_陈楠 | 来源:发表于2018-05-28 10:34 被阅读15次
clang -rewrite-objc main.m  报错:
    
****fatal error: ****'UIKit/UIKit.h' file not found**

解决:

  clang -x objective-c -rewrite-objc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk xxxxx.m

简便做法,配置 alias

vim ~/.bash_profile
alias runtimeoc='clang -x objective-c -rewrite-objc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk'
保存退出
执行source ~/.bash_profile(这句一定要执行,执行才会生效)

zsh配置,同上

open ~/.zshrc
alias runtimeoc='clang -x objective-c -rewrite-objc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk'
保存退出
执行source ~/.zshrc (这句一定要执行,执行才会生效)

执行完之后,会在目录下生成一个 xxx.cpp文件,打开查看就是runtime运行时代码。

相关文章

  • 查看runtime文件

    解决: 简便做法,配置 alias zsh配置,同上 执行完之后,会在目录下生成一个 xxx.cpp文件,打开查看...

  • 谈谈对runtime的看法

    对于runtime机制,在网上找到的资料大概就是怎么去用这些东西,以及查看runtime.h头文件中的实现,当然这...

  • category原理与底层结构

    原理 通过runtime动态将分类的方法合并到类对象,元类对象中。 底层加载 查看objc-os.mm文件(查看运...

  • iOS 利用Runtime.h 查看 对象属性列表

    1、导入头文件 #import 2、将以下代码中的 XXX 替换为你想查看属性...

  • 小程序 使用 es7 中 async await 方法教程

    需要在lib文件中创建runtime文件夹里面创建runtime.js 在runtime.js复制以下代码之后 还...

  • objective-C之runtime第一篇

    网上查看了一些runtime的资料, 关于runtime是什么?这里想用自己的理解,简单点说:runtime是一套...

  • Runtime深入理解

    runtime 深入理解 常见的图标 runtime 相关的文件 文件内容介绍 每个文件主要都写这三种信息.结构体...

  • linux应急响应常用命令

    查看用户信息文件 查看影子文件 查看历史命令文件 查看端口 查看进程 定时任务查看 查找异常文件 检查日志文件 打...

  • runtime基本用法

    先导入 runtime 头文件。1、用 runtime 改变变量值; 2、使用 runtime 交换方法; 3、使...

  • OC: UITextView + MaxMethod

    .h文件 .m文件 运用runtime给分类添加属性

网友评论

      本文标题:查看runtime文件

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