Skip to content

Commit 38b4592

Browse files
authored
Crashlytics fix os_name check for iPads (#8145)
1 parent 5f1848f commit 38b4592

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Crashlytics/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Unreleased
22
- [changed] Incorporated code quality changes around integer overflow, potential race conditions, and reinstalling signal handlers.
3+
- [fixed] Fixed an issue where iOS-only apps running on iPads would report iOS as their OS Name.
34

45
# v8.0.0
56
- [changed] Added a warning to upload-symbols when it detects a dSYM with hidden symbols.

Crashlytics/Crashlytics/Components/FIRCLSApplication.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@
5959
UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
6060
return @"ipados";
6161
}
62+
// This check is necessary because iOS-only apps running on iPad
63+
// will report UIUserInterfaceIdiomPhone via UI_USER_INTERFACE_IDIOM().
64+
if ([[UIDevice currentDevice].model.lowercaseString containsString:@"ipad"]) {
65+
return @"ipados";
66+
}
6267
#endif
6368

6469
return firebasePlatform;

0 commit comments

Comments
 (0)