Latest 0.1.0
Homepage https://github.com/ListenXunInNight/XUNCrashShield
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

Example

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

Requirements

Installation

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

pod 'XUNCrashShield'

Author

Xun, [email protected]

License

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

Introduction

访问 NSArray 越界?

向 NSMutableArray、NSMutableDictionary 中插入空值?

利用空值初始化NSArray、NSDictionary、NSSet ?

将 UIView、CALayer 添加为 subview 、sublayer ?

消息转发时找不到对应方法?

使用时 KVC 时 key 为nil或者 undefined?

……

还在为这些常见线上 crash 而感到头疼吗?

现在你们不用担心了,XUNCrashShield 能够帮你解决 80% 以上的 Crash 。

还有,对象使用 KVO 或 NSNotificationCenter 监听消息时,忘记在 dealloc 时移除的问题也正在解决当中…

Guide

XUNCrashShieldManager *csManager = [XUNCrashShieldManager shareManager];
csManager.excludeList = @[NSObject.class];
[csManager guard];

NSString *strings[5] = {@"1", @"2", @"3", @"4", @"5"};
strings[2] = nil;

//    @[strings[1], strings[2]];
//    @[strings[2]];
//    @{strings[1]:strings[2]}

//    [NSArray arrayWithObjects:strings count:5];

//    NSMutableArray *arr = @[].mutableCopy;
//    [arr insertObject:strings[0] atIndex:2];
//    [arr insertObject:strings[2] atIndex:0];
//    [arr addObject:strings[2]];
//    [arr removeObjectAtIndex:1];
//    [arr removeObjectsInRange:NSMakeRange(0, 100)];

//    NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:strings[1], strings[2], nil];

//    NSMutableDictionary *dict = @{}.mutableCopy;
//    [dict setObject:strings[1] forKey:strings[2]];

//    [self performSelector:@selector(sayHello)];
//    [self setValue:strings[2] forKey:strings[2]];
//    [self valueForKey:strings[2]];
//    [self setValue:strings[1] forKey:strings[1]];

Latest podspec

{
    "name": "XUNCrashShield",
    "version": "0.1.0",
    "summary": "A short description of XUNCrashShield.",
    "description": "A tiny shield for crash online. u4e00u4e2au9632u6b62u7ebfu4e0a 80% crash u7684u8f7bu5faeu7684u9632u5fa1u76feu3002",
    "homepage": "https://github.com/ListenXunInNight/XUNCrashShield",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Xun": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ListenXunInNight/XUNCrashShield.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": [
        "XUNCrashShield/Classes/**/**"
    ],
    "public_header_files": [
        "XUNCrashShield/Classes/**/**.h",
        "XUNCrashShield/Classes/**.h"
    ]
}

Pin It on Pinterest

Share This