JKDataHelper 0.1.27

JKDataHelper 0.1.27

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Apr 2022

Maintained by jack.



  • By
  • xindizhiyin2014

JKDataHelper

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

JKDataHelper is available through CocoaPods. To install it, simply add the following line to your Podfile:

OC:

pod "JKDataHelper"

Swift:

pod "JKDataHelper_Swift"

QQ contact group

Author

xindizhiyin2014, [email protected]

License

JKDataHelper is available under the MIT license. See the LICENSE file for more info.

##关于JKDataHelper JKDataHeper 最初是用来解决降低crash率,处理接口返回不稳定的一个工具,主要目的是为了在线上环境进行错误降级。之所以没有使用使用消息转发,拦截的技术主要是为了降低影响范围,将这个工具的影响范围只局限于自己的实际业务代码。另外参考<font/ color = red>测试左移的原则,在内部实现上使用了很多的断言,能够在debug环境下,将问题及早暴露出来。如果公司有条件的话,还可以结合日志系统,将线上的错误信息上报,方便对问题进行分析归因。OC版本和swift版本都进行了充分的单元测试,大家对单元测试感兴趣的话,可以看看。希望多多指教

##实现历程博客 《iOS容错利器之JKDataHelper》

《iOS容错利器之JKDataHelper(二)》

《iOS中的crash防护(一)unrecognized selector sent to instance》

《iOS中的crash防护(二)KVC造成的crash》

《iOS中的crash防护(三)KVO造成的crash》

《iOS中的crash防护(四)NSNotificationCenter指定线程接收通知》