OCRunner icon indicating copy to clipboard operation
OCRunner copied to clipboard

Execute Objective-C code as script. AST Interpreter. iOS hotfix SDK.

Results 8 OCRunner issues
Sort by recently updated
recently updated
newest added

OCRunnerArm64 Version: 1.2.0 description: 执行下列代码: ` int i1 = 1; int i2 = 2; NSLog(@"%d,%d,%@",i1,i2,@"1234"); ` 会触发崩溃,疑似转为long型,即可成功,是否与内存分配不足有关? example: xxxxx ![image](https://user-images.githubusercontent.com/7877113/173982236-c3529185-95be-412d-aa70-b1ef72e932e4.png)

![image](https://user-images.githubusercontent.com/11921153/157822083-36c68345-be07-4e77-903e-f435908eddef.png)

OCRunner version: xxxxx description: xxxxxx example: xxxxx OCRunner 版本号: xxx 问题描述: xxx bug 示例代码: xxx

OCRunner 版本号: 1.2.0 OCRunner 目前几处不兼容的地方 1. long double rotate = 0.0; 不支long double 2. 不支持if (`@available`(iOS 10.0, *)) 写法 3. 不支持`@synthesize` 写法; 4. 带两个引号的写法不支持 包括属性和实例变量等。`@property` (nonatomic, assign) NSInteger selectIndex;; 5....

非常佩服作者的工作,为了方便自己学习和别人学习,将作者在老司机周报发的文章做了下集合 1. [OCRunner 第零篇:从零教你写一个 iOS 热修复框架](https://mp.weixin.qq.com/s?__biz=MzI2NTAxMzg2MA==&mid=2247488962&idx=1&sn=cdb1cd8a8cd788b15fbc0dbc0ecfccf1&scene=21#wechat_redirect) 2. [OCRunner 第一篇:实现一个简单版热修复功能](https://mp.weixin.qq.com/s?__biz=MzI2NTAxMzg2MA==&mid=2247489005&idx=1&sn=a3c2cab40bd039b92b8894712767f169&scene=21#wechat_redirect) 3. [OCRunner 第二篇:二进制补丁文件的实现](https://mp.weixin.qq.com/s/uDcg8wHbl3K0QbU9jOzOvQ) 4. [OCRunner 第三篇:代码生成](https://mp.weixin.qq.com/s/y-cQDwiqt1cOv_sxca5fUQ)

### 背景 目前 OCRunner 在补丁方法的桥接实现 [methodIMP](https://github.com/SilverFruity/OCRunner/blob/da0f36fbf957169a302ade825210ee2fa3937c22/OCRunner/ORCoreImp/ORCoreImp.m#L27-L89) 中,会通过: ``` NSMethodSignature *sig = [target methodSignatureForSelector:sel]; ``` 来获取参数和返回值的类型信息,然后用 `sig` 去构造 `MFValue`。 在没有其它框架干扰的情况下,这个做法是可以工作的。但当项目中引入 **Aspects** 或其它基于 **method swizzling / 动态子类** 的框架时,这个假设就不再成立: - Aspects 会把 [原方法换成...