• Stars
    star
    2,275
  • Rank 20,247 (Top 0.4 %)
  • Language
    Objective-C
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An Global protection scheme..

MSCrashProtector

platform GitHub license CocoaPods GitHub stars

An Global protection scheme..

Installation

Cocoapods(Recommended)

  1. Add pod 'MSCrashProtector' to your Podfile.
  2. Run pod install

Manual

  1. Add all files under MSCrashProtector to your project

Requirements

  • iOS 5.0 and greater
  • ARC/MRC

How To Use

Objective-C

    #import "MSCrashProtector.h"
        
    //NSArray
    NSArray* arr = @[@"1"];
    [arr objectAtIndexSafe:10];
    id obj = [arr objectAtIndex:0 kindOfClass:[NSString class]];
    NSLog(@"%@",obj);
    
    //NSMutableArray
    NSMutableArray* marr = [NSMutableArray array];
    [marr addObjectSafe:nil];
    [marr removeObjectAtIndexInBoundary:100];
    [marr insertObject:@111 atIndexInBoundary:100];

    
    //NSDictionary
    NSDictionary* dic = [NSDictionary dictionary];
    [dic objectForKey:nil defaultValue:@"test"];

    //NSMutableDictionary
    NSMutableDictionary* mdic = [NSMutableDictionary dictionary];
    [mdic setObjectSafe:nil forKey:nil];
    

License

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