CC的博客

  • 首页
  • iOS
  • Android
  • React-Native
  • 读书杂谈
  • About
CC
记录美好生活
iOS

动态调试-debugserver+LLDB

动态调试 debugserver是Xcode自带的工具,默认放在/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/14.4/DeveloperDiskImage.dmg/usr/bin/debugserver 通过Xcode连接真机后,自动拷贝debugserver到越狱手机的/Developer/usr/bin/debugserver(此处是只读权限),一般情况下只能调试通过Xcode安装的Ap…

2021/06/19 阅读全文
iOS

dyld_shared_cache动态库共享缓存

背景 iOS & macOS 作为操作系统,其中内置了许多系统库(Library)。dyld_shared_cache,即动态库共享缓存。自 iOS 3.1 后,所有系统动态库被集合成一个 dyld_shared_cache 文件,以提升性能。 存放路径 为了研究dyld_shared_cache,首先要找到其存在的路径。可以在 Apple 开源的 https://opensource.apple.com/tarballs/dyld/ 中的dyld_cache_format.h文件中发现,其分别存放在 ma…

2021/06/19 阅读全文
iOS

Mach-O文件初识

Mach-O是Mach object的缩写,是Mac/iOS上用于存储程序、库的标准格式 在xnu内核源码中,查看Mach-O类型的部分定义如下(在fat.h和loader.h文件中有全部的类型定义) #define MH_OBJECT 0x1 /* relocatable object file */ #define MH_EXECUTE 0x2 /* demand paged executable file */ #define MH_FVMLIB 0x3 /* fixed VM shared library …

2021/06/07 阅读全文
iOS

效率工具-usbmuxd

背景 ssh服务默认端口为22,ssh连接手机默认通过WiFi导致速度比较慢 ssh root@手机局域网IP usbmuxd简介 usbmuxd可以做端口映射的工作,将本地端口映射到手机ssh服务的22端口,手机连接上USB加快访问速度。 usbmuxd官方地址为:http://cgit.sukimashita.com/usbmuxd.git。 不过这个项目还需要编译后才能用,太麻烦了。官方还有一个编译好的项目libusbmuxdhttps://cgit.sukimashita.com/libusbmuxd.gi…

2021/06/05 阅读全文
iOS

效率工具-Reveal

简介 Reveal是一款调试程序UI界面的神器。 Reveal官网:https://revealapp.com 正向开发中的使用步骤 打开Reveal,找到Help-->Show Reveal Library in Finder--> iOS Library拷贝RevealServer.framework到项目根目录下 项目设置Build Settings--> Framework Search Paths-->Debug模式下添加$(inherited) $(SRCROOT); Build Settings-->…

2021/06/05 阅读全文
iOS

探究Category-02添加成员变量

背景 定义一个Student类,使用@property声明一个score属性,编译器会自动帮我们生成_score成员变量和对应的setter&getter方法声明和实现。 @interface Student //@property (nonatomic,assign) int score; { int _score; } -(void)setScore:(int)score; -(int)score; @end @implementation Student - (void)setScore:(int)s…

2021/06/05 阅读全文
iOS

探索Category-01本质

简介 category是Objective-C 2.0之后添加的语言特性,category的主要作用是为已经存在的类添加方法。除此之外,apple还推荐了category的另外两个使用场景 可以把类的实现分开在几个不同的文件里面。这样做有几个显而易见的好处: - 减少单个文件的体积 - 把不同的功能组织到不同的category里 - 由多个开发者共同完成一个类 - 按需加载想要的category等 2. 声明私有方法 category定义 category定义了category的行为,可以添加实例方法、类方法、实现…

2021/06/05 阅读全文
搜一搜
最新 热点 随机
最新 热点 随机
transformer-task1 iOS中常见线程同步方案 动态调试-debugserver+LLDB dyld_shared_cache动态库共享缓存 Mach-O文件初识 效率工具-usbmuxd
探索Category-01本质 Hello category添加成员变量 KVC本质探索 探究Category-02添加成员变量 category探索
归档
  • 2025 年 2 月
  • 2021 年 7 月
  • 2021 年 6 月
  • 2021 年 3 月
  • 2020 年 11 月
  • 2020 年 10 月
  • 2020 年 8 月
  • 2020 年 1 月

COPYRIGHT © 2020 CC的博客. ALL RIGHTS RESERVED.

Theme Kratos

豫ICP备2023032048号