iOS热修复-JSPatch集成

jspatch开源库 github 地址:https://github.com/bang590/JSPatch

导入xcode工程,这里使用到了JavaScriptcore核心库,所以还需要在General的Linde Framework and Libraries添加JavaScriptcore.framework

js文件具体可从服务端动态下载demo.js

有js文件之后执行下面代码

[JPEngine startEngine];
NSString *sourcePath = [[NSBundle mainBundle] pathForResource:@"demo" ofType:@"js"];
NSString *script = [NSString stringWithContentsOfFile:sourcePath encoding:NSUTF8StringEncoding error:nil];
[JPEngine evaluateScript:script];```


集成完毕,具体后续写法  有什么问题的可以留言  一起探讨

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容