Repository: firebase/firebase-ios-sdk (language: cpp)

Issue:
Warning in FIRCLSApplication.m when minimum version is iOS 13
<!-- DO NOT DELETE
validate_template=true
template_path=.github/ISSUE_TEMPLATE/bug_report.md
-->
### [REQUIRED] Step 1: Describe your environment

  * Xcode version: 12.5 (12E262)
  * Firebase SDK version: 8.0.0
  * Installation method: CocoaPods
  * Firebase Component: Crashlytics

### [REQUIRED] Step 2: Describe the problem

#### Steps to reproduce:

Warning is produced in FIRCLSApplication.m when minimum deployment version is 13.0+:
```
'UI_USER_INTERFACE_IDIOM' is deprecated: first deprecated in iOS 13.0 - Use -[UIDevice userInterfaceIdiom] directly.
```

#### Relevant Code:
In FIRCLSApplication.m, warning is for using `UI_USER_INTERFACE_IDIOM()`, which is deprecated as of iOS 13.
```
NSString* FIRCLSApplicationGetFirebasePlatform(void) {
  NSString* firebasePlatform = [GULAppEnvironmentUtil applePlatform];

#if TARGET_OS_IOS
  if ([firebasePlatform isEqualToString:@"ios"] &&
      UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    return @"ipados";
  }
#endif

  return firebasePlatform;
}
```
Instead, use `[[UIDevice currentDevice] userInterfaceIdiom]`, which is available as of iOS 3.2.


Discussion / hints:

Fix patch:
diff --git a/Crashlytics/CHANGELOG.md b/Crashlytics/CHANGELOG.md
index b7ca3bca4de..44f537fc03a 100644
--- a/Crashlytics/CHANGELOG.md
+++ b/Crashlytics/CHANGELOG.md
@@ -1,6 +1,7 @@
 # Unreleased
 - [changed] Incorporated code quality changes around integer overflow, potential race conditions, and reinstalling signal handlers.
 - [fixed] Fixed an issue where iOS-only apps running on iPads would report iOS as their OS Name.
+- [fixed] Fixed depcrecation warning for projects with minimum deployment version iOS 13 and up.
 
 # v8.0.0
 - [changed] Added a warning to upload-symbols when it detects a dSYM with hidden symbols.
diff --git a/Crashlytics/Crashlytics/Components/FIRCLSApplication.m b/Crashlytics/Crashlytics/Components/FIRCLSApplication.m
index 0a00642c5c4..45c6b00534a 100644
--- a/Crashlytics/Crashlytics/Components/FIRCLSApplication.m
+++ b/Crashlytics/Crashlytics/Components/FIRCLSApplication.m
@@ -56,7 +56,7 @@
 
 #if TARGET_OS_IOS
   if ([firebasePlatform isEqualToString:@"ios"] &&
-      UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
+      [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
     return @"ipados";
   }
   // This check is necessary because iOS-only apps running on iPad


Test patch: