3030NSString *const GoogleAppIDKey = @" google_app_id" ;
3131NSString *const BuildInstanceID = @" build_instance_id" ;
3232NSString *const AppVersion = @" app_version" ;
33+ NSString *const FirebaseCrashlyticsMachDefaultBehaviorKey =
34+ @" FirebaseCrashlyticsMachDefaultBehavior" ;
3335
3436@interface FIRCLSSettings ()
3537
@@ -47,21 +49,34 @@ @interface FIRCLSSettings ()
4749@implementation FIRCLSSettings
4850
4951- (instancetype )initWithFileManager : (FIRCLSFileManager *)fileManager
50- appIDModel : (FIRCLSApplicationIdentifierModel *)appIDModel {
52+ appIDModel : (FIRCLSApplicationIdentifierModel *)appIDModel
53+ appInfo : (NSDictionary *)appInfo {
5154 return
5255 [self initWithFileManager: fileManager
5356 appIDModel: appIDModel
57+ appInfo: appInfo
5458 deletionQueue: dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0 )];
5559}
5660
5761- (instancetype )initWithFileManager : (FIRCLSFileManager *)fileManager
5862 appIDModel : (FIRCLSApplicationIdentifierModel *)appIDModel
63+ appInfo : (NSDictionary *)appInfo
5964 deletionQueue : (dispatch_queue_t )deletionQueue {
6065 self = [super init ];
6166 if (!self) {
6267 return nil ;
6368 }
6469
70+ // Configure the Mach exception message receiving behavior from Info.plist the mach exception
71+ // message receiving behavior
72+ self.machExceptionDefaultBehavior = false ;
73+ id crashlyticsMachDefaultBehavior =
74+ [appInfo objectForKey: FirebaseCrashlyticsMachDefaultBehaviorKey];
75+ if ([crashlyticsMachDefaultBehavior isKindOfClass: [NSString class ]] ||
76+ [crashlyticsMachDefaultBehavior isKindOfClass: [NSNumber class ]]) {
77+ self.machExceptionDefaultBehavior = [crashlyticsMachDefaultBehavior boolValue ];
78+ }
79+
6580 _fileManager = fileManager;
6681 _appIDModel = appIDModel;
6782
0 commit comments