Skip to content

Commit f45516e

Browse files
committed
Release 0.2.13
1 parent dec88eb commit f45516e

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

JJException.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
#
1717

1818
s.name = "JJException"
19-
s.version = "0.2.12"
19+
s.version = "0.2.13"
2020
s.summary = "Handle the objective-c crash exception."
2121

2222
# This description is used to generate tags and improve search results.

README.md

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ Common problems will not crash by the JJException,Hook the Unrecognized Selector
2020

2121
- [x] KVO(忘记移除keypath导致闪退)
2222

23-
- [x] Zombie Pointer(野指针)
24-
2523
- [x] NSTimer(忘记移除导致内存泄漏)
2624

2725
- [x] NSNotification(忘记移除导致异常)
@@ -54,20 +52,18 @@ __手动导入代码__
5452

5553
## 如何使用
5654

57-
* 所有异常的分类,根据自身需要,自由组合__如果没用到Zombie功能,建议使用JJExceptionGuardAllExceptZombie__
55+
* 所有异常的分类,根据自身需要,自由组合
5856
```objc
5957
typedef NS_OPTIONS(NSInteger,JJExceptionGuardCategory){
6058
JJExceptionGuardNone = 0,
6159
JJExceptionGuardUnrecognizedSelector = 1 << 1,
6260
JJExceptionGuardDictionaryContainer = 1 << 2,
6361
JJExceptionGuardArrayContainer = 1 << 3,
64-
JJExceptionGuardZombie = 1 << 4,
65-
JJExceptionGuardKVOCrash = 1 << 5,
66-
JJExceptionGuardNSTimer = 1 << 6,
67-
JJExceptionGuardNSNotificationCenter = 1 << 7,
68-
JJExceptionGuardNSStringContainer = 1 << 8,
69-
JJExceptionGuardAllExceptZombie = JJExceptionGuardUnrecognizedSelector | JJExceptionGuardDictionaryContainer | JJExceptionGuardArrayContainer | JJExceptionGuardKVOCrash | JJExceptionGuardNSTimer | JJExceptionGuardNSNotificationCenter | JJExceptionGuardNSStringContainer,
70-
JJExceptionGuardAll = JJExceptionGuardUnrecognizedSelector | JJExceptionGuardDictionaryContainer | JJExceptionGuardArrayContainer | JJExceptionGuardZombie | JJExceptionGuardKVOCrash | JJExceptionGuardNSTimer | JJExceptionGuardNSNotificationCenter | JJExceptionGuardNSStringContainer,
62+
JJExceptionGuardKVOCrash = 1 << 4,
63+
JJExceptionGuardNSTimer = 1 << 5,
64+
JJExceptionGuardNSNotificationCenter = 1 << 6,
65+
JJExceptionGuardNSStringContainer = 1 << 7,
66+
JJExceptionGuardAll = JJExceptionGuardUnrecognizedSelector | JJExceptionGuardDictionaryContainer | JJExceptionGuardArrayContainer | JJExceptionGuardKVOCrash | JJExceptionGuardNSTimer | JJExceptionGuardNSNotificationCenter | JJExceptionGuardNSStringContainer,
7167
};
7268
```
7369
@@ -83,11 +79,6 @@ typedef NS_OPTIONS(NSInteger,JJExceptionGuardCategory){
8379
JJException.exceptionWhenTerminate = YES;
8480
```
8581

86-
* Zombie使用黑名单机制,只有加入这个名单的才有作用,示例如下:
87-
```objc
88-
[JJException addZombieObjectArray:@[TestZombie.class]];
89-
```
90-
9182
* 如果需要记录日志,只需要实现`JJExceptionHandle`协议,并注册:
9283
```objc
9384
@interface ViewController ()<JJExceptionHandle>
@@ -135,7 +126,6 @@ Bugly可以帮我们解决重复信息和CallStack信息,以及状态维护。
135126
* NSNotification
136127
* NSString,NSMutableString,NSAttributedString,NSMutableAttributedString(__注意不是String__)
137128
* NSArray,NSMutableArray,NSDictonary,NSMutableDictionary(__注意不是Array__)
138-
* Zombie Pointer
139129
140130
这里贴下Swift的初始化代码示例:
141131
```swift
@@ -145,7 +135,7 @@ func application(_ application: UIApplication, didFinishLaunchingWithOptions lau
145135
}
146136
147137
func registerJJException(){
148-
JJException.configExceptionCategory(.allExceptZombie)
138+
JJException.configExceptionCategory(.all)
149139
JJException.startGuard()
150140
JJException.register(self);
151141
}

0 commit comments

Comments
 (0)