From 82dee2d1e48b374b6ffb042ef036fed7c748053a Mon Sep 17 00:00:00 2001 From: Arjun Nayini Date: Mon, 22 Jan 2018 09:43:40 -0800 Subject: [PATCH] [Platform Word Size] Add platform word size to Device tab This commit adds the platform word size to the Device tab of all snags to help users quickly classify whether a set of bugs is architecture specific (e.g. 32 bit devices only). --- Source/BugsnagKSCrashSysInfoParser.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/BugsnagKSCrashSysInfoParser.m b/Source/BugsnagKSCrashSysInfoParser.m index aa8f143c8..474287a60 100644 --- a/Source/BugsnagKSCrashSysInfoParser.m +++ b/Source/BugsnagKSCrashSysInfoParser.m @@ -13,6 +13,8 @@ #import "BugsnagConfiguration.h" #import "BugsnagLogger.h" +#define PLATFORM_WORD_SIZE sizeof(void*)*8 + NSDictionary *BSGParseDevice(NSDictionary *report) { NSMutableDictionary *device = [[report valueForKeyPath:@"user.state.deviceState"] mutableCopy]; @@ -103,6 +105,7 @@ BSGDictSetSafeObject(deviceState, report[@"machine"], @"model"); BSGDictSetSafeObject(deviceState, report[@"system_name"], @"osName"); BSGDictSetSafeObject(deviceState, report[@"system_version"], @"osVersion"); + BSGDictSetSafeObject(deviceState, @(PLATFORM_WORD_SIZE), @"wordSize"); BSGDictSetSafeObject(deviceState, @"Apple", @"manufacturer"); BSGDictSetSafeObject(deviceState, report[@"jailbroken"], @"jailbroken"); return deviceState;