Latest 0.1.2
Homepage https://github.com/macRong/DumbPatch
License MIT
Platforms ios 8.0
Authors

CircleCI
Version
Platform
Language
apm

快速降低iOS崩溃率 (只需要加入项目中)

Example

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

  • Array (NSArrayM, NSArray0, __NSArrayI, Unrecognized selector sent to instance):
NSArray *arr = @[];
NSMutableArray *mArr = @[].mutableCopy;
Unrecognized selector sent to instance ✅

*** Terminating app due to uncaught exception 'NSRangeException',
 reason: '*** -[__NSArrayM objectAtIndex:]: index 6 beyond bounds for empty NSArray
id obj = arr[6];  ✅
id objc = [arr objectAtIndex:6]; ✅

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
[mArr addObject:nil]; ✅

Terminating app due to uncaught exception 'NSRangeException',reason: '*** -[__NSArrayM removeObjectAtIndex:]: index 6  beyond bounds for empty
[mArr removeObjectAtIndex:6]; ✅

 *** Terminating app due to uncaught exception 'NSInvalidArgumentException',reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
[mArr insertObject:nil atIndex:6]; ✅

Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM replaceObjectAtIndex:withObject:]: index 6 beyond bounds for empty
[mArr replaceObjectAtIndex:6 withObject:@"obj"]; ✅

*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'example:NSString *k = nil;  [NSArray arrayWithObject:k]
NSString *k = nil; 
[NSArray arrayWithObject:k] ✅

*** -attempt to insert nil object from objects[0]
NSArray *ar = [NSArray arrayWithObjects:@"1",,@"2", nil]; ✅

Requirements

Installation

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

pod 'DumbPatch'

Author

macRong, [email protected]

License

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

Latest podspec

{
    "name": "DumbPatch",
    "version": "0.1.2",
    "summary": "Unrecognized selector sent to instance .",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/macRong/DumbPatch",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "rongtian": "[email protected]"
    },
    "source": {
        "git": "https://github.com/macRong/DumbPatch.git",
        "tag": "0.1.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "DumbPatch/Classes/**/*"
}

Pin It on Pinterest

Share This