Skip to content

Commit 51d9e39

Browse files
authored
Update Crashlytics to use Google Utilities deviceSimulatorModel (#11707)
1 parent 2bfe6ab commit 51d9e39

File tree

1 file changed

+3
-27
lines changed

1 file changed

+3
-27
lines changed

Crashlytics/Shared/FIRCLSFABHost.m

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
#include "Crashlytics/Shared/FIRCLSFABHost.h"
1616

17+
#import <GoogleUtilities/GULAppEnvironmentUtil.h>
18+
1719
#if TARGET_OS_WATCH
1820
#import <WatchKit/WatchKit.h>
1921
#elif TARGET_OS_IPHONE
@@ -89,31 +91,5 @@ NSOperatingSystemVersion FIRCLSHostGetOSVersion(void) {
8991
#pragma mark Public
9092

9193
NSString *FIRCLSHostModelInfo(void) {
92-
NSString *model = nil;
93-
94-
#if TARGET_OS_SIMULATOR
95-
#if TARGET_OS_WATCH
96-
model = @"watchOS Simulator";
97-
#elif TARGET_OS_TV
98-
model = @"tvOS Simulator";
99-
#elif TARGET_OS_IPHONE
100-
switch ([[UIDevice currentDevice] userInterfaceIdiom]) {
101-
case UIUserInterfaceIdiomPhone:
102-
model = @"iOS Simulator (iPhone)";
103-
break;
104-
case UIUserInterfaceIdiomPad:
105-
model = @"iOS Simulator (iPad)";
106-
break;
107-
default:
108-
model = @"iOS Simulator (Unknown)";
109-
break;
110-
}
111-
#endif
112-
#elif TARGET_OS_EMBEDDED
113-
model = FIRCLSHostSysctlEntry("hw.machine");
114-
#else
115-
model = FIRCLSHostSysctlEntry("hw.model");
116-
#endif
117-
118-
return model;
94+
return [GULAppEnvironmentUtil deviceSimulatorModel];
11995
}

0 commit comments

Comments
 (0)