├── runningResult运行效果.gif ├── Pods ├── Headers │ ├── Private │ │ └── MSCrashProtector │ │ │ ├── NSArray+MSSafe.h │ │ │ ├── MSCrashProtector.h │ │ │ ├── NSString+MSSafe.h │ │ │ ├── NSDictionary+MSSafe.h │ │ │ └── NSMutableSet+MSSafe.h │ └── Public │ │ └── MSCrashProtector │ │ ├── NSArray+MSSafe.h │ │ ├── MSCrashProtector.h │ │ ├── NSString+MSSafe.h │ │ ├── NSDictionary+MSSafe.h │ │ └── NSMutableSet+MSSafe.h ├── Target Support Files │ ├── MSCrashProtector │ │ ├── MSCrashProtector-dummy.m │ │ ├── MSCrashProtector-prefix.pch │ │ └── MSCrashProtector.xcconfig │ └── Pods-MSCrashDemo │ │ ├── Pods-MSCrashDemo-dummy.m │ │ ├── Pods-MSCrashDemo.debug.xcconfig │ │ ├── Pods-MSCrashDemo.release.xcconfig │ │ ├── Pods-MSCrashDemo-acknowledgements.markdown │ │ ├── Pods-MSCrashDemo-acknowledgements.plist │ │ ├── Pods-MSCrashDemo-frameworks.sh │ │ └── Pods-MSCrashDemo-resources.sh ├── Manifest.lock ├── MSCrashProtector │ ├── MSCrashProtector │ │ ├── NSString+MSSafe.h │ │ ├── NSMutableSet+MSSafe.h │ │ ├── MSCrashProtector.h │ │ ├── NSMutableSet+MSSafe.m │ │ ├── NSString+MSSafe.m │ │ ├── NSArray+MSSafe.h │ │ ├── NSDictionary+MSSafe.h │ │ ├── NSArray+MSSafe.m │ │ └── NSDictionary+MSSafe.m │ ├── LICENSE │ └── README.md └── Pods.xcodeproj │ ├── xcuserdata │ └── jzj.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist │ └── project.pbxproj ├── MSCrashDemo ├── Assets.xcassets │ ├── Contents.json │ ├── AppIcon.appiconset │ │ ├── icon-29.png │ │ ├── icon-40.png │ │ ├── icon-50.png │ │ ├── icon-57.png │ │ ├── icon-72.png │ │ ├── icon-76.png │ │ ├── 1024x1024@2x.png │ │ ├── icon-20-ipad.png │ │ ├── icon-20@2x.png │ │ ├── icon-20@3x.png │ │ ├── icon-29-ipad.png │ │ ├── icon-29@2x.png │ │ ├── icon-29@3x.png │ │ ├── icon-40@2x.png │ │ ├── icon-40@3x.png │ │ ├── icon-50@2x.png │ │ ├── icon-57@2x.png │ │ ├── icon-60@2x.png │ │ ├── icon-60@3x.png │ │ ├── icon-72@2x.png │ │ ├── icon-76@2x.png │ │ ├── icon-83.5@2x.png │ │ ├── icon-20@2x-ipad.png │ │ ├── icon-29@2x-ipad.png │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ ├── 1024iPadPortraitiOS56_768x1024pt.png │ │ ├── 1024iPadPortraitiOS789_768x1024pt.png │ │ ├── 1024iPhonePortraitiOS56_320x480pt.png │ │ ├── 1024iPadPortraitWOSBiOS56_768x1004pt.png │ │ ├── 1024iPadPortraitiOS56_768x1024pt@2x.png │ │ ├── 1024iPadPortraitiOS789_768x1024pt@2x.png │ │ ├── 1024iPhonePortraitiOS56_320x480pt@2x.png │ │ ├── 1024iPhonePortraitiOS56_320x568pt@2x.png │ │ ├── 1024iPhonePortraitiOS789_320x480pt@2x.png │ │ ├── 1024iPhonePortraitiOS789_320x568pt@2x.png │ │ ├── 1024iPhonePortraitiOS89_375x667pt@2x.png │ │ ├── 1024iPhonePortraitiOS89_414x736pt@3x.png │ │ ├── 1024iPadPortraitWOSBiOS56_768x1004pt@2x.png │ │ └── Contents.json ├── ViewController.h ├── AppDelegate.h ├── main.m ├── Info.plist ├── ViewController.m └── AppDelegate.m ├── MSCrashDemo.xcworkspace ├── xcuserdata │ └── jzj.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── IDEFindNavigatorScopes.plist ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── MSCrashDemo.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── j.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── xcuserdata │ ├── j.xcuserdatad │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ └── jzj.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── project.pbxproj ├── Podfile.lock ├── MSCrashProtector ├── NSString+MSSafe.h ├── NSMutableSet+MSSafe.h ├── MSCrashProtector.h ├── NSMutableSet+MSSafe.m ├── NSString+MSSafe.m ├── NSArray+MSSafe.h ├── NSDictionary+MSSafe.h ├── NSArray+MSSafe.m └── NSDictionary+MSSafe.m ├── Podfile ├── .gitignore ├── README.md └── MSCrashProtector.podspec /runningResult运行效果.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/runningResult运行效果.gif -------------------------------------------------------------------------------- /Pods/Headers/Private/MSCrashProtector/NSArray+MSSafe.h: -------------------------------------------------------------------------------- 1 | ../../../MSCrashProtector/MSCrashProtector/NSArray+MSSafe.h -------------------------------------------------------------------------------- /Pods/Headers/Public/MSCrashProtector/NSArray+MSSafe.h: -------------------------------------------------------------------------------- 1 | ../../../MSCrashProtector/MSCrashProtector/NSArray+MSSafe.h -------------------------------------------------------------------------------- /Pods/Headers/Private/MSCrashProtector/MSCrashProtector.h: -------------------------------------------------------------------------------- 1 | ../../../MSCrashProtector/MSCrashProtector/MSCrashProtector.h -------------------------------------------------------------------------------- /Pods/Headers/Private/MSCrashProtector/NSString+MSSafe.h: -------------------------------------------------------------------------------- 1 | ../../../MSCrashProtector/MSCrashProtector/NSString+MSSafe.h -------------------------------------------------------------------------------- /Pods/Headers/Public/MSCrashProtector/MSCrashProtector.h: -------------------------------------------------------------------------------- 1 | ../../../MSCrashProtector/MSCrashProtector/MSCrashProtector.h -------------------------------------------------------------------------------- /Pods/Headers/Public/MSCrashProtector/NSString+MSSafe.h: -------------------------------------------------------------------------------- 1 | ../../../MSCrashProtector/MSCrashProtector/NSString+MSSafe.h -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Pods/Headers/Private/MSCrashProtector/NSDictionary+MSSafe.h: -------------------------------------------------------------------------------- 1 | ../../../MSCrashProtector/MSCrashProtector/NSDictionary+MSSafe.h -------------------------------------------------------------------------------- /Pods/Headers/Private/MSCrashProtector/NSMutableSet+MSSafe.h: -------------------------------------------------------------------------------- 1 | ../../../MSCrashProtector/MSCrashProtector/NSMutableSet+MSSafe.h -------------------------------------------------------------------------------- /Pods/Headers/Public/MSCrashProtector/NSDictionary+MSSafe.h: -------------------------------------------------------------------------------- 1 | ../../../MSCrashProtector/MSCrashProtector/NSDictionary+MSSafe.h -------------------------------------------------------------------------------- /Pods/Headers/Public/MSCrashProtector/NSMutableSet+MSSafe.h: -------------------------------------------------------------------------------- 1 | ../../../MSCrashProtector/MSCrashProtector/NSMutableSet+MSSafe.h -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-50.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-57.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-72.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/1024x1024@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/1024x1024@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png -------------------------------------------------------------------------------- /Pods/Target Support Files/MSCrashProtector/MSCrashProtector-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_MSCrashProtector : NSObject 3 | @end 4 | @implementation PodsDummy_MSCrashProtector 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-MSCrashDemo/Pods-MSCrashDemo-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_MSCrashDemo : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_MSCrashDemo 5 | @end 6 | -------------------------------------------------------------------------------- /MSCrashDemo.xcworkspace/xcuserdata/jzj.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo.xcworkspace/xcuserdata/jzj.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPadPortraitiOS56_768x1024pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPadPortraitiOS56_768x1024pt.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPadPortraitiOS789_768x1024pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPadPortraitiOS789_768x1024pt.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPhonePortraitiOS56_320x480pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPhonePortraitiOS56_320x480pt.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPadPortraitWOSBiOS56_768x1004pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPadPortraitWOSBiOS56_768x1004pt.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPadPortraitiOS56_768x1024pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPadPortraitiOS56_768x1024pt@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPadPortraitiOS789_768x1024pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPadPortraitiOS789_768x1024pt@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPhonePortraitiOS56_320x480pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPhonePortraitiOS56_320x480pt@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPhonePortraitiOS56_320x568pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPhonePortraitiOS56_320x568pt@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPhonePortraitiOS789_320x480pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPhonePortraitiOS789_320x480pt@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPhonePortraitiOS789_320x568pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPhonePortraitiOS789_320x568pt@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPhonePortraitiOS89_375x667pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPhonePortraitiOS89_375x667pt@2x.png -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPhonePortraitiOS89_414x736pt@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPhonePortraitiOS89_414x736pt@3x.png -------------------------------------------------------------------------------- /MSCrashDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPadPortraitWOSBiOS56_768x1004pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/1024iPadPortraitWOSBiOS56_768x1004pt@2x.png -------------------------------------------------------------------------------- /MSCrashDemo.xcodeproj/project.xcworkspace/xcuserdata/j.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sureJiang/MSCrashProtector/HEAD/MSCrashDemo.xcodeproj/project.xcworkspace/xcuserdata/j.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /MSCrashDemo.xcworkspace/xcuserdata/jzj.xcuserdatad/IDEFindNavigatorScopes.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /MSCrashDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // MSCrashDemo 4 | // 5 | // Created by J on 2013/2/26. 6 | // Copyright © 2013年 J. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - MSCrashProtector (1.2.0) 3 | 4 | DEPENDENCIES: 5 | - MSCrashProtector 6 | 7 | SPEC CHECKSUMS: 8 | MSCrashProtector: 46188bfaf9323ac59f91d6585b2a76b0df7e3360 9 | 10 | PODFILE CHECKSUM: 046996639126792804eb73583ab1b09bbf2f1f91 11 | 12 | COCOAPODS: 1.4.0.beta.1 13 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - MSCrashProtector (1.2.0) 3 | 4 | DEPENDENCIES: 5 | - MSCrashProtector 6 | 7 | SPEC CHECKSUMS: 8 | MSCrashProtector: 46188bfaf9323ac59f91d6585b2a76b0df7e3360 9 | 10 | PODFILE CHECKSUM: 046996639126792804eb73583ab1b09bbf2f1f91 11 | 12 | COCOAPODS: 1.4.0.beta.1 13 | -------------------------------------------------------------------------------- /MSCrashDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/MSCrashProtector/MSCrashProtector-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /MSCrashDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /MSCrashProtector/NSString+MSSafe.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+MSSafe.h 3 | // 4 | // 5 | // Created by J on 2014/2/27. 6 | // Copyright © 2014年 J. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (MSSafe) 12 | 13 | - (BOOL)isNotEmpty; 14 | - (BOOL)isNotBlank; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'MSCrashDemo' do 5 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 6 | # use_frameworks! 7 | 8 | # Pods for MSCrashDemo 9 | 10 | pod 'MSCrashProtector' 11 | 12 | end 13 | -------------------------------------------------------------------------------- /Pods/MSCrashProtector/MSCrashProtector/NSString+MSSafe.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+MSSafe.h 3 | // 4 | // 5 | // Created by J on 2013/2/27. 6 | // Copyright © 2013年 J. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (MSSafe) 12 | 13 | - (BOOL)isNotEmpty; 14 | - (BOOL)isNotBlank; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /MSCrashDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // MSCrashDemo 4 | // 5 | // Created by J on 2013/2/26. 6 | // Copyright © 2013年 J. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /MSCrashProtector/NSMutableSet+MSSafe.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableSet+MSSafe.h 3 | // 4 | // 5 | // Created by J on 2014/2/27. 6 | // Copyright © 2014年 J. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSMutableSet(MSSafe) 12 | 13 | // 排除nil 14 | - (void)addObjectSafe:(id)object; 15 | 16 | - (void)removeObjectSafe:(id)object; 17 | @end 18 | -------------------------------------------------------------------------------- /MSCrashProtector/MSCrashProtector.h: -------------------------------------------------------------------------------- 1 | // 2 | // MSCrashProtector.h 3 | // 4 | // 5 | // Created by J on 2014/3/5. 6 | // Copyright © 2014年 J. All rights reserved. 7 | // 8 | 9 | #ifndef MSCrashProtector_h 10 | #define MSCrashProtector_h 11 | 12 | #import "NSArray+MSSafe.h" 13 | #import "NSDictionary+MSSafe.h" 14 | #import "NSMutableSet+MSSafe.h" 15 | 16 | #endif /* MSCrashProtector_h */ 17 | -------------------------------------------------------------------------------- /Pods/MSCrashProtector/MSCrashProtector/NSMutableSet+MSSafe.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableSet+MSSafe.h 3 | // 4 | // 5 | // Created by J on 2013/2/27. 6 | // Copyright © 2013年 J. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSMutableSet(MSSafe) 12 | 13 | // 排除nil 14 | - (void)addObjectSafe:(id)object; 15 | 16 | - (void)removeObjectSafe:(id)object; 17 | @end 18 | -------------------------------------------------------------------------------- /MSCrashDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MSCrashDemo 4 | // 5 | // Created by J on 2013/2/26. 6 | // Copyright © 2013年 J. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Pods/MSCrashProtector/MSCrashProtector/MSCrashProtector.h: -------------------------------------------------------------------------------- 1 | // 2 | // MSCrashProtector.h 3 | // 4 | // 5 | // Created by J on 2013/3/5. 6 | // Copyright © 2013年 J. All rights reserved. 7 | // 8 | 9 | #ifndef MSCrashProtector_h 10 | #define MSCrashProtector_h 11 | 12 | #import "NSArray+MSSafe.h" 13 | #import "NSDictionary+MSSafe.h" 14 | #import "NSMutableSet+MSSafe.h" 15 | 16 | #endif /* MSCrashProtector_h */ 17 | -------------------------------------------------------------------------------- /MSCrashDemo.xcodeproj/xcuserdata/j.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MSCrashDemo.xcscheme 8 | 9 | orderHint 10 | 2 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /MSCrashDemo.xcodeproj/xcuserdata/jzj.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MSCrashDemo.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /MSCrashProtector/NSMutableSet+MSSafe.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableSet+MSSafe.m 3 | // 4 | // 5 | // Created by J on 2014/2/27. 6 | // Copyright © 2014年 J. All rights reserved. 7 | // 8 | 9 | #import "NSMutableSet+MSSafe.h" 10 | 11 | @implementation NSMutableSet (MSSafe) 12 | 13 | // 排除nil 14 | - (void)addObjectSafe:(id)object{ 15 | 16 | if(!object)return; 17 | [self addObject:object]; 18 | } 19 | 20 | - (void)removeObjectSafe:(id)object{ 21 | 22 | if(!object)return; 23 | [self removeObject:object]; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Pods/MSCrashProtector/MSCrashProtector/NSMutableSet+MSSafe.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableSet+MSSafe.m 3 | // 4 | // 5 | // Created by J on 2013/2/27. 6 | // Copyright © 2013年 J. All rights reserved. 7 | // 8 | 9 | #import "NSMutableSet+MSSafe.h" 10 | 11 | @implementation NSMutableSet (MSSafe) 12 | 13 | // 排除nil 14 | - (void)addObjectSafe:(id)object{ 15 | 16 | if(!object)return; 17 | [self addObject:object]; 18 | } 19 | 20 | - (void)removeObjectSafe:(id)object{ 21 | 22 | if(!object)return; 23 | [self removeObject:object]; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /MSCrashProtector/NSString+MSSafe.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+MSSafe.m 3 | // 4 | // 5 | // Created by J on 2014/2/27. 6 | // Copyright © 2014年 J. All rights reserved. 7 | // 8 | 9 | #import "NSString+MSSafe.h" 10 | 11 | @implementation NSString (MSSafe) 12 | 13 | - (BOOL)isNotEmpty{ 14 | 15 | return [self length] != 0; 16 | } 17 | 18 | - (BOOL)isNotBlank{ 19 | 20 | if ([self isNotEmpty]){ 21 | 22 | return [[self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] length] > 0; 23 | } 24 | return NO; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/MSCrashProtector/MSCrashProtector/NSString+MSSafe.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+MSSafe.m 3 | // 4 | // 5 | // Created by J on 2013/2/27. 6 | // Copyright © 2013年 J. All rights reserved. 7 | // 8 | 9 | #import "NSString+MSSafe.h" 10 | 11 | @implementation NSString (MSSafe) 12 | 13 | - (BOOL)isNotEmpty{ 14 | 15 | return [self length] != 0; 16 | } 17 | 18 | - (BOOL)isNotBlank{ 19 | 20 | if ([self isNotEmpty]){ 21 | 22 | return [[self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] length] > 0; 23 | } 24 | return NO; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/jzj.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MSCrashProtector.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 1 11 | 12 | Pods-MSCrashDemo.xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 2 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Pods/Target Support Files/MSCrashProtector/MSCrashProtector.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MSCrashProtector 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MSCrashProtector" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MSCrashProtector" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/MSCrashProtector 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-MSCrashDemo/Pods-MSCrashDemo.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MSCrashProtector" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MSCrashProtector" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/MSCrashProtector" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"MSCrashProtector" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-MSCrashDemo/Pods-MSCrashDemo.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MSCrashProtector" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MSCrashProtector" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/MSCrashProtector" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"MSCrashProtector" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/MSCrashProtector/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-MSCrashDemo/Pods-MSCrashDemo-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## MSCrashProtector 5 | 6 | MIT License 7 | 8 | Copyright (c) 2013 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | Generated by CocoaPods - https://cocoapods.org 29 | -------------------------------------------------------------------------------- /MSCrashDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | Launch Screen 25 | UIRequiredDeviceCapabilities 26 | 27 | armv7 28 | 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | 33 | UISupportedInterfaceOrientations~ipad 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationPortraitUpsideDown 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /MSCrashDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // MSCrashDemo 4 | // 5 | // Created by J on 2013/2/26. 6 | // Copyright © 2013年 J. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "MSCrashProtector.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ 19 | 20 | //NSArray 21 | NSArray* arr = @[@"1"]; 22 | [arr objectAtIndexSafe:10]; 23 | id obj = [arr objectAtIndex:0 kindOfClass:[NSString class]]; 24 | NSLog(@"arr:%@",obj); 25 | 26 | //NSMutableArray 27 | NSMutableArray* marr = [NSMutableArray array]; 28 | [marr addObjectSafe:nil]; 29 | [marr removeObjectAtIndexInBoundary:100]; 30 | [marr insertObject:@111 atIndexInBoundary:100]; 31 | NSLog(@"marr:%@",marr); 32 | 33 | //NSDictionary 34 | NSDictionary* dic = [NSDictionary dictionary]; 35 | [dic objectForKey:nil defaultValue:@"test"]; 36 | NSLog(@"dic:%@",dic); 37 | 38 | //NSMutableDictionary 39 | NSMutableDictionary* mdic = [NSMutableDictionary dictionary]; 40 | [mdic setObjectSafe:nil forKey:nil]; 41 | NSLog(@"mdic:%@",mdic); 42 | 43 | //NSMutableSet 44 | NSMutableSet * mset = [NSMutableSet set]; 45 | [mset removeObjectSafe:nil]; 46 | [mset addObjectSafe:nil]; 47 | 48 | } 49 | 50 | - (void)viewDidLoad { 51 | [super viewDidLoad]; 52 | 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | # CocoaPods 32 | # 33 | # We recommend against adding the Pods directory to your .gitignore. However 34 | # you should judge for yourself, the pros and cons are mentioned at: 35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 36 | # 37 | # Pods/ 38 | 39 | # Carthage 40 | # 41 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 42 | # Carthage/Checkouts 43 | 44 | Carthage/Build 45 | 46 | # fastlane 47 | # 48 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 49 | # screenshots whenever they are needed. 50 | # For more information about the recommended setup visit: 51 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 52 | 53 | fastlane/report.xml 54 | fastlane/Preview.html 55 | fastlane/screenshots/**/*.png 56 | fastlane/test_output 57 | 58 | # Code Injection 59 | # 60 | # After new code Injection tools there's a generated folder /iOSInjectionProject 61 | # https://github.com/johnno1962/injectionforxcode 62 | 63 | iOSInjectionProject/ 64 | -------------------------------------------------------------------------------- /MSCrashProtector/NSArray+MSSafe.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MSSafe.h 3 | // 4 | // 5 | // Created by J on 2014/2/26. 6 | // Copyright © 2014年 J. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSArray (MSSafe) 12 | 13 | ///如果index越界 返回nil 14 | - (id)objectAtIndexSafe:(NSUInteger)index; 15 | 16 | ///如果index越界&&类型不匹配 返回nil 17 | - (id)objectAtIndex:(NSUInteger)index kindOfClass:(Class)aClass; 18 | - (id)objectAtIndex:(NSUInteger)index memberOfClass:(Class)aClass; 19 | 20 | ///如果index越界 返回defaultValue 默认值 21 | - (id)objectAtIndex:(NSUInteger)index defaultValue:(id)value; 22 | - (BOOL)boolAtIndex:(NSUInteger)index defaultValue:(BOOL)value; 23 | - (float)floatAtIndex:(NSUInteger)index defaultValue:(float)value; 24 | - (double)doubleAtIndex:(NSUInteger)index defaultValue:(double)value; 25 | - (NSDate *)dateAtIndex:(NSUInteger)index defaultValue:(NSDate *)value; 26 | - (NSData *)dataAtIndex:(NSUInteger)index defaultValue:(NSData *)value; 27 | - (NSArray *)arrayAtIndex:(NSUInteger)index defaultValue:(NSArray *)value; 28 | - (NSInteger)integerAtIndex:(NSUInteger)index defaultValue:(NSInteger)value; 29 | - (NSString *)stringAtIndex:(NSUInteger)index defaultValue:(NSString *)value; 30 | - (NSNumber *)numberAtIndex:(NSUInteger)index defaultValue:(NSNumber *)value; 31 | - (NSUInteger)unintegerAtIndex:(NSUInteger)index defaultValue:(NSUInteger)value; 32 | - (NSDictionary *)dictionaryAtIndex:(NSUInteger)index defaultValue:(NSDictionary *)value; 33 | 34 | @end 35 | 36 | 37 | @interface NSMutableArray (MSSafe) 38 | 39 | // 排除nil 和 NSNull 40 | - (void)addObjectSafe:(id)anObject; 41 | 42 | - (void)removeObjectAtIndexInBoundary:(NSUInteger)index; 43 | - (void)insertObject:(id)anObject atIndexInBoundary:(NSUInteger)index; 44 | - (void)replaceObjectAtInBoundaryIndex:(NSUInteger)index withObject:(id)anObject; 45 | 46 | @end 47 | 48 | -------------------------------------------------------------------------------- /Pods/MSCrashProtector/MSCrashProtector/NSArray+MSSafe.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MSSafe.h 3 | // 4 | // 5 | // Created by J on 2013/2/26. 6 | // Copyright © 2013年 J. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSArray (MSSafe) 12 | 13 | ///如果index越界 返回nil 14 | - (id)objectAtIndexSafe:(NSUInteger)index; 15 | 16 | ///如果index越界&&类型不匹配 返回nil 17 | - (id)objectAtIndex:(NSUInteger)index kindOfClass:(Class)aClass; 18 | - (id)objectAtIndex:(NSUInteger)index memberOfClass:(Class)aClass; 19 | 20 | ///如果index越界 返回defaultValue 默认值 21 | - (id)objectAtIndex:(NSUInteger)index defaultValue:(id)value; 22 | - (BOOL)boolAtIndex:(NSUInteger)index defaultValue:(BOOL)value; 23 | - (float)floatAtIndex:(NSUInteger)index defaultValue:(float)value; 24 | - (double)doubleAtIndex:(NSUInteger)index defaultValue:(double)value; 25 | - (NSDate *)dateAtIndex:(NSUInteger)index defaultValue:(NSDate *)value; 26 | - (NSData *)dataAtIndex:(NSUInteger)index defaultValue:(NSData *)value; 27 | - (NSArray *)arrayAtIndex:(NSUInteger)index defaultValue:(NSArray *)value; 28 | - (NSInteger)integerAtIndex:(NSUInteger)index defaultValue:(NSInteger)value; 29 | - (NSString *)stringAtIndex:(NSUInteger)index defaultValue:(NSString *)value; 30 | - (NSNumber *)numberAtIndex:(NSUInteger)index defaultValue:(NSNumber *)value; 31 | - (NSUInteger)unintegerAtIndex:(NSUInteger)index defaultValue:(NSUInteger)value; 32 | - (NSDictionary *)dictionaryAtIndex:(NSUInteger)index defaultValue:(NSDictionary *)value; 33 | 34 | @end 35 | 36 | 37 | @interface NSMutableArray (MSSafe) 38 | 39 | // 排除nil 和 NSNull 40 | - (void)addObjectSafe:(id)anObject; 41 | 42 | - (void)removeObjectAtIndexInBoundary:(NSUInteger)index; 43 | - (void)insertObject:(id)anObject atIndexInBoundary:(NSUInteger)index; 44 | - (void)replaceObjectAtInBoundaryIndex:(NSUInteger)index withObject:(id)anObject; 45 | 46 | @end 47 | 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MSCrashProtector 2 | [![platform](http://img.shields.io/cocoapods/p/YYKit.svg?style=flat)](https://www.apple.com/nl/ios/) 3 | [![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat)](https://github.com/JZJJZJ/MSCrashProtector/blob/master/LICENSE) 4 | [![CocoaPods](https://img.shields.io/cocoapods/v/AFNetworking.svg)](https://github.com/JZJJZJ/MSCrashProtector.git) 5 | [![GitHub stars](https://img.shields.io/github/stars/badges/shields.svg?style=social&logo=github&label=Stars)](https://github.com/JZJJZJ/MSCrashProtector.git) 6 | 7 | An Global protection scheme.. 8 | 9 | 10 | ## Installation 11 | 12 | ### Cocoapods(Recommended) 13 | 14 | 1. Add `pod 'MSCrashProtector'` to your Podfile. 15 | 2. Run `pod install` 16 | 17 | ### Manual 18 | 19 | 1. Add all files under `MSCrashProtector` to your project 20 | 21 | ## Requirements 22 | 23 | - iOS 5.0 and greater 24 | - ARC/MRC 25 | 26 | 27 | ## How To Use 28 | 29 | ### Objective-C 30 | 31 | ```objc 32 | 33 | #import "MSCrashProtector.h" 34 | ``` 35 | 36 | 37 | ```objc 38 | 39 | //NSArray 40 | NSArray* arr = @[@"1"]; 41 | [arr objectAtIndexSafe:10]; 42 | id obj = [arr objectAtIndex:0 kindOfClass:[NSString class]]; 43 | NSLog(@"%@",obj); 44 | 45 | //NSMutableArray 46 | NSMutableArray* marr = [NSMutableArray array]; 47 | [marr addObjectSafe:nil]; 48 | [marr removeObjectAtIndexInBoundary:100]; 49 | [marr insertObject:@111 atIndexInBoundary:100]; 50 | 51 | 52 | //NSDictionary 53 | NSDictionary* dic = [NSDictionary dictionary]; 54 | [dic objectForKey:nil defaultValue:@"test"]; 55 | 56 | //NSMutableDictionary 57 | NSMutableDictionary* mdic = [NSMutableDictionary dictionary]; 58 | [mdic setObjectSafe:nil forKey:nil]; 59 | 60 | ``` 61 | ## License 62 | 63 | MSCrashProtector is available under the MIT license. See the LICENSE file for more info. 64 | -------------------------------------------------------------------------------- /Pods/MSCrashProtector/README.md: -------------------------------------------------------------------------------- 1 | # MSCrashProtector 2 | 3 | [![platform](http://img.shields.io/cocoapods/p/YYKit.svg?style=flat)](https://www.apple.com/nl/ios/) 4 | [![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat)](https://github.com/JZJJZJ/MSCrashProtector/blob/master/LICENSE) 5 | [![CocoaPods](https://img.shields.io/cocoapods/v/AFNetworking.svg)](https://github.com/JZJJZJ/MSCrashProtector.git) 6 | [![GitHub stars](https://img.shields.io/github/stars/badges/shields.svg?style=social&logo=github&label=Stars)](https://github.com/JZJJZJ/MSCrashProtector.git) 7 | 8 | An Global protection scheme.. 9 | 10 | 11 | ## Installation 12 | 13 | ### Cocoapods(Recommended) 14 | 15 | 1. Add `pod 'MSCrashProtector'` to your Podfile. 16 | 2. Run `pod install` 17 | 18 | ### Manual 19 | 20 | 1. Add all files under `MSCrashProtector` to your project 21 | 22 | ## Requirements 23 | 24 | - iOS 5.0 and greater 25 | - ARC/MRC 26 | 27 | 28 | ## How To Use 29 | 30 | ### Objective-C 31 | 32 | ```objc 33 | 34 | #import "MSCrashProtector.h" 35 | ``` 36 | 37 | 38 | ```objc 39 | 40 | //NSArray 41 | NSArray* arr = @[@"1"]; 42 | [arr objectAtIndexSafe:10]; 43 | id obj = [arr objectAtIndex:0 kindOfClass:[NSString class]]; 44 | NSLog(@"%@",obj); 45 | 46 | //NSMutableArray 47 | NSMutableArray* marr = [NSMutableArray array]; 48 | [marr addObjectSafe:nil]; 49 | [marr removeObjectAtIndexInBoundary:100]; 50 | [marr insertObject:@111 atIndexInBoundary:100]; 51 | 52 | 53 | //NSDictionary 54 | NSDictionary* dic = [NSDictionary dictionary]; 55 | [dic objectForKey:nil defaultValue:@"test"]; 56 | 57 | //NSMutableDictionary 58 | NSMutableDictionary* mdic = [NSMutableDictionary dictionary]; 59 | [mdic setObjectSafe:nil forKey:nil]; 60 | 61 | ``` 62 | 63 | 64 | ## Credits 65 | 66 | MSCrashProtector was created by [Jiang.Zijia](https://github.com/JZJJZJ) in the development of [MOMO](https://www.immomo.com). 67 | 68 | ## License 69 | 70 | MSCrashProtector is available under the MIT license. See the LICENSE file for more info. 71 | -------------------------------------------------------------------------------- /MSCrashProtector/NSDictionary+MSSafe.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+MSSafe.h 3 | // 4 | // 5 | // Created by J on 2014/2/26. 6 | // Copyright © 2014年 J. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface NSDictionary (MSSafe) 13 | 14 | - (int)intForKey:(NSString *)aKey defaultValue:(int)value; 15 | - (id)objectForKey:(NSString *)aKey defaultValue:(id)value; 16 | - (BOOL)boolForKey:(NSString *)aKey defaultValue:(BOOL)value; 17 | 18 | - (id)objectForKey:(NSString *)aKey kindOfClass:(Class)aClass; 19 | - (id)objectForKey:(NSString *)aKey memberOfClass:(Class)aClass; 20 | 21 | - (float)floatForKey:(NSString *)aKey defaultValue:(float)value; 22 | - (double)doubleForKey:(NSString *)aKey defaultValue:(double)value; 23 | - (NSData *)dataForKey:(NSString *)aKey defaultValue:(NSData *)value; 24 | - (NSDate *)dateForKey:(NSString *)aKey defaultValue:(NSDate *)value; 25 | - (NSArray *)arrayForKey:(NSString *)aKey defaultValue:(NSArray *)value; 26 | - (NSInteger)integerForKey:(NSString *)aKey defaultValue:(NSInteger)value; 27 | - (NSNumber *)numberForKey:(NSString *)aKey defaultValue:(NSNumber *)value; 28 | - (NSString *)stringForKey:(NSString *)aKey defaultValue:(NSString *)value; 29 | - (long long)longLongValueForKey:(NSString *)aKey defaultValue:(long long)value; 30 | - (NSUInteger)unsignedIntegerForKey:(NSString *)aKey defaultValue:(NSUInteger)value; 31 | - (NSDictionary *)dictionaryForKey:(NSString *)aKey defaultValue:(NSDictionary *)value; 32 | 33 | @end 34 | 35 | @interface NSMutableDictionary (MSSafe) 36 | 37 | - (void)setObjectSafe:(id)value forKey:(id)aKey; 38 | - (void)setInt:(int)value forKey:(NSString *)aKey; 39 | - (void)setBool:(BOOL)value forKey:(NSString *)aKey; 40 | - (void)setFloat:(float)value forKey:(NSString *)aKey; 41 | - (void)setDouble:(double)value forKey:(NSString *)aKey; 42 | - (void)setString:(NSString *)value forKey:(NSString *)aKey; 43 | - (void)setNumber:(NSNumber *)value forKey:(NSString *)aKey; 44 | - (void)setInteger:(NSInteger)value forKey:(NSString *)aKey; 45 | - (void)setLongLongValue:(long long)value forKey:(NSString *)aKey; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Pods/MSCrashProtector/MSCrashProtector/NSDictionary+MSSafe.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+MSSafe.h 3 | // 4 | // 5 | // Created by J on 2013/2/26. 6 | // Copyright © 2013年 J. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface NSDictionary (MSSafe) 13 | 14 | - (int)intForKey:(NSString *)aKey defaultValue:(int)value; 15 | - (id)objectForKey:(NSString *)aKey defaultValue:(id)value; 16 | - (BOOL)boolForKey:(NSString *)aKey defaultValue:(BOOL)value; 17 | 18 | - (id)objectForKey:(NSString *)aKey kindOfClass:(Class)aClass; 19 | - (id)objectForKey:(NSString *)aKey memberOfClass:(Class)aClass; 20 | 21 | - (float)floatForKey:(NSString *)aKey defaultValue:(float)value; 22 | - (double)doubleForKey:(NSString *)aKey defaultValue:(double)value; 23 | - (NSData *)dataForKey:(NSString *)aKey defaultValue:(NSData *)value; 24 | - (NSDate *)dateForKey:(NSString *)aKey defaultValue:(NSDate *)value; 25 | - (NSArray *)arrayForKey:(NSString *)aKey defaultValue:(NSArray *)value; 26 | - (NSInteger)integerForKey:(NSString *)aKey defaultValue:(NSInteger)value; 27 | - (NSNumber *)numberForKey:(NSString *)aKey defaultValue:(NSNumber *)value; 28 | - (NSString *)stringForKey:(NSString *)aKey defaultValue:(NSString *)value; 29 | - (long long)longLongValueForKey:(NSString *)aKey defaultValue:(long long)value; 30 | - (NSUInteger)unsignedIntegerForKey:(NSString *)aKey defaultValue:(NSUInteger)value; 31 | - (NSDictionary *)dictionaryForKey:(NSString *)aKey defaultValue:(NSDictionary *)value; 32 | 33 | @end 34 | 35 | @interface NSMutableDictionary (MSSafe) 36 | 37 | - (void)setObjectSafe:(id)value forKey:(id)aKey; 38 | - (void)setInt:(int)value forKey:(NSString *)aKey; 39 | - (void)setBool:(BOOL)value forKey:(NSString *)aKey; 40 | - (void)setFloat:(float)value forKey:(NSString *)aKey; 41 | - (void)setDouble:(double)value forKey:(NSString *)aKey; 42 | - (void)setString:(NSString *)value forKey:(NSString *)aKey; 43 | - (void)setNumber:(NSNumber *)value forKey:(NSString *)aKey; 44 | - (void)setInteger:(NSInteger)value forKey:(NSString *)aKey; 45 | - (void)setLongLongValue:(long long)value forKey:(NSString *)aKey; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-MSCrashDemo/Pods-MSCrashDemo-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | MIT License 18 | 19 | Copyright (c) 2013 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | License 40 | MIT 41 | Title 42 | MSCrashProtector 43 | Type 44 | PSGroupSpecifier 45 | 46 | 47 | FooterText 48 | Generated by CocoaPods - https://cocoapods.org 49 | Title 50 | 51 | Type 52 | PSGroupSpecifier 53 | 54 | 55 | StringsTable 56 | Acknowledgements 57 | Title 58 | Acknowledgements 59 | 60 | 61 | -------------------------------------------------------------------------------- /MSCrashDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // MSCrashDemo 4 | // 5 | // Created by J on 2013/2/26. 6 | // Copyright © 2013年 J. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | // Override point for customization after application launch. 21 | 22 | self.window = [UIWindow new]; 23 | self.window.frame = [UIScreen mainScreen].bounds; 24 | self.window.rootViewController = [ViewController new]; 25 | self.window.backgroundColor = [UIColor whiteColor]; 26 | [self.window makeKeyAndVisible]; 27 | 28 | return YES; 29 | } 30 | 31 | 32 | - (void)applicationWillResignActive:(UIApplication *)application { 33 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 34 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 35 | } 36 | 37 | 38 | - (void)applicationDidEnterBackground:(UIApplication *)application { 39 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 40 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 41 | } 42 | 43 | 44 | - (void)applicationWillEnterForeground:(UIApplication *)application { 45 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 46 | } 47 | 48 | 49 | - (void)applicationDidBecomeActive:(UIApplication *)application { 50 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 51 | } 52 | 53 | 54 | - (void)applicationWillTerminate:(UIApplication *)application { 55 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 56 | } 57 | 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "filename" : "1024iPhonePortraitiOS56_320x480pt.png", 7 | "extent" : "full-screen", 8 | "scale" : "1x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "filename" : "1024iPhonePortraitiOS56_320x480pt@2x.png", 14 | "extent" : "full-screen", 15 | "scale" : "2x" 16 | }, 17 | { 18 | "orientation" : "portrait", 19 | "idiom" : "iphone", 20 | "filename" : "1024iPhonePortraitiOS56_320x568pt@2x.png", 21 | "extent" : "full-screen", 22 | "subtype" : "retina4", 23 | "scale" : "2x" 24 | }, 25 | { 26 | "orientation" : "portrait", 27 | "idiom" : "ipad", 28 | "filename" : "1024iPadPortraitWOSBiOS56_768x1004pt.png", 29 | "extent" : "to-status-bar", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "filename" : "1024iPadPortraitiOS56_768x1024pt.png", 36 | "extent" : "full-screen", 37 | "scale" : "1x" 38 | }, 39 | { 40 | "orientation" : "portrait", 41 | "idiom" : "ipad", 42 | "filename" : "1024iPadPortraitWOSBiOS56_768x1004pt@2x.png", 43 | "extent" : "to-status-bar", 44 | "scale" : "2x" 45 | }, 46 | { 47 | "orientation" : "portrait", 48 | "idiom" : "ipad", 49 | "filename" : "1024iPadPortraitiOS56_768x1024pt@2x.png", 50 | "extent" : "full-screen", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "extent" : "full-screen", 55 | "idiom" : "iphone", 56 | "subtype" : "736h", 57 | "filename" : "1024iPhonePortraitiOS89_414x736pt@3x.png", 58 | "minimum-system-version" : "8.0", 59 | "orientation" : "portrait", 60 | "scale" : "3x" 61 | }, 62 | { 63 | "extent" : "full-screen", 64 | "idiom" : "iphone", 65 | "subtype" : "667h", 66 | "filename" : "1024iPhonePortraitiOS89_375x667pt@2x.png", 67 | "minimum-system-version" : "8.0", 68 | "orientation" : "portrait", 69 | "scale" : "2x" 70 | }, 71 | { 72 | "orientation" : "portrait", 73 | "idiom" : "iphone", 74 | "filename" : "1024iPhonePortraitiOS789_320x480pt@2x.png", 75 | "extent" : "full-screen", 76 | "minimum-system-version" : "7.0", 77 | "scale" : "2x" 78 | }, 79 | { 80 | "extent" : "full-screen", 81 | "idiom" : "iphone", 82 | "subtype" : "retina4", 83 | "filename" : "1024iPhonePortraitiOS789_320x568pt@2x.png", 84 | "minimum-system-version" : "7.0", 85 | "orientation" : "portrait", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "orientation" : "portrait", 90 | "idiom" : "ipad", 91 | "filename" : "1024iPadPortraitiOS789_768x1024pt.png", 92 | "extent" : "full-screen", 93 | "minimum-system-version" : "7.0", 94 | "scale" : "1x" 95 | }, 96 | { 97 | "orientation" : "portrait", 98 | "idiom" : "ipad", 99 | "filename" : "1024iPadPortraitiOS789_768x1024pt@2x.png", 100 | "extent" : "full-screen", 101 | "minimum-system-version" : "7.0", 102 | "scale" : "2x" 103 | } 104 | ], 105 | "info" : { 106 | "version" : 1, 107 | "author" : "xcode" 108 | } 109 | } -------------------------------------------------------------------------------- /MSCrashDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon-20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon-20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon-29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "icon-29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon-40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "icon-40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "57x57", 47 | "idiom" : "iphone", 48 | "filename" : "icon-57.png", 49 | "scale" : "1x" 50 | }, 51 | { 52 | "size" : "57x57", 53 | "idiom" : "iphone", 54 | "filename" : "icon-57@2x.png", 55 | "scale" : "2x" 56 | }, 57 | { 58 | "size" : "60x60", 59 | "idiom" : "iphone", 60 | "filename" : "icon-60@2x.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "60x60", 65 | "idiom" : "iphone", 66 | "filename" : "icon-60@3x.png", 67 | "scale" : "3x" 68 | }, 69 | { 70 | "size" : "20x20", 71 | "idiom" : "ipad", 72 | "filename" : "icon-20-ipad.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "20x20", 77 | "idiom" : "ipad", 78 | "filename" : "icon-20@2x-ipad.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "29x29", 83 | "idiom" : "ipad", 84 | "filename" : "icon-29-ipad.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "29x29", 89 | "idiom" : "ipad", 90 | "filename" : "icon-29@2x-ipad.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "40x40", 95 | "idiom" : "ipad", 96 | "filename" : "icon-40.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "40x40", 101 | "idiom" : "ipad", 102 | "filename" : "icon-40@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "50x50", 107 | "idiom" : "ipad", 108 | "filename" : "icon-50.png", 109 | "scale" : "1x" 110 | }, 111 | { 112 | "size" : "50x50", 113 | "idiom" : "ipad", 114 | "filename" : "icon-50@2x.png", 115 | "scale" : "2x" 116 | }, 117 | { 118 | "size" : "72x72", 119 | "idiom" : "ipad", 120 | "filename" : "icon-72.png", 121 | "scale" : "1x" 122 | }, 123 | { 124 | "size" : "72x72", 125 | "idiom" : "ipad", 126 | "filename" : "icon-72@2x.png", 127 | "scale" : "2x" 128 | }, 129 | { 130 | "size" : "76x76", 131 | "idiom" : "ipad", 132 | "filename" : "icon-76.png", 133 | "scale" : "1x" 134 | }, 135 | { 136 | "size" : "76x76", 137 | "idiom" : "ipad", 138 | "filename" : "icon-76@2x.png", 139 | "scale" : "2x" 140 | }, 141 | { 142 | "size" : "83.5x83.5", 143 | "idiom" : "ipad", 144 | "filename" : "icon-83.5@2x.png", 145 | "scale" : "2x" 146 | }, 147 | { 148 | "size" : "1024x1024", 149 | "idiom" : "ios-marketing", 150 | "filename" : "1024x1024@2x.png", 151 | "scale" : "1x" 152 | } 153 | ], 154 | "info" : { 155 | "version" : 1, 156 | "author" : "xcode" 157 | } 158 | } -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-MSCrashDemo/Pods-MSCrashDemo-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 10 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 11 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 12 | 13 | install_framework() 14 | { 15 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 16 | local source="${BUILT_PRODUCTS_DIR}/$1" 17 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 18 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 19 | elif [ -r "$1" ]; then 20 | local source="$1" 21 | fi 22 | 23 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 24 | 25 | if [ -L "${source}" ]; then 26 | echo "Symlinked..." 27 | source="$(readlink "${source}")" 28 | fi 29 | 30 | # Use filter instead of exclude so missing patterns don't throw errors. 31 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 32 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 33 | 34 | local basename 35 | basename="$(basename -s .framework "$1")" 36 | binary="${destination}/${basename}.framework/${basename}" 37 | if ! [ -r "$binary" ]; then 38 | binary="${destination}/${basename}" 39 | fi 40 | 41 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 42 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 43 | strip_invalid_archs "$binary" 44 | fi 45 | 46 | # Resign the code if required by the build settings to avoid unstable apps 47 | code_sign_if_enabled "${destination}/$(basename "$1")" 48 | 49 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 50 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 51 | local swift_runtime_libs 52 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 53 | for lib in $swift_runtime_libs; do 54 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 55 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 56 | code_sign_if_enabled "${destination}/${lib}" 57 | done 58 | fi 59 | } 60 | 61 | # Copies the dSYM of a vendored framework 62 | install_dsym() { 63 | local source="$1" 64 | if [ -r "$source" ]; then 65 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"" 66 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}" 67 | fi 68 | } 69 | 70 | # Signs a framework with the provided identity 71 | code_sign_if_enabled() { 72 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 73 | # Use the current code_sign_identitiy 74 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 75 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 76 | 77 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 78 | code_sign_cmd="$code_sign_cmd &" 79 | fi 80 | echo "$code_sign_cmd" 81 | eval "$code_sign_cmd" 82 | fi 83 | } 84 | 85 | # Strip invalid architectures 86 | strip_invalid_archs() { 87 | binary="$1" 88 | # Get architectures for current file 89 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 90 | stripped="" 91 | for arch in $archs; do 92 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 93 | # Strip non-valid architectures in-place 94 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 95 | stripped="$stripped $arch" 96 | fi 97 | done 98 | if [[ "$stripped" ]]; then 99 | echo "Stripped $binary of architectures:$stripped" 100 | fi 101 | } 102 | 103 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 104 | wait 105 | fi 106 | -------------------------------------------------------------------------------- /MSCrashProtector/NSArray+MSSafe.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MSSafe.m 3 | // 4 | // 5 | // Created by J on 2014/2/26. 6 | // Copyright © 2017年 J. All rights reserved. 7 | // 8 | 9 | #import "NSArray+MSSafe.h" 10 | 11 | @implementation NSArray (MSSafe) 12 | 13 | - (id)objectAtIndexSafe:(NSUInteger)index{ 14 | 15 | id object = nil; 16 | if (self.count > index) { 17 | object = [self objectAtIndex:index]; 18 | } 19 | return object; 20 | } 21 | 22 | - (id)objectAtIndex:(NSUInteger)index kindOfClass:(Class)aClass{ 23 | 24 | id object = nil; 25 | id obj = [self objectAtIndexSafe:index]; 26 | if([obj isKindOfClass:aClass]){ 27 | object = obj; 28 | } 29 | return object; 30 | } 31 | 32 | - (id)objectAtIndex:(NSUInteger)index memberOfClass:(Class)aClass{ 33 | 34 | id object = nil; 35 | id obj = [self objectAtIndexSafe:index]; 36 | if([obj isMemberOfClass:aClass]){ 37 | object = obj; 38 | } 39 | return object; 40 | } 41 | 42 | - (id)objectAtIndex:(NSUInteger)index defaultValue:(id)value{ 43 | 44 | id object = [self objectAtIndexSafe:index]; 45 | if(!object) object = value; 46 | return value; 47 | } 48 | 49 | 50 | - (NSString *)stringAtIndex:(NSUInteger)index defaultValue:(NSString *)value{ 51 | 52 | id object = [self objectAtIndex:index kindOfClass:NSString.class]; 53 | if(!object){ 54 | object = value; 55 | } 56 | return value; 57 | } 58 | 59 | - (NSNumber *)numberAtIndex:(NSUInteger)index defaultValue:(NSNumber *)value{ 60 | 61 | id object = [self objectAtIndex:index kindOfClass:NSNumber.class]; 62 | if(!object){ 63 | object = value; 64 | } 65 | return value; 66 | } 67 | 68 | - (NSDictionary *)dictionaryAtIndex:(NSUInteger)index defaultValue:(NSDictionary *)value{ 69 | 70 | id object = [self objectAtIndex:index kindOfClass:NSDictionary.class]; 71 | if(!object){ 72 | object = value; 73 | } 74 | return value; 75 | } 76 | 77 | - (NSArray *)arrayAtIndex:(NSUInteger)index defaultValue:(NSArray *)value{ 78 | 79 | id object = [self objectAtIndex:index kindOfClass:NSArray.class]; 80 | if(!object){ 81 | object = value; 82 | } 83 | return value; 84 | } 85 | 86 | - (NSData *)dataAtIndex:(NSUInteger)index defaultValue:(NSData *)value{ 87 | 88 | id object = [self objectAtIndex:index kindOfClass:NSData.class]; 89 | if(!object){ 90 | object = value; 91 | } 92 | return value; 93 | } 94 | 95 | - (NSDate *)dateAtIndex:(NSUInteger)index defaultValue:(NSDate *)value{ 96 | 97 | id object = [self objectAtIndex:index kindOfClass:NSDate.class]; 98 | if(!object){ 99 | object = value; 100 | } 101 | return value; 102 | } 103 | 104 | - (float)floatAtIndex:(NSUInteger)index defaultValue:(float)value{ 105 | 106 | id object = [self objectAtIndexSafe:index]; 107 | if([object respondsToSelector:@selector(floatValue)]){ 108 | return [object floatValue]; 109 | } 110 | return value; 111 | } 112 | 113 | - (double)doubleAtIndex:(NSUInteger)index defaultValue:(double)value{ 114 | 115 | id object = [self objectAtIndexSafe:index]; 116 | if([object respondsToSelector:@selector(doubleValue)]){ 117 | return [object doubleValue]; 118 | } 119 | return value; 120 | } 121 | 122 | - (NSInteger)integerAtIndex:(NSUInteger)index defaultValue:(NSInteger)value{ 123 | 124 | id object = [self objectAtIndexSafe:index]; 125 | if([object respondsToSelector:@selector(integerValue)]){ 126 | return [object integerValue]; 127 | } 128 | return value; 129 | } 130 | 131 | - (NSUInteger)unintegerAtIndex:(NSUInteger)index defaultValue:(NSUInteger)value{ 132 | 133 | id object = [self objectAtIndexSafe:index]; 134 | if([object respondsToSelector:@selector(unsignedIntegerValue)]){ 135 | return [object unsignedIntegerValue]; 136 | } 137 | return value; 138 | } 139 | 140 | - (BOOL)boolAtIndex:(NSUInteger)index defaultValue:(BOOL)value{ 141 | 142 | id object = [self objectAtIndexSafe:index]; 143 | if([object respondsToSelector:@selector(boolValue)]){ 144 | return [object boolValue]; 145 | } 146 | return value; 147 | } 148 | 149 | @end 150 | 151 | 152 | @implementation NSMutableArray (MSSafe) 153 | 154 | - (void)removeObjectAtIndexInBoundary:(NSUInteger)index{ 155 | 156 | if(index < self.count){ 157 | [self removeObjectAtIndex:index]; 158 | } 159 | } 160 | 161 | - (void)insertObject:(id)anObject atIndexInBoundary:(NSUInteger)index{ 162 | 163 | if(index < self.count){ 164 | [self insertObject:anObject atIndex:index]; 165 | } 166 | } 167 | 168 | - (void)replaceObjectAtInBoundaryIndex:(NSUInteger)index withObject:(id)anObject{ 169 | 170 | if(index < self.count && anObject!=nil){ 171 | [self replaceObjectAtIndex:index withObject:anObject]; 172 | } 173 | } 174 | 175 | // 排除nil 和 NSNull 176 | - (void)addObjectSafe:(id)anObject{ 177 | 178 | if(anObject!=nil && ![anObject isKindOfClass:NSNull.class]){ 179 | [self addObject:anObject]; 180 | } 181 | } 182 | 183 | @end 184 | -------------------------------------------------------------------------------- /Pods/MSCrashProtector/MSCrashProtector/NSArray+MSSafe.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MSSafe.m 3 | // 4 | // 5 | // Created by J on 2013/2/26. 6 | // Copyright © 2013年 J. All rights reserved. 7 | // 8 | 9 | #import "NSArray+MSSafe.h" 10 | 11 | @implementation NSArray (MSSafe) 12 | 13 | - (id)objectAtIndexSafe:(NSUInteger)index{ 14 | 15 | id object = nil; 16 | if (self.count > index) { 17 | object = [self objectAtIndex:index]; 18 | } 19 | return object; 20 | } 21 | 22 | - (id)objectAtIndex:(NSUInteger)index kindOfClass:(Class)aClass{ 23 | 24 | id object = nil; 25 | id obj = [self objectAtIndexSafe:index]; 26 | if([obj isKindOfClass:aClass]){ 27 | object = obj; 28 | } 29 | return object; 30 | } 31 | 32 | - (id)objectAtIndex:(NSUInteger)index memberOfClass:(Class)aClass{ 33 | 34 | id object = nil; 35 | id obj = [self objectAtIndexSafe:index]; 36 | if([obj isMemberOfClass:aClass]){ 37 | object = obj; 38 | } 39 | return object; 40 | } 41 | 42 | - (id)objectAtIndex:(NSUInteger)index defaultValue:(id)value{ 43 | 44 | id object = [self objectAtIndexSafe:index]; 45 | if(!object) object = value; 46 | return value; 47 | } 48 | 49 | 50 | - (NSString *)stringAtIndex:(NSUInteger)index defaultValue:(NSString *)value{ 51 | 52 | id object = [self objectAtIndex:index kindOfClass:NSString.class]; 53 | if(!object){ 54 | object = value; 55 | } 56 | return value; 57 | } 58 | 59 | - (NSNumber *)numberAtIndex:(NSUInteger)index defaultValue:(NSNumber *)value{ 60 | 61 | id object = [self objectAtIndex:index kindOfClass:NSNumber.class]; 62 | if(!object){ 63 | object = value; 64 | } 65 | return value; 66 | } 67 | 68 | - (NSDictionary *)dictionaryAtIndex:(NSUInteger)index defaultValue:(NSDictionary *)value{ 69 | 70 | id object = [self objectAtIndex:index kindOfClass:NSDictionary.class]; 71 | if(!object){ 72 | object = value; 73 | } 74 | return value; 75 | } 76 | 77 | - (NSArray *)arrayAtIndex:(NSUInteger)index defaultValue:(NSArray *)value{ 78 | 79 | id object = [self objectAtIndex:index kindOfClass:NSArray.class]; 80 | if(!object){ 81 | object = value; 82 | } 83 | return value; 84 | } 85 | 86 | - (NSData *)dataAtIndex:(NSUInteger)index defaultValue:(NSData *)value{ 87 | 88 | id object = [self objectAtIndex:index kindOfClass:NSData.class]; 89 | if(!object){ 90 | object = value; 91 | } 92 | return value; 93 | } 94 | 95 | - (NSDate *)dateAtIndex:(NSUInteger)index defaultValue:(NSDate *)value{ 96 | 97 | id object = [self objectAtIndex:index kindOfClass:NSDate.class]; 98 | if(!object){ 99 | object = value; 100 | } 101 | return value; 102 | } 103 | 104 | - (float)floatAtIndex:(NSUInteger)index defaultValue:(float)value{ 105 | 106 | id object = [self objectAtIndexSafe:index]; 107 | if([object respondsToSelector:@selector(floatValue)]){ 108 | return [object floatValue]; 109 | } 110 | return value; 111 | } 112 | 113 | - (double)doubleAtIndex:(NSUInteger)index defaultValue:(double)value{ 114 | 115 | id object = [self objectAtIndexSafe:index]; 116 | if([object respondsToSelector:@selector(doubleValue)]){ 117 | return [object doubleValue]; 118 | } 119 | return value; 120 | } 121 | 122 | - (NSInteger)integerAtIndex:(NSUInteger)index defaultValue:(NSInteger)value{ 123 | 124 | id object = [self objectAtIndexSafe:index]; 125 | if([object respondsToSelector:@selector(integerValue)]){ 126 | return [object integerValue]; 127 | } 128 | return value; 129 | } 130 | 131 | - (NSUInteger)unintegerAtIndex:(NSUInteger)index defaultValue:(NSUInteger)value{ 132 | 133 | id object = [self objectAtIndexSafe:index]; 134 | if([object respondsToSelector:@selector(unsignedIntegerValue)]){ 135 | return [object unsignedIntegerValue]; 136 | } 137 | return value; 138 | } 139 | 140 | - (BOOL)boolAtIndex:(NSUInteger)index defaultValue:(BOOL)value{ 141 | 142 | id object = [self objectAtIndexSafe:index]; 143 | if([object respondsToSelector:@selector(boolValue)]){ 144 | return [object boolValue]; 145 | } 146 | return value; 147 | } 148 | 149 | @end 150 | 151 | 152 | @implementation NSMutableArray (MSSafe) 153 | 154 | - (void)removeObjectAtIndexInBoundary:(NSUInteger)index{ 155 | 156 | if(index < self.count){ 157 | [self removeObjectAtIndex:index]; 158 | } 159 | } 160 | 161 | - (void)insertObject:(id)anObject atIndexInBoundary:(NSUInteger)index{ 162 | 163 | if(index < self.count){ 164 | [self insertObject:anObject atIndex:index]; 165 | } 166 | } 167 | 168 | - (void)replaceObjectAtInBoundaryIndex:(NSUInteger)index withObject:(id)anObject{ 169 | 170 | if(index < self.count && anObject!=nil){ 171 | [self replaceObjectAtIndex:index withObject:anObject]; 172 | } 173 | } 174 | 175 | // 排除nil 和 NSNull 176 | - (void)addObjectSafe:(id)anObject{ 177 | 178 | if(anObject!=nil && ![anObject isKindOfClass:NSNull.class]){ 179 | [self addObject:anObject]; 180 | } 181 | } 182 | 183 | @end 184 | -------------------------------------------------------------------------------- /MSCrashProtector.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint MSCrashProtector.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | s.name = "MSCrashProtector" 19 | s.version = "1.2.0" 20 | s.summary = "An Global protection scheme." 21 | 22 | # This description is used to generate tags and improve search results. 23 | # * Think: What does it do? Why did you write it? What is the focus? 24 | # * Try to keep it short, snappy and to the point. 25 | # * Write the description between the DESC delimiters below. 26 | # * Finally, don't worry about the indent, CocoaPods strips it! 27 | s.description = 'Global protection scheme. 安全的全局防护方案' 28 | 29 | s.homepage = "https://github.com/JZJJZJ" 30 | # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" 31 | 32 | 33 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 34 | # 35 | # Licensing your code is important. See http://choosealicense.com for more info. 36 | # CocoaPods will detect a license file if there is a named LICENSE* 37 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 38 | # 39 | 40 | s.license = "MIT" 41 | # s.license = { :type => "MIT", :file => "FILE_LICENSE" } 42 | 43 | 44 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 45 | # 46 | # Specify the authors of the library, with email addresses. Email addresses 47 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 48 | # accepts just a name if you'd rather not provide an email address. 49 | # 50 | # Specify a social_media_url where others can refer to, for example a twitter 51 | # profile URL. 52 | # 53 | 54 | s.author = { "“jiang.zijia@immomo.com”" => "“jiang.zijia@immomo.com”" } 55 | # Or just: s.author = "“jiang.zijia@immomo.com”" 56 | # s.authors = { "“jiang.zijia@immomo.com”" => "“jiang.zijia@immomo.com”" } 57 | # s.social_media_url = "http://twitter.com/“jiang.zijia@immomo.com”" 58 | 59 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 60 | # 61 | # If this Pod runs only on iOS or OS X, then specify the platform and 62 | # the deployment target. You can optionally include the target after the platform. 63 | # 64 | 65 | # s.platform = :ios 66 | # s.platform = :ios, "5.0" 67 | 68 | # When using multiple platforms 69 | # s.ios.deployment_target = "5.0" 70 | # s.osx.deployment_target = "10.7" 71 | # s.watchos.deployment_target = "2.0" 72 | # s.tvos.deployment_target = "9.0" 73 | 74 | 75 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 76 | # 77 | # Specify the location from where the source should be retrieved. 78 | # Supports git, hg, bzr, svn and HTTP. 79 | # 80 | 81 | s.source = { :git => "https://github.com/JZJJZJ/MSCrashProtector.git", :tag => "#{s.version}" } 82 | 83 | 84 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 85 | # 86 | # CocoaPods is smart about how it includes source code. For source files 87 | # giving a folder will include any swift, h, m, mm, c & cpp files. 88 | # For header files it will include any header in the folder. 89 | # Not including the public_header_files will make all headers public. 90 | # 91 | 92 | s.source_files = "MSCrashProtector/{NS,MS,UI}*.{h,m}" 93 | s.exclude_files = "Classes/Exclude" 94 | 95 | # s.public_header_files = "Classes/**/*.h" 96 | 97 | 98 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 99 | # 100 | # A list of resources included with the Pod. These are copied into the 101 | # target bundle with a build phase script. Anything else will be cleaned. 102 | # You can preserve files from being cleaned, please don't preserve 103 | # non-essential files like tests, examples and documentation. 104 | # 105 | 106 | # s.resource = "icon.png" 107 | # s.resources = "Resources/*.png" 108 | 109 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 110 | 111 | 112 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 113 | # 114 | # Link your library with frameworks, or libraries. Libraries do not include 115 | # the lib prefix of their name. 116 | # 117 | 118 | # s.framework = "SomeFramework" 119 | # s.frameworks = "SomeFramework", "AnotherFramework" 120 | 121 | # s.library = "iconv" 122 | # s.libraries = "iconv", "xml2" 123 | 124 | 125 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 126 | # 127 | # If your library depends on compiler flags you can set them in the xcconfig hash 128 | # where they will only apply to your library. If you depend on other Podspecs 129 | # you can include multiple dependencies to ensure it works. 130 | 131 | # s.requires_arc = true 132 | 133 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 134 | # s.dependency "JSONKit", "~> 1.4" 135 | 136 | end 137 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-MSCrashDemo/Pods-MSCrashDemo-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 12 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 13 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 14 | 15 | case "${TARGETED_DEVICE_FAMILY}" in 16 | 1,2) 17 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 18 | ;; 19 | 1) 20 | TARGET_DEVICE_ARGS="--target-device iphone" 21 | ;; 22 | 2) 23 | TARGET_DEVICE_ARGS="--target-device ipad" 24 | ;; 25 | 3) 26 | TARGET_DEVICE_ARGS="--target-device tv" 27 | ;; 28 | 4) 29 | TARGET_DEVICE_ARGS="--target-device watch" 30 | ;; 31 | *) 32 | TARGET_DEVICE_ARGS="--target-device mac" 33 | ;; 34 | esac 35 | 36 | install_resource() 37 | { 38 | if [[ "$1" = /* ]] ; then 39 | RESOURCE_PATH="$1" 40 | else 41 | RESOURCE_PATH="${PODS_ROOT}/$1" 42 | fi 43 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 44 | cat << EOM 45 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 46 | EOM 47 | exit 1 48 | fi 49 | case $RESOURCE_PATH in 50 | *.storyboard) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 53 | ;; 54 | *.xib) 55 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 56 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 57 | ;; 58 | *.framework) 59 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 60 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 61 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 62 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 63 | ;; 64 | *.xcdatamodel) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 67 | ;; 68 | *.xcdatamodeld) 69 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 70 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 71 | ;; 72 | *.xcmappingmodel) 73 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 74 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 75 | ;; 76 | *.xcassets) 77 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 78 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 79 | ;; 80 | *) 81 | echo "$RESOURCE_PATH" || true 82 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 83 | ;; 84 | esac 85 | } 86 | 87 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 89 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 90 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 91 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 92 | fi 93 | rm -f "$RESOURCES_TO_COPY" 94 | 95 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 96 | then 97 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 98 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 99 | while read line; do 100 | if [[ $line != "${PODS_ROOT}*" ]]; then 101 | XCASSET_FILES+=("$line") 102 | fi 103 | done <<<"$OTHER_XCASSETS" 104 | 105 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 106 | fi 107 | -------------------------------------------------------------------------------- /MSCrashProtector/NSDictionary+MSSafe.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+MSSafe.m 3 | // 4 | // 5 | // Created by J on 2014/2/26. 6 | // Copyright © 2014年 J. All rights reserved. 7 | // 8 | 9 | #import "NSDictionary+MSSafe.h" 10 | 11 | @implementation NSDictionary (MSSafe) 12 | 13 | - (id)objectForKey:(NSString *)aKey kindOfClass:(Class)aClass { 14 | id object = [self objectForKey:aKey]; 15 | if (object && [object isKindOfClass:aClass]) { 16 | return object; 17 | } 18 | return nil; 19 | } 20 | - (id)objectForKey:(NSString *)aKey memberOfClass:(Class)aClass { 21 | id object = [self objectForKey:aKey]; 22 | if (object && [object isMemberOfClass:aClass]) { 23 | return object; 24 | } 25 | return nil; 26 | } 27 | 28 | - (id)objectForKey:(NSString *)aKey defaultValue:(id)value{ 29 | 30 | id object = [self objectForKey:aKey]; 31 | if(!object){ 32 | object = value; 33 | } 34 | return object; 35 | } 36 | 37 | - (NSString *)stringForKey:(NSString *)aKey defaultValue:(NSString *)value{ 38 | 39 | id object = [self objectForKey:aKey kindOfClass:NSString.class]; 40 | if(!object){ 41 | object = value; 42 | } 43 | return object; 44 | } 45 | 46 | - (NSArray *)arrayForKey:(NSString *)aKey defaultValue:(NSArray *)value{ 47 | 48 | id object = [self objectForKey:aKey kindOfClass:NSArray.class]; 49 | if(!object){ 50 | object = value; 51 | } 52 | return object; 53 | } 54 | 55 | - (NSDictionary *)dictionaryForKey:(NSString *)aKey defaultValue:(NSDictionary *)value{ 56 | 57 | id object = [self objectForKey:aKey kindOfClass:NSDictionary.class]; 58 | if(!object){ 59 | object = value; 60 | } 61 | return object; 62 | } 63 | 64 | - (NSData *)dataForKey:(NSString *)aKey defaultValue:(NSData *)value{ 65 | 66 | id object = [self objectForKey:aKey kindOfClass:NSData.class]; 67 | if(!object){ 68 | object = value; 69 | } 70 | return object; 71 | } 72 | 73 | - (NSDate *)dateForKey:(NSString *)aKey defaultValue:(NSDate *)value{ 74 | 75 | id object = [self objectForKey:aKey kindOfClass:NSDate.class]; 76 | if(!object){ 77 | object = value; 78 | } 79 | return object; 80 | } 81 | 82 | - (NSNumber *)numberForKey:(NSString *)aKey defaultValue:(NSNumber *)value{ 83 | 84 | id object = [self objectForKey:aKey kindOfClass:NSNumber.class]; 85 | if(!object){ 86 | object = value; 87 | } 88 | return object; 89 | } 90 | 91 | - (NSUInteger)unsignedIntegerForKey:(NSString *)aKey defaultValue:(NSUInteger)value{ 92 | 93 | NSUInteger result = value; 94 | id object = [self objectForKey:aKey kindOfClass:NSNumber.class] ?: [self objectForKey:aKey kindOfClass:NSString.class]; 95 | if(object){ 96 | result = [object unsignedIntegerValue]; 97 | } 98 | return result; 99 | } 100 | 101 | - (NSInteger)integerForKey:(NSString *)aKey defaultValue:(NSInteger)value{ 102 | 103 | NSInteger result = value; 104 | id object = [self objectForKey:aKey kindOfClass:NSNumber.class] ?: [self objectForKey:aKey kindOfClass:NSString.class]; 105 | if(object){ 106 | result = [object integerValue]; 107 | } 108 | return result; 109 | } 110 | 111 | - (float)floatForKey:(NSString *)aKey defaultValue:(float)value{ 112 | 113 | float result = value; 114 | id object = [self objectForKey:aKey kindOfClass:NSNumber.class] ?: [self objectForKey:aKey kindOfClass:NSString.class]; 115 | if(object){ 116 | result = [object floatValue]; 117 | } 118 | return result; 119 | } 120 | 121 | - (double)doubleForKey:(NSString *)aKey defaultValue:(double)value{ 122 | 123 | double result = value; 124 | id object = [self objectForKey:aKey kindOfClass:NSNumber.class] ?: [self objectForKey:aKey kindOfClass:NSString.class]; 125 | if(object){ 126 | result = [object doubleValue]; 127 | } 128 | return result; 129 | } 130 | 131 | - (long long)longLongValueForKey:(NSString *)aKey defaultValue:(long long)value{ 132 | 133 | long long result = value; 134 | id object = [self objectForKey:aKey kindOfClass:NSNumber.class] ?: [self objectForKey:aKey kindOfClass:NSString.class]; 135 | if(object){ 136 | result = [object longLongValue]; 137 | } 138 | return result; 139 | } 140 | 141 | - (BOOL)boolForKey:(NSString *)aKey defaultValue:(BOOL)value{ 142 | 143 | BOOL result = value; 144 | id object = [self objectForKey:aKey kindOfClass:NSNumber.class] ?: [self objectForKey:aKey kindOfClass:NSString.class]; 145 | if(object){ 146 | result = [object boolValue]; 147 | } 148 | return result; 149 | } 150 | 151 | - (int)intForKey:(NSString *)aKey defaultValue:(int)value{ 152 | 153 | int result = value; 154 | id object = [self objectForKey:aKey kindOfClass:NSNumber.class] ?: [self objectForKey:aKey kindOfClass:NSString.class]; 155 | if(object){ 156 | result = [object intValue]; 157 | } 158 | return result; 159 | } 160 | 161 | @end 162 | 163 | 164 | @implementation NSMutableDictionary (MSSafe) 165 | 166 | - (void)setObjectSafe:(id)value forKey:(id)aKey{ 167 | 168 | if(value&&aKey){ 169 | [self setObject:value forKey:aKey]; 170 | } 171 | } 172 | - (void)setString:(NSString *)value forKey:(NSString *)aKey{ 173 | 174 | if([value isKindOfClass:NSString.class]&& 175 | [aKey isKindOfClass:NSString.class]){ 176 | 177 | [self setObject:value forKey:aKey]; 178 | } 179 | } 180 | 181 | - (void)setNumber:(NSNumber *)value forKey:(NSString *)aKey{ 182 | 183 | if([value isKindOfClass:NSNumber.class]&& 184 | [aKey isKindOfClass:NSString.class]){ 185 | 186 | [self setObject:value forKey:aKey]; 187 | } 188 | } 189 | 190 | - (void)setInteger:(NSInteger)value forKey:(NSString *)aKey{ 191 | 192 | if([aKey isKindOfClass:NSString.class]){ 193 | [self setObject:@(value) forKey:aKey]; 194 | } 195 | } 196 | 197 | - (void)setInt:(int)value forKey:(NSString *)aKey{ 198 | 199 | if([aKey isKindOfClass:NSString.class]){ 200 | [self setObject:@(value) forKey:aKey]; 201 | } 202 | } 203 | 204 | - (void)setFloat:(float)value forKey:(NSString *)aKey{ 205 | 206 | if([aKey isKindOfClass:NSString.class]){ 207 | [self setObject:@(value) forKey:aKey]; 208 | } 209 | } 210 | 211 | - (void)setDouble:(double)value forKey:(NSString *)aKey{ 212 | 213 | if([aKey isKindOfClass:NSString.class]){ 214 | [self setObject:@(value) forKey:aKey]; 215 | } 216 | } 217 | 218 | - (void)setLongLongValue:(long long)value forKey:(NSString *)aKey{ 219 | 220 | if([aKey isKindOfClass:NSString.class]){ 221 | [self setObject:@(value) forKey:aKey]; 222 | } 223 | } 224 | 225 | - (void)setBool:(BOOL)value forKey:(NSString *)aKey{ 226 | 227 | if([aKey isKindOfClass:NSString.class]){ 228 | [self setObject:@(value) forKey:aKey]; 229 | } 230 | } 231 | 232 | @end 233 | -------------------------------------------------------------------------------- /Pods/MSCrashProtector/MSCrashProtector/NSDictionary+MSSafe.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+MSSafe.m 3 | // 4 | // 5 | // Created by J on 2013/2/26. 6 | // Copyright © 2013年 J. All rights reserved. 7 | // 8 | 9 | #import "NSDictionary+MSSafe.h" 10 | 11 | @implementation NSDictionary (MSSafe) 12 | 13 | - (id)objectForKey:(NSString *)aKey kindOfClass:(Class)aClass { 14 | id object = [self objectForKey:aKey]; 15 | if (object && [object isKindOfClass:aClass]) { 16 | return object; 17 | } 18 | return nil; 19 | } 20 | - (id)objectForKey:(NSString *)aKey memberOfClass:(Class)aClass { 21 | id object = [self objectForKey:aKey]; 22 | if (object && [object isMemberOfClass:aClass]) { 23 | return object; 24 | } 25 | return nil; 26 | } 27 | 28 | - (id)objectForKey:(NSString *)aKey defaultValue:(id)value{ 29 | 30 | id object = [self objectForKey:aKey]; 31 | if(!object){ 32 | object = value; 33 | } 34 | return object; 35 | } 36 | 37 | - (NSString *)stringForKey:(NSString *)aKey defaultValue:(NSString *)value{ 38 | 39 | id object = [self objectForKey:aKey kindOfClass:NSString.class]; 40 | if(!object){ 41 | object = value; 42 | } 43 | return object; 44 | } 45 | 46 | - (NSArray *)arrayForKey:(NSString *)aKey defaultValue:(NSArray *)value{ 47 | 48 | id object = [self objectForKey:aKey kindOfClass:NSArray.class]; 49 | if(!object){ 50 | object = value; 51 | } 52 | return object; 53 | } 54 | 55 | - (NSDictionary *)dictionaryForKey:(NSString *)aKey defaultValue:(NSDictionary *)value{ 56 | 57 | id object = [self objectForKey:aKey kindOfClass:NSDictionary.class]; 58 | if(!object){ 59 | object = value; 60 | } 61 | return object; 62 | } 63 | 64 | - (NSData *)dataForKey:(NSString *)aKey defaultValue:(NSData *)value{ 65 | 66 | id object = [self objectForKey:aKey kindOfClass:NSData.class]; 67 | if(!object){ 68 | object = value; 69 | } 70 | return object; 71 | } 72 | 73 | - (NSDate *)dateForKey:(NSString *)aKey defaultValue:(NSDate *)value{ 74 | 75 | id object = [self objectForKey:aKey kindOfClass:NSDate.class]; 76 | if(!object){ 77 | object = value; 78 | } 79 | return object; 80 | } 81 | 82 | - (NSNumber *)numberForKey:(NSString *)aKey defaultValue:(NSNumber *)value{ 83 | 84 | id object = [self objectForKey:aKey kindOfClass:NSNumber.class]; 85 | if(!object){ 86 | object = value; 87 | } 88 | return object; 89 | } 90 | 91 | - (NSUInteger)unsignedIntegerForKey:(NSString *)aKey defaultValue:(NSUInteger)value{ 92 | 93 | NSUInteger result = value; 94 | id object = [self objectForKey:aKey kindOfClass:NSNumber.class] ?: [self objectForKey:aKey kindOfClass:NSString.class]; 95 | if(object){ 96 | result = [object unsignedIntegerValue]; 97 | } 98 | return result; 99 | } 100 | 101 | - (NSInteger)integerForKey:(NSString *)aKey defaultValue:(NSInteger)value{ 102 | 103 | NSInteger result = value; 104 | id object = [self objectForKey:aKey kindOfClass:NSNumber.class] ?: [self objectForKey:aKey kindOfClass:NSString.class]; 105 | if(object){ 106 | result = [object integerValue]; 107 | } 108 | return result; 109 | } 110 | 111 | - (float)floatForKey:(NSString *)aKey defaultValue:(float)value{ 112 | 113 | float result = value; 114 | id object = [self objectForKey:aKey kindOfClass:NSNumber.class] ?: [self objectForKey:aKey kindOfClass:NSString.class]; 115 | if(object){ 116 | result = [object floatValue]; 117 | } 118 | return result; 119 | } 120 | 121 | - (double)doubleForKey:(NSString *)aKey defaultValue:(double)value{ 122 | 123 | double result = value; 124 | id object = [self objectForKey:aKey kindOfClass:NSNumber.class] ?: [self objectForKey:aKey kindOfClass:NSString.class]; 125 | if(object){ 126 | result = [object doubleValue]; 127 | } 128 | return result; 129 | } 130 | 131 | - (long long)longLongValueForKey:(NSString *)aKey defaultValue:(long long)value{ 132 | 133 | long long result = value; 134 | id object = [self objectForKey:aKey kindOfClass:NSNumber.class] ?: [self objectForKey:aKey kindOfClass:NSString.class]; 135 | if(object){ 136 | result = [object longLongValue]; 137 | } 138 | return result; 139 | } 140 | 141 | - (BOOL)boolForKey:(NSString *)aKey defaultValue:(BOOL)value{ 142 | 143 | BOOL result = value; 144 | id object = [self objectForKey:aKey kindOfClass:NSNumber.class] ?: [self objectForKey:aKey kindOfClass:NSString.class]; 145 | if(object){ 146 | result = [object boolValue]; 147 | } 148 | return result; 149 | } 150 | 151 | - (int)intForKey:(NSString *)aKey defaultValue:(int)value{ 152 | 153 | int result = value; 154 | id object = [self objectForKey:aKey kindOfClass:NSNumber.class] ?: [self objectForKey:aKey kindOfClass:NSString.class]; 155 | if(object){ 156 | result = [object intValue]; 157 | } 158 | return result; 159 | } 160 | 161 | @end 162 | 163 | 164 | @implementation NSMutableDictionary (MSSafe) 165 | 166 | - (void)setObjectSafe:(id)value forKey:(id)aKey{ 167 | 168 | if(value&&aKey){ 169 | [self setObject:value forKey:aKey]; 170 | } 171 | } 172 | - (void)setString:(NSString *)value forKey:(NSString *)aKey{ 173 | 174 | if([value isKindOfClass:NSString.class]&& 175 | [aKey isKindOfClass:NSString.class]){ 176 | 177 | [self setObject:value forKey:aKey]; 178 | } 179 | } 180 | 181 | - (void)setNumber:(NSNumber *)value forKey:(NSString *)aKey{ 182 | 183 | if([value isKindOfClass:NSNumber.class]&& 184 | [aKey isKindOfClass:NSString.class]){ 185 | 186 | [self setObject:value forKey:aKey]; 187 | } 188 | } 189 | 190 | - (void)setInteger:(NSInteger)value forKey:(NSString *)aKey{ 191 | 192 | if([aKey isKindOfClass:NSString.class]){ 193 | [self setObject:@(value) forKey:aKey]; 194 | } 195 | } 196 | 197 | - (void)setInt:(int)value forKey:(NSString *)aKey{ 198 | 199 | if([aKey isKindOfClass:NSString.class]){ 200 | [self setObject:@(value) forKey:aKey]; 201 | } 202 | } 203 | 204 | - (void)setFloat:(float)value forKey:(NSString *)aKey{ 205 | 206 | if([aKey isKindOfClass:NSString.class]){ 207 | [self setObject:@(value) forKey:aKey]; 208 | } 209 | } 210 | 211 | - (void)setDouble:(double)value forKey:(NSString *)aKey{ 212 | 213 | if([aKey isKindOfClass:NSString.class]){ 214 | [self setObject:@(value) forKey:aKey]; 215 | } 216 | } 217 | 218 | - (void)setLongLongValue:(long long)value forKey:(NSString *)aKey{ 219 | 220 | if([aKey isKindOfClass:NSString.class]){ 221 | [self setObject:@(value) forKey:aKey]; 222 | } 223 | } 224 | 225 | - (void)setBool:(BOOL)value forKey:(NSString *)aKey{ 226 | 227 | if([aKey isKindOfClass:NSString.class]){ 228 | [self setObject:@(value) forKey:aKey]; 229 | } 230 | } 231 | 232 | @end 233 | -------------------------------------------------------------------------------- /MSCrashDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 09E1E1422044421C00EC5259 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 09E1E1412044421C00EC5259 /* AppDelegate.m */; }; 11 | 09E1E1452044421C00EC5259 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 09E1E1442044421C00EC5259 /* ViewController.m */; }; 12 | 09E1E14A2044421C00EC5259 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 09E1E1492044421C00EC5259 /* Assets.xcassets */; }; 13 | 09E1E1502044421C00EC5259 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 09E1E14F2044421C00EC5259 /* main.m */; }; 14 | CCADD2FCF21C895104E1C0D3 /* libPods-MSCrashDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F98124F8741E3280FB2CBF0C /* libPods-MSCrashDemo.a */; }; 15 | /* End PBXBuildFile section */ 16 | 17 | /* Begin PBXFileReference section */ 18 | 09E1E13D2044421C00EC5259 /* MSCrashDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MSCrashDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 19 | 09E1E1402044421C00EC5259 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 20 | 09E1E1412044421C00EC5259 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 21 | 09E1E1432044421C00EC5259 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 22 | 09E1E1442044421C00EC5259 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 23 | 09E1E1492044421C00EC5259 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 24 | 09E1E14E2044421C00EC5259 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 25 | 09E1E14F2044421C00EC5259 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 26 | 16D2B0721F991CC12B33F94E /* Pods-MSCrashDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MSCrashDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-MSCrashDemo/Pods-MSCrashDemo.release.xcconfig"; sourceTree = ""; }; 27 | 48B252931E82C815C57CAFFD /* Pods-MSCrashDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MSCrashDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MSCrashDemo/Pods-MSCrashDemo.debug.xcconfig"; sourceTree = ""; }; 28 | F98124F8741E3280FB2CBF0C /* libPods-MSCrashDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MSCrashDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | 09E1E13A2044421C00EC5259 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | CCADD2FCF21C895104E1C0D3 /* libPods-MSCrashDemo.a in Frameworks */, 37 | ); 38 | runOnlyForDeploymentPostprocessing = 0; 39 | }; 40 | /* End PBXFrameworksBuildPhase section */ 41 | 42 | /* Begin PBXGroup section */ 43 | 09E1E1342044421C00EC5259 = { 44 | isa = PBXGroup; 45 | children = ( 46 | 09E1E13F2044421C00EC5259 /* MSCrashDemo */, 47 | 09E1E13E2044421C00EC5259 /* Products */, 48 | 78E47F8406099F5E250033E8 /* Pods */, 49 | 6E1BDC8C39AFDC23FCE71614 /* Frameworks */, 50 | ); 51 | sourceTree = ""; 52 | }; 53 | 09E1E13E2044421C00EC5259 /* Products */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | 09E1E13D2044421C00EC5259 /* MSCrashDemo.app */, 57 | ); 58 | name = Products; 59 | sourceTree = ""; 60 | }; 61 | 09E1E13F2044421C00EC5259 /* MSCrashDemo */ = { 62 | isa = PBXGroup; 63 | children = ( 64 | 09E1E1432044421C00EC5259 /* ViewController.h */, 65 | 09E1E1442044421C00EC5259 /* ViewController.m */, 66 | 09E1E14E2044421C00EC5259 /* Info.plist */, 67 | 09E1E1402044421C00EC5259 /* AppDelegate.h */, 68 | 09E1E1412044421C00EC5259 /* AppDelegate.m */, 69 | 09E1E1492044421C00EC5259 /* Assets.xcassets */, 70 | 09E1E14F2044421C00EC5259 /* main.m */, 71 | ); 72 | path = MSCrashDemo; 73 | sourceTree = ""; 74 | }; 75 | 6E1BDC8C39AFDC23FCE71614 /* Frameworks */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | F98124F8741E3280FB2CBF0C /* libPods-MSCrashDemo.a */, 79 | ); 80 | name = Frameworks; 81 | sourceTree = ""; 82 | }; 83 | 78E47F8406099F5E250033E8 /* Pods */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 48B252931E82C815C57CAFFD /* Pods-MSCrashDemo.debug.xcconfig */, 87 | 16D2B0721F991CC12B33F94E /* Pods-MSCrashDemo.release.xcconfig */, 88 | ); 89 | name = Pods; 90 | sourceTree = ""; 91 | }; 92 | /* End PBXGroup section */ 93 | 94 | /* Begin PBXNativeTarget section */ 95 | 09E1E13C2044421C00EC5259 /* MSCrashDemo */ = { 96 | isa = PBXNativeTarget; 97 | buildConfigurationList = 09E1E1532044421C00EC5259 /* Build configuration list for PBXNativeTarget "MSCrashDemo" */; 98 | buildPhases = ( 99 | 1856C25E077E114A168344B2 /* [CP] Check Pods Manifest.lock */, 100 | 09E1E1392044421C00EC5259 /* Sources */, 101 | 09E1E13A2044421C00EC5259 /* Frameworks */, 102 | 09E1E13B2044421C00EC5259 /* Resources */, 103 | DD9CC300CB306BF4B9D4E13F /* [CP] Embed Pods Frameworks */, 104 | A888170805A65022957F7DE3 /* [CP] Copy Pods Resources */, 105 | ); 106 | buildRules = ( 107 | ); 108 | dependencies = ( 109 | ); 110 | name = MSCrashDemo; 111 | productName = MSCrashDemo; 112 | productReference = 09E1E13D2044421C00EC5259 /* MSCrashDemo.app */; 113 | productType = "com.apple.product-type.application"; 114 | }; 115 | /* End PBXNativeTarget section */ 116 | 117 | /* Begin PBXProject section */ 118 | 09E1E1352044421C00EC5259 /* Project object */ = { 119 | isa = PBXProject; 120 | attributes = { 121 | LastUpgradeCheck = 0900; 122 | ORGANIZATIONNAME = J; 123 | TargetAttributes = { 124 | 09E1E13C2044421C00EC5259 = { 125 | CreatedOnToolsVersion = 9.0; 126 | ProvisioningStyle = Manual; 127 | }; 128 | }; 129 | }; 130 | buildConfigurationList = 09E1E1382044421C00EC5259 /* Build configuration list for PBXProject "MSCrashDemo" */; 131 | compatibilityVersion = "Xcode 8.0"; 132 | developmentRegion = en; 133 | hasScannedForEncodings = 0; 134 | knownRegions = ( 135 | en, 136 | Base, 137 | ); 138 | mainGroup = 09E1E1342044421C00EC5259; 139 | productRefGroup = 09E1E13E2044421C00EC5259 /* Products */; 140 | projectDirPath = ""; 141 | projectRoot = ""; 142 | targets = ( 143 | 09E1E13C2044421C00EC5259 /* MSCrashDemo */, 144 | ); 145 | }; 146 | /* End PBXProject section */ 147 | 148 | /* Begin PBXResourcesBuildPhase section */ 149 | 09E1E13B2044421C00EC5259 /* Resources */ = { 150 | isa = PBXResourcesBuildPhase; 151 | buildActionMask = 2147483647; 152 | files = ( 153 | 09E1E14A2044421C00EC5259 /* Assets.xcassets in Resources */, 154 | ); 155 | runOnlyForDeploymentPostprocessing = 0; 156 | }; 157 | /* End PBXResourcesBuildPhase section */ 158 | 159 | /* Begin PBXShellScriptBuildPhase section */ 160 | 1856C25E077E114A168344B2 /* [CP] Check Pods Manifest.lock */ = { 161 | isa = PBXShellScriptBuildPhase; 162 | buildActionMask = 2147483647; 163 | files = ( 164 | ); 165 | inputPaths = ( 166 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 167 | "${PODS_ROOT}/Manifest.lock", 168 | ); 169 | name = "[CP] Check Pods Manifest.lock"; 170 | outputPaths = ( 171 | "$(DERIVED_FILE_DIR)/Pods-MSCrashDemo-checkManifestLockResult.txt", 172 | ); 173 | runOnlyForDeploymentPostprocessing = 0; 174 | shellPath = /bin/sh; 175 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 176 | showEnvVarsInLog = 0; 177 | }; 178 | A888170805A65022957F7DE3 /* [CP] Copy Pods Resources */ = { 179 | isa = PBXShellScriptBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | ); 183 | inputPaths = ( 184 | ); 185 | name = "[CP] Copy Pods Resources"; 186 | outputPaths = ( 187 | ); 188 | runOnlyForDeploymentPostprocessing = 0; 189 | shellPath = /bin/sh; 190 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MSCrashDemo/Pods-MSCrashDemo-resources.sh\"\n"; 191 | showEnvVarsInLog = 0; 192 | }; 193 | DD9CC300CB306BF4B9D4E13F /* [CP] Embed Pods Frameworks */ = { 194 | isa = PBXShellScriptBuildPhase; 195 | buildActionMask = 2147483647; 196 | files = ( 197 | ); 198 | inputPaths = ( 199 | ); 200 | name = "[CP] Embed Pods Frameworks"; 201 | outputPaths = ( 202 | ); 203 | runOnlyForDeploymentPostprocessing = 0; 204 | shellPath = /bin/sh; 205 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MSCrashDemo/Pods-MSCrashDemo-frameworks.sh\"\n"; 206 | showEnvVarsInLog = 0; 207 | }; 208 | /* End PBXShellScriptBuildPhase section */ 209 | 210 | /* Begin PBXSourcesBuildPhase section */ 211 | 09E1E1392044421C00EC5259 /* Sources */ = { 212 | isa = PBXSourcesBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | 09E1E1452044421C00EC5259 /* ViewController.m in Sources */, 216 | 09E1E1502044421C00EC5259 /* main.m in Sources */, 217 | 09E1E1422044421C00EC5259 /* AppDelegate.m in Sources */, 218 | ); 219 | runOnlyForDeploymentPostprocessing = 0; 220 | }; 221 | /* End PBXSourcesBuildPhase section */ 222 | 223 | /* Begin XCBuildConfiguration section */ 224 | 09E1E1512044421C00EC5259 /* Debug */ = { 225 | isa = XCBuildConfiguration; 226 | buildSettings = { 227 | ALWAYS_SEARCH_USER_PATHS = NO; 228 | CLANG_ANALYZER_NONNULL = YES; 229 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 230 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 231 | CLANG_CXX_LIBRARY = "libc++"; 232 | CLANG_ENABLE_MODULES = YES; 233 | CLANG_ENABLE_OBJC_ARC = YES; 234 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 235 | CLANG_WARN_BOOL_CONVERSION = YES; 236 | CLANG_WARN_COMMA = YES; 237 | CLANG_WARN_CONSTANT_CONVERSION = YES; 238 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 239 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 240 | CLANG_WARN_EMPTY_BODY = YES; 241 | CLANG_WARN_ENUM_CONVERSION = YES; 242 | CLANG_WARN_INFINITE_RECURSION = YES; 243 | CLANG_WARN_INT_CONVERSION = YES; 244 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 245 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 246 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 247 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 248 | CLANG_WARN_STRICT_PROTOTYPES = YES; 249 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 250 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 251 | CLANG_WARN_UNREACHABLE_CODE = YES; 252 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 253 | CODE_SIGN_IDENTITY = "iPhone Developer"; 254 | COPY_PHASE_STRIP = NO; 255 | DEBUG_INFORMATION_FORMAT = dwarf; 256 | ENABLE_STRICT_OBJC_MSGSEND = YES; 257 | ENABLE_TESTABILITY = YES; 258 | GCC_C_LANGUAGE_STANDARD = gnu11; 259 | GCC_DYNAMIC_NO_PIC = NO; 260 | GCC_NO_COMMON_BLOCKS = YES; 261 | GCC_OPTIMIZATION_LEVEL = 0; 262 | GCC_PREPROCESSOR_DEFINITIONS = ( 263 | "DEBUG=1", 264 | "$(inherited)", 265 | ); 266 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 267 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 268 | GCC_WARN_UNDECLARED_SELECTOR = YES; 269 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 270 | GCC_WARN_UNUSED_FUNCTION = YES; 271 | GCC_WARN_UNUSED_VARIABLE = YES; 272 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 273 | MTL_ENABLE_DEBUG_INFO = YES; 274 | ONLY_ACTIVE_ARCH = YES; 275 | SDKROOT = iphoneos; 276 | }; 277 | name = Debug; 278 | }; 279 | 09E1E1522044421C00EC5259 /* Release */ = { 280 | isa = XCBuildConfiguration; 281 | buildSettings = { 282 | ALWAYS_SEARCH_USER_PATHS = NO; 283 | CLANG_ANALYZER_NONNULL = YES; 284 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 285 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 286 | CLANG_CXX_LIBRARY = "libc++"; 287 | CLANG_ENABLE_MODULES = YES; 288 | CLANG_ENABLE_OBJC_ARC = YES; 289 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 290 | CLANG_WARN_BOOL_CONVERSION = YES; 291 | CLANG_WARN_COMMA = YES; 292 | CLANG_WARN_CONSTANT_CONVERSION = YES; 293 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 294 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 295 | CLANG_WARN_EMPTY_BODY = YES; 296 | CLANG_WARN_ENUM_CONVERSION = YES; 297 | CLANG_WARN_INFINITE_RECURSION = YES; 298 | CLANG_WARN_INT_CONVERSION = YES; 299 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 300 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 301 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 302 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 303 | CLANG_WARN_STRICT_PROTOTYPES = YES; 304 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 305 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 306 | CLANG_WARN_UNREACHABLE_CODE = YES; 307 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 308 | CODE_SIGN_IDENTITY = "iPhone Developer"; 309 | COPY_PHASE_STRIP = NO; 310 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 311 | ENABLE_NS_ASSERTIONS = NO; 312 | ENABLE_STRICT_OBJC_MSGSEND = YES; 313 | GCC_C_LANGUAGE_STANDARD = gnu11; 314 | GCC_NO_COMMON_BLOCKS = YES; 315 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 316 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 317 | GCC_WARN_UNDECLARED_SELECTOR = YES; 318 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 319 | GCC_WARN_UNUSED_FUNCTION = YES; 320 | GCC_WARN_UNUSED_VARIABLE = YES; 321 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 322 | MTL_ENABLE_DEBUG_INFO = NO; 323 | SDKROOT = iphoneos; 324 | VALIDATE_PRODUCT = YES; 325 | }; 326 | name = Release; 327 | }; 328 | 09E1E1542044421C00EC5259 /* Debug */ = { 329 | isa = XCBuildConfiguration; 330 | baseConfigurationReference = 48B252931E82C815C57CAFFD /* Pods-MSCrashDemo.debug.xcconfig */; 331 | buildSettings = { 332 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 333 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 334 | CODE_SIGN_STYLE = Manual; 335 | DEVELOPMENT_TEAM = ""; 336 | INFOPLIST_FILE = MSCrashDemo/Info.plist; 337 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 338 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 339 | PRODUCT_BUNDLE_IDENTIFIER = com.jzj.MSCrashDemo; 340 | PRODUCT_NAME = "$(TARGET_NAME)"; 341 | PROVISIONING_PROFILE = ""; 342 | PROVISIONING_PROFILE_SPECIFIER = ""; 343 | TARGETED_DEVICE_FAMILY = 1; 344 | }; 345 | name = Debug; 346 | }; 347 | 09E1E1552044421C00EC5259 /* Release */ = { 348 | isa = XCBuildConfiguration; 349 | baseConfigurationReference = 16D2B0721F991CC12B33F94E /* Pods-MSCrashDemo.release.xcconfig */; 350 | buildSettings = { 351 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 352 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 353 | CODE_SIGN_STYLE = Manual; 354 | DEVELOPMENT_TEAM = ""; 355 | INFOPLIST_FILE = MSCrashDemo/Info.plist; 356 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 357 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 358 | PRODUCT_BUNDLE_IDENTIFIER = com.jzj.MSCrashDemo; 359 | PRODUCT_NAME = "$(TARGET_NAME)"; 360 | PROVISIONING_PROFILE_SPECIFIER = ""; 361 | TARGETED_DEVICE_FAMILY = 1; 362 | }; 363 | name = Release; 364 | }; 365 | /* End XCBuildConfiguration section */ 366 | 367 | /* Begin XCConfigurationList section */ 368 | 09E1E1382044421C00EC5259 /* Build configuration list for PBXProject "MSCrashDemo" */ = { 369 | isa = XCConfigurationList; 370 | buildConfigurations = ( 371 | 09E1E1512044421C00EC5259 /* Debug */, 372 | 09E1E1522044421C00EC5259 /* Release */, 373 | ); 374 | defaultConfigurationIsVisible = 0; 375 | defaultConfigurationName = Release; 376 | }; 377 | 09E1E1532044421C00EC5259 /* Build configuration list for PBXNativeTarget "MSCrashDemo" */ = { 378 | isa = XCConfigurationList; 379 | buildConfigurations = ( 380 | 09E1E1542044421C00EC5259 /* Debug */, 381 | 09E1E1552044421C00EC5259 /* Release */, 382 | ); 383 | defaultConfigurationIsVisible = 0; 384 | defaultConfigurationName = Release; 385 | }; 386 | /* End XCConfigurationList section */ 387 | }; 388 | rootObject = 09E1E1352044421C00EC5259 /* Project object */; 389 | } 390 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 591300328F7E54613FE66673EA8CE459 /* NSString+MSSafe.m in Sources */ = {isa = PBXBuildFile; fileRef = 85A9B8319E487D0FD84698709E1664C2 /* NSString+MSSafe.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; 11 | 682AA620CC1E30F66299777074B9B60D /* Pods-MSCrashDemo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F5D93CCA3BB3AF9D6ED8BD01B29DBB61 /* Pods-MSCrashDemo-dummy.m */; }; 12 | 72DDA35BE83F05AE843DD7F7FE3E26A9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 13 | 8DCB5C4C03310DCA6D1DD7F98F6F5FC1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 14 | AC8F1272BDD759BB514648014AC18041 /* NSArray+MSSafe.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E4CDD0DDB7A0B4F0226C674BA64A5B6 /* NSArray+MSSafe.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15 | AF7A1D7B60F4F40B695FDB1FC0D61922 /* NSDictionary+MSSafe.h in Headers */ = {isa = PBXBuildFile; fileRef = 972F768833A44A99D9E2BEECFCDDBA9E /* NSDictionary+MSSafe.h */; settings = {ATTRIBUTES = (Public, ); }; }; 16 | D0F87C3780A0D5DD164C34663B14B03D /* NSMutableSet+MSSafe.h in Headers */ = {isa = PBXBuildFile; fileRef = C3BF12570F79B25E1897004EA84313C7 /* NSMutableSet+MSSafe.h */; settings = {ATTRIBUTES = (Public, ); }; }; 17 | DDBFD7E82ABCCC62D953B13A741B0063 /* MSCrashProtector-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8697AB8F1330EDFF94CAE4903CFE67B4 /* MSCrashProtector-dummy.m */; }; 18 | DE2C0A986F48A111BE458413A04277CB /* NSArray+MSSafe.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B884AFA3473C981BB4725864D8E10A5 /* NSArray+MSSafe.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; 19 | E5011515DD9408CFFF82F99CD0655CDD /* NSDictionary+MSSafe.m in Sources */ = {isa = PBXBuildFile; fileRef = CD4A40DCB8AD6BFBE7B3E67189BD122E /* NSDictionary+MSSafe.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; 20 | F43330C4A4B714DA8CBC9469957AA583 /* NSMutableSet+MSSafe.m in Sources */ = {isa = PBXBuildFile; fileRef = 702DBC0ACCBB71EBE14863D3DD22A54A /* NSMutableSet+MSSafe.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; 21 | F6165F49C0D135A01C3640E477A4437C /* MSCrashProtector.h in Headers */ = {isa = PBXBuildFile; fileRef = D44579E4F3AB1AEE805732CC1E4780C7 /* MSCrashProtector.h */; settings = {ATTRIBUTES = (Public, ); }; }; 22 | FF2012E91DF7EEA5CAC81C2B77FCB750 /* NSString+MSSafe.h in Headers */ = {isa = PBXBuildFile; fileRef = 02B7F10A4085F3DE50F6CE28C543E530 /* NSString+MSSafe.h */; settings = {ATTRIBUTES = (Public, ); }; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXContainerItemProxy section */ 26 | 2F8185C8F0F24827941CFF814995FCF3 /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 29 | proxyType = 1; 30 | remoteGlobalIDString = CEABCA343593295C941FD2A4A52FD166; 31 | remoteInfo = MSCrashProtector; 32 | }; 33 | /* End PBXContainerItemProxy section */ 34 | 35 | /* Begin PBXFileReference section */ 36 | 02B7F10A4085F3DE50F6CE28C543E530 /* NSString+MSSafe.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+MSSafe.h"; path = "MSCrashProtector/NSString+MSSafe.h"; sourceTree = ""; }; 37 | 0B884AFA3473C981BB4725864D8E10A5 /* NSArray+MSSafe.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSArray+MSSafe.m"; path = "MSCrashProtector/NSArray+MSSafe.m"; sourceTree = ""; }; 38 | 14B7F393CDB52091A6F1C451345E66F5 /* Pods-MSCrashDemo-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MSCrashDemo-resources.sh"; sourceTree = ""; }; 39 | 2C2B9D0C363C6A103305C70B9F4D9B08 /* Pods-MSCrashDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MSCrashDemo.debug.xcconfig"; sourceTree = ""; }; 40 | 381362E100BEE4D007A9E0F7C08DCF86 /* MSCrashProtector-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MSCrashProtector-prefix.pch"; sourceTree = ""; }; 41 | 59142B689B64952006DA07EF74F1598F /* libMSCrashProtector.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMSCrashProtector.a; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 43 | 6E4CDD0DDB7A0B4F0226C674BA64A5B6 /* NSArray+MSSafe.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+MSSafe.h"; path = "MSCrashProtector/NSArray+MSSafe.h"; sourceTree = ""; }; 44 | 702DBC0ACCBB71EBE14863D3DD22A54A /* NSMutableSet+MSSafe.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSMutableSet+MSSafe.m"; path = "MSCrashProtector/NSMutableSet+MSSafe.m"; sourceTree = ""; }; 45 | 85A9B8319E487D0FD84698709E1664C2 /* NSString+MSSafe.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+MSSafe.m"; path = "MSCrashProtector/NSString+MSSafe.m"; sourceTree = ""; }; 46 | 8697AB8F1330EDFF94CAE4903CFE67B4 /* MSCrashProtector-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "MSCrashProtector-dummy.m"; sourceTree = ""; }; 47 | 8DA14180998A12DE6F7D3E0003AF7D87 /* libPods-MSCrashDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MSCrashDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 49 | 946C7C351660629F31D8AC9EC4A9FEE5 /* Pods-MSCrashDemo-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MSCrashDemo-frameworks.sh"; sourceTree = ""; }; 50 | 972F768833A44A99D9E2BEECFCDDBA9E /* NSDictionary+MSSafe.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+MSSafe.h"; path = "MSCrashProtector/NSDictionary+MSSafe.h"; sourceTree = ""; }; 51 | 97A8D84574B1B38804B33F654E752145 /* Pods-MSCrashDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MSCrashDemo.release.xcconfig"; sourceTree = ""; }; 52 | C3BF12570F79B25E1897004EA84313C7 /* NSMutableSet+MSSafe.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSMutableSet+MSSafe.h"; path = "MSCrashProtector/NSMutableSet+MSSafe.h"; sourceTree = ""; }; 53 | CD4A40DCB8AD6BFBE7B3E67189BD122E /* NSDictionary+MSSafe.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+MSSafe.m"; path = "MSCrashProtector/NSDictionary+MSSafe.m"; sourceTree = ""; }; 54 | D44579E4F3AB1AEE805732CC1E4780C7 /* MSCrashProtector.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MSCrashProtector.h; path = MSCrashProtector/MSCrashProtector.h; sourceTree = ""; }; 55 | E2CD2B71273E120EE478FB6C0B6CC0EE /* MSCrashProtector.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MSCrashProtector.xcconfig; sourceTree = ""; }; 56 | E30E740EE0B4DAE000EA91D582B07402 /* Pods-MSCrashDemo-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-MSCrashDemo-acknowledgements.markdown"; sourceTree = ""; }; 57 | E4186A70B749D03FA907504D2D418B43 /* Pods-MSCrashDemo-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MSCrashDemo-acknowledgements.plist"; sourceTree = ""; }; 58 | F5D93CCA3BB3AF9D6ED8BD01B29DBB61 /* Pods-MSCrashDemo-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-MSCrashDemo-dummy.m"; sourceTree = ""; }; 59 | /* End PBXFileReference section */ 60 | 61 | /* Begin PBXFrameworksBuildPhase section */ 62 | 2E607C04ED4D47F16935E6071C395807 /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | 72DDA35BE83F05AE843DD7F7FE3E26A9 /* Foundation.framework in Frameworks */, 67 | ); 68 | runOnlyForDeploymentPostprocessing = 0; 69 | }; 70 | 9887D60E3DA695DD48EA7CED4E57739C /* Frameworks */ = { 71 | isa = PBXFrameworksBuildPhase; 72 | buildActionMask = 2147483647; 73 | files = ( 74 | 8DCB5C4C03310DCA6D1DD7F98F6F5FC1 /* Foundation.framework in Frameworks */, 75 | ); 76 | runOnlyForDeploymentPostprocessing = 0; 77 | }; 78 | /* End PBXFrameworksBuildPhase section */ 79 | 80 | /* Begin PBXGroup section */ 81 | 0094FB1D4583312E46C6F2BA0AB32082 /* Products */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | 59142B689B64952006DA07EF74F1598F /* libMSCrashProtector.a */, 85 | 8DA14180998A12DE6F7D3E0003AF7D87 /* libPods-MSCrashDemo.a */, 86 | ); 87 | name = Products; 88 | sourceTree = ""; 89 | }; 90 | 2807A466DD05124938890E55BC86AC68 /* MSCrashProtector */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | D44579E4F3AB1AEE805732CC1E4780C7 /* MSCrashProtector.h */, 94 | 6E4CDD0DDB7A0B4F0226C674BA64A5B6 /* NSArray+MSSafe.h */, 95 | 0B884AFA3473C981BB4725864D8E10A5 /* NSArray+MSSafe.m */, 96 | 972F768833A44A99D9E2BEECFCDDBA9E /* NSDictionary+MSSafe.h */, 97 | CD4A40DCB8AD6BFBE7B3E67189BD122E /* NSDictionary+MSSafe.m */, 98 | C3BF12570F79B25E1897004EA84313C7 /* NSMutableSet+MSSafe.h */, 99 | 702DBC0ACCBB71EBE14863D3DD22A54A /* NSMutableSet+MSSafe.m */, 100 | 02B7F10A4085F3DE50F6CE28C543E530 /* NSString+MSSafe.h */, 101 | 85A9B8319E487D0FD84698709E1664C2 /* NSString+MSSafe.m */, 102 | 46AA21059BB5484D801B4D54C6D35127 /* Support Files */, 103 | ); 104 | path = MSCrashProtector; 105 | sourceTree = ""; 106 | }; 107 | 2F456DFF71630F4D5611D21EB9E91379 /* Pods-MSCrashDemo */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | E30E740EE0B4DAE000EA91D582B07402 /* Pods-MSCrashDemo-acknowledgements.markdown */, 111 | E4186A70B749D03FA907504D2D418B43 /* Pods-MSCrashDemo-acknowledgements.plist */, 112 | F5D93CCA3BB3AF9D6ED8BD01B29DBB61 /* Pods-MSCrashDemo-dummy.m */, 113 | 946C7C351660629F31D8AC9EC4A9FEE5 /* Pods-MSCrashDemo-frameworks.sh */, 114 | 14B7F393CDB52091A6F1C451345E66F5 /* Pods-MSCrashDemo-resources.sh */, 115 | 2C2B9D0C363C6A103305C70B9F4D9B08 /* Pods-MSCrashDemo.debug.xcconfig */, 116 | 97A8D84574B1B38804B33F654E752145 /* Pods-MSCrashDemo.release.xcconfig */, 117 | ); 118 | name = "Pods-MSCrashDemo"; 119 | path = "Target Support Files/Pods-MSCrashDemo"; 120 | sourceTree = ""; 121 | }; 122 | 46AA21059BB5484D801B4D54C6D35127 /* Support Files */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | E2CD2B71273E120EE478FB6C0B6CC0EE /* MSCrashProtector.xcconfig */, 126 | 8697AB8F1330EDFF94CAE4903CFE67B4 /* MSCrashProtector-dummy.m */, 127 | 381362E100BEE4D007A9E0F7C08DCF86 /* MSCrashProtector-prefix.pch */, 128 | ); 129 | name = "Support Files"; 130 | path = "../Target Support Files/MSCrashProtector"; 131 | sourceTree = ""; 132 | }; 133 | 7DB346D0F39D3F0E887471402A8071AB = { 134 | isa = PBXGroup; 135 | children = ( 136 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 137 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 138 | DC53B2165F53AA75DFA44F3725707051 /* Pods */, 139 | 0094FB1D4583312E46C6F2BA0AB32082 /* Products */, 140 | EF770F89FCCA459EEA5FB266C0766493 /* Targets Support Files */, 141 | ); 142 | sourceTree = ""; 143 | }; 144 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | D35AF013A5F0BAD4F32504907A52519E /* iOS */, 148 | ); 149 | name = Frameworks; 150 | sourceTree = ""; 151 | }; 152 | D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, 156 | ); 157 | name = iOS; 158 | sourceTree = ""; 159 | }; 160 | DC53B2165F53AA75DFA44F3725707051 /* Pods */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | 2807A466DD05124938890E55BC86AC68 /* MSCrashProtector */, 164 | ); 165 | name = Pods; 166 | sourceTree = ""; 167 | }; 168 | EF770F89FCCA459EEA5FB266C0766493 /* Targets Support Files */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 2F456DFF71630F4D5611D21EB9E91379 /* Pods-MSCrashDemo */, 172 | ); 173 | name = "Targets Support Files"; 174 | sourceTree = ""; 175 | }; 176 | /* End PBXGroup section */ 177 | 178 | /* Begin PBXHeadersBuildPhase section */ 179 | A98DB60A59FF7AD2E83CE407BB52A124 /* Headers */ = { 180 | isa = PBXHeadersBuildPhase; 181 | buildActionMask = 2147483647; 182 | files = ( 183 | F6165F49C0D135A01C3640E477A4437C /* MSCrashProtector.h in Headers */, 184 | AC8F1272BDD759BB514648014AC18041 /* NSArray+MSSafe.h in Headers */, 185 | AF7A1D7B60F4F40B695FDB1FC0D61922 /* NSDictionary+MSSafe.h in Headers */, 186 | D0F87C3780A0D5DD164C34663B14B03D /* NSMutableSet+MSSafe.h in Headers */, 187 | FF2012E91DF7EEA5CAC81C2B77FCB750 /* NSString+MSSafe.h in Headers */, 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | /* End PBXHeadersBuildPhase section */ 192 | 193 | /* Begin PBXNativeTarget section */ 194 | 4D0F31D68ABA484DAC27F422219E6840 /* Pods-MSCrashDemo */ = { 195 | isa = PBXNativeTarget; 196 | buildConfigurationList = 273C942600FB424D7EFAC3A2E99EC381 /* Build configuration list for PBXNativeTarget "Pods-MSCrashDemo" */; 197 | buildPhases = ( 198 | 363F9279C33B7D8FA70C33BE2AB081D6 /* Sources */, 199 | 9887D60E3DA695DD48EA7CED4E57739C /* Frameworks */, 200 | ); 201 | buildRules = ( 202 | ); 203 | dependencies = ( 204 | C4ED9BA45114F6F562E81400DEB9E95E /* PBXTargetDependency */, 205 | ); 206 | name = "Pods-MSCrashDemo"; 207 | productName = "Pods-MSCrashDemo"; 208 | productReference = 8DA14180998A12DE6F7D3E0003AF7D87 /* libPods-MSCrashDemo.a */; 209 | productType = "com.apple.product-type.library.static"; 210 | }; 211 | CEABCA343593295C941FD2A4A52FD166 /* MSCrashProtector */ = { 212 | isa = PBXNativeTarget; 213 | buildConfigurationList = 299116617D3BD4A6A321398A7BDFF54E /* Build configuration list for PBXNativeTarget "MSCrashProtector" */; 214 | buildPhases = ( 215 | 86CE1AB130ADB00E55C32B7126D225A3 /* Sources */, 216 | 2E607C04ED4D47F16935E6071C395807 /* Frameworks */, 217 | A98DB60A59FF7AD2E83CE407BB52A124 /* Headers */, 218 | ); 219 | buildRules = ( 220 | ); 221 | dependencies = ( 222 | ); 223 | name = MSCrashProtector; 224 | productName = MSCrashProtector; 225 | productReference = 59142B689B64952006DA07EF74F1598F /* libMSCrashProtector.a */; 226 | productType = "com.apple.product-type.library.static"; 227 | }; 228 | /* End PBXNativeTarget section */ 229 | 230 | /* Begin PBXProject section */ 231 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 232 | isa = PBXProject; 233 | attributes = { 234 | LastSwiftUpdateCheck = 0830; 235 | LastUpgradeCheck = 0910; 236 | }; 237 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 238 | compatibilityVersion = "Xcode 3.2"; 239 | developmentRegion = English; 240 | hasScannedForEncodings = 0; 241 | knownRegions = ( 242 | en, 243 | ); 244 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 245 | productRefGroup = 0094FB1D4583312E46C6F2BA0AB32082 /* Products */; 246 | projectDirPath = ""; 247 | projectRoot = ""; 248 | targets = ( 249 | CEABCA343593295C941FD2A4A52FD166 /* MSCrashProtector */, 250 | 4D0F31D68ABA484DAC27F422219E6840 /* Pods-MSCrashDemo */, 251 | ); 252 | }; 253 | /* End PBXProject section */ 254 | 255 | /* Begin PBXSourcesBuildPhase section */ 256 | 363F9279C33B7D8FA70C33BE2AB081D6 /* Sources */ = { 257 | isa = PBXSourcesBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | 682AA620CC1E30F66299777074B9B60D /* Pods-MSCrashDemo-dummy.m in Sources */, 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | 86CE1AB130ADB00E55C32B7126D225A3 /* Sources */ = { 265 | isa = PBXSourcesBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | DDBFD7E82ABCCC62D953B13A741B0063 /* MSCrashProtector-dummy.m in Sources */, 269 | DE2C0A986F48A111BE458413A04277CB /* NSArray+MSSafe.m in Sources */, 270 | E5011515DD9408CFFF82F99CD0655CDD /* NSDictionary+MSSafe.m in Sources */, 271 | F43330C4A4B714DA8CBC9469957AA583 /* NSMutableSet+MSSafe.m in Sources */, 272 | 591300328F7E54613FE66673EA8CE459 /* NSString+MSSafe.m in Sources */, 273 | ); 274 | runOnlyForDeploymentPostprocessing = 0; 275 | }; 276 | /* End PBXSourcesBuildPhase section */ 277 | 278 | /* Begin PBXTargetDependency section */ 279 | C4ED9BA45114F6F562E81400DEB9E95E /* PBXTargetDependency */ = { 280 | isa = PBXTargetDependency; 281 | name = MSCrashProtector; 282 | target = CEABCA343593295C941FD2A4A52FD166 /* MSCrashProtector */; 283 | targetProxy = 2F8185C8F0F24827941CFF814995FCF3 /* PBXContainerItemProxy */; 284 | }; 285 | /* End PBXTargetDependency section */ 286 | 287 | /* Begin XCBuildConfiguration section */ 288 | 14FF33B3C902E3EB6F50AA1263975F50 /* Debug */ = { 289 | isa = XCBuildConfiguration; 290 | baseConfigurationReference = E2CD2B71273E120EE478FB6C0B6CC0EE /* MSCrashProtector.xcconfig */; 291 | buildSettings = { 292 | CODE_SIGN_IDENTITY = "iPhone Developer"; 293 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 294 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 295 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 296 | GCC_PREFIX_HEADER = "Target Support Files/MSCrashProtector/MSCrashProtector-prefix.pch"; 297 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 298 | OTHER_LDFLAGS = ""; 299 | OTHER_LIBTOOLFLAGS = ""; 300 | PRIVATE_HEADERS_FOLDER_PATH = ""; 301 | PUBLIC_HEADERS_FOLDER_PATH = ""; 302 | SDKROOT = iphoneos; 303 | SKIP_INSTALL = YES; 304 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 305 | TARGETED_DEVICE_FAMILY = "1,2"; 306 | }; 307 | name = Debug; 308 | }; 309 | 4A44DE60388532A5C808E8A84D50DB19 /* Release */ = { 310 | isa = XCBuildConfiguration; 311 | baseConfigurationReference = 97A8D84574B1B38804B33F654E752145 /* Pods-MSCrashDemo.release.xcconfig */; 312 | buildSettings = { 313 | CODE_SIGN_IDENTITY = "iPhone Developer"; 314 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 315 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 316 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 317 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 318 | MACH_O_TYPE = staticlib; 319 | OTHER_LDFLAGS = ""; 320 | OTHER_LIBTOOLFLAGS = ""; 321 | PODS_ROOT = "$(SRCROOT)"; 322 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 323 | SDKROOT = iphoneos; 324 | SKIP_INSTALL = YES; 325 | TARGETED_DEVICE_FAMILY = "1,2"; 326 | VALIDATE_PRODUCT = YES; 327 | }; 328 | name = Release; 329 | }; 330 | 7BEB8C2BB53CEC1519E2998BB1D574E5 /* Release */ = { 331 | isa = XCBuildConfiguration; 332 | baseConfigurationReference = E2CD2B71273E120EE478FB6C0B6CC0EE /* MSCrashProtector.xcconfig */; 333 | buildSettings = { 334 | CODE_SIGN_IDENTITY = "iPhone Developer"; 335 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 336 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 337 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 338 | GCC_PREFIX_HEADER = "Target Support Files/MSCrashProtector/MSCrashProtector-prefix.pch"; 339 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 340 | OTHER_LDFLAGS = ""; 341 | OTHER_LIBTOOLFLAGS = ""; 342 | PRIVATE_HEADERS_FOLDER_PATH = ""; 343 | PUBLIC_HEADERS_FOLDER_PATH = ""; 344 | SDKROOT = iphoneos; 345 | SKIP_INSTALL = YES; 346 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 347 | TARGETED_DEVICE_FAMILY = "1,2"; 348 | VALIDATE_PRODUCT = YES; 349 | }; 350 | name = Release; 351 | }; 352 | A9164AAF9F8B307BFB405C4E799FB000 /* Debug */ = { 353 | isa = XCBuildConfiguration; 354 | baseConfigurationReference = 2C2B9D0C363C6A103305C70B9F4D9B08 /* Pods-MSCrashDemo.debug.xcconfig */; 355 | buildSettings = { 356 | CODE_SIGN_IDENTITY = "iPhone Developer"; 357 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 358 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 359 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 360 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 361 | MACH_O_TYPE = staticlib; 362 | OTHER_LDFLAGS = ""; 363 | OTHER_LIBTOOLFLAGS = ""; 364 | PODS_ROOT = "$(SRCROOT)"; 365 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 366 | SDKROOT = iphoneos; 367 | SKIP_INSTALL = YES; 368 | TARGETED_DEVICE_FAMILY = "1,2"; 369 | }; 370 | name = Debug; 371 | }; 372 | B254DAA6CF0CE39F4A3D11B90A7E059A /* Release */ = { 373 | isa = XCBuildConfiguration; 374 | buildSettings = { 375 | ALWAYS_SEARCH_USER_PATHS = NO; 376 | CLANG_ANALYZER_NONNULL = YES; 377 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 378 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 379 | CLANG_CXX_LIBRARY = "libc++"; 380 | CLANG_ENABLE_MODULES = YES; 381 | CLANG_ENABLE_OBJC_ARC = YES; 382 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 383 | CLANG_WARN_BOOL_CONVERSION = YES; 384 | CLANG_WARN_COMMA = YES; 385 | CLANG_WARN_CONSTANT_CONVERSION = YES; 386 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 387 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 388 | CLANG_WARN_EMPTY_BODY = YES; 389 | CLANG_WARN_ENUM_CONVERSION = YES; 390 | CLANG_WARN_INFINITE_RECURSION = YES; 391 | CLANG_WARN_INT_CONVERSION = YES; 392 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 393 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 394 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 395 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 396 | CLANG_WARN_STRICT_PROTOTYPES = YES; 397 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 398 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 399 | CLANG_WARN_UNREACHABLE_CODE = YES; 400 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 401 | CODE_SIGNING_REQUIRED = NO; 402 | COPY_PHASE_STRIP = NO; 403 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 404 | ENABLE_NS_ASSERTIONS = NO; 405 | ENABLE_STRICT_OBJC_MSGSEND = YES; 406 | GCC_C_LANGUAGE_STANDARD = gnu11; 407 | GCC_NO_COMMON_BLOCKS = YES; 408 | GCC_PREPROCESSOR_DEFINITIONS = ( 409 | "POD_CONFIGURATION_RELEASE=1", 410 | "$(inherited)", 411 | ); 412 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 413 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 414 | GCC_WARN_UNDECLARED_SELECTOR = YES; 415 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 416 | GCC_WARN_UNUSED_FUNCTION = YES; 417 | GCC_WARN_UNUSED_VARIABLE = YES; 418 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 419 | MTL_ENABLE_DEBUG_INFO = NO; 420 | PRODUCT_NAME = "$(TARGET_NAME)"; 421 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 422 | STRIP_INSTALLED_PRODUCT = NO; 423 | SYMROOT = "${SRCROOT}/../build"; 424 | }; 425 | name = Release; 426 | }; 427 | E4B68EE12B21C47CB798D9B1ECA6D7A7 /* Debug */ = { 428 | isa = XCBuildConfiguration; 429 | buildSettings = { 430 | ALWAYS_SEARCH_USER_PATHS = NO; 431 | CLANG_ANALYZER_NONNULL = YES; 432 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 433 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 434 | CLANG_CXX_LIBRARY = "libc++"; 435 | CLANG_ENABLE_MODULES = YES; 436 | CLANG_ENABLE_OBJC_ARC = YES; 437 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 438 | CLANG_WARN_BOOL_CONVERSION = YES; 439 | CLANG_WARN_COMMA = YES; 440 | CLANG_WARN_CONSTANT_CONVERSION = YES; 441 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 442 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 443 | CLANG_WARN_EMPTY_BODY = YES; 444 | CLANG_WARN_ENUM_CONVERSION = YES; 445 | CLANG_WARN_INFINITE_RECURSION = YES; 446 | CLANG_WARN_INT_CONVERSION = YES; 447 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 448 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 449 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 450 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 451 | CLANG_WARN_STRICT_PROTOTYPES = YES; 452 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 453 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 454 | CLANG_WARN_UNREACHABLE_CODE = YES; 455 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 456 | CODE_SIGNING_REQUIRED = NO; 457 | COPY_PHASE_STRIP = NO; 458 | DEBUG_INFORMATION_FORMAT = dwarf; 459 | ENABLE_STRICT_OBJC_MSGSEND = YES; 460 | ENABLE_TESTABILITY = YES; 461 | GCC_C_LANGUAGE_STANDARD = gnu11; 462 | GCC_DYNAMIC_NO_PIC = NO; 463 | GCC_NO_COMMON_BLOCKS = YES; 464 | GCC_OPTIMIZATION_LEVEL = 0; 465 | GCC_PREPROCESSOR_DEFINITIONS = ( 466 | "POD_CONFIGURATION_DEBUG=1", 467 | "DEBUG=1", 468 | "$(inherited)", 469 | ); 470 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 471 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 472 | GCC_WARN_UNDECLARED_SELECTOR = YES; 473 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 474 | GCC_WARN_UNUSED_FUNCTION = YES; 475 | GCC_WARN_UNUSED_VARIABLE = YES; 476 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 477 | MTL_ENABLE_DEBUG_INFO = YES; 478 | ONLY_ACTIVE_ARCH = YES; 479 | PRODUCT_NAME = "$(TARGET_NAME)"; 480 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 481 | STRIP_INSTALLED_PRODUCT = NO; 482 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 483 | SYMROOT = "${SRCROOT}/../build"; 484 | }; 485 | name = Debug; 486 | }; 487 | /* End XCBuildConfiguration section */ 488 | 489 | /* Begin XCConfigurationList section */ 490 | 273C942600FB424D7EFAC3A2E99EC381 /* Build configuration list for PBXNativeTarget "Pods-MSCrashDemo" */ = { 491 | isa = XCConfigurationList; 492 | buildConfigurations = ( 493 | A9164AAF9F8B307BFB405C4E799FB000 /* Debug */, 494 | 4A44DE60388532A5C808E8A84D50DB19 /* Release */, 495 | ); 496 | defaultConfigurationIsVisible = 0; 497 | defaultConfigurationName = Release; 498 | }; 499 | 299116617D3BD4A6A321398A7BDFF54E /* Build configuration list for PBXNativeTarget "MSCrashProtector" */ = { 500 | isa = XCConfigurationList; 501 | buildConfigurations = ( 502 | 14FF33B3C902E3EB6F50AA1263975F50 /* Debug */, 503 | 7BEB8C2BB53CEC1519E2998BB1D574E5 /* Release */, 504 | ); 505 | defaultConfigurationIsVisible = 0; 506 | defaultConfigurationName = Release; 507 | }; 508 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 509 | isa = XCConfigurationList; 510 | buildConfigurations = ( 511 | E4B68EE12B21C47CB798D9B1ECA6D7A7 /* Debug */, 512 | B254DAA6CF0CE39F4A3D11B90A7E059A /* Release */, 513 | ); 514 | defaultConfigurationIsVisible = 0; 515 | defaultConfigurationName = Release; 516 | }; 517 | /* End XCConfigurationList section */ 518 | }; 519 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 520 | } 521 | --------------------------------------------------------------------------------