ios: Fix API deprecation error in iOS13.

UI_USER_INTERFACE_IDIOM is deprecated in iOS13. Instead use
-[UIDevice userInterfaceIdiom] directly.

Bug: crashpad: 31
Change-Id: I0bdcc3b3b42bd2ca87cee26abedbeb5b89632981
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2826575
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
This commit is contained in:
Justin Cohen 2021-04-15 11:50:49 -04:00 committed by Commit Bot
parent f1943fcb57
commit 323e53b2f3

View File

@ -88,7 +88,7 @@ IOSSystemDataCollector::IOSSystemDataCollector()
// util/mac/mac_util.cc). // util/mac/mac_util.cc).
const char* model = getenv("SIMULATOR_MODEL_IDENTIFIER"); const char* model = getenv("SIMULATOR_MODEL_IDENTIFIER");
if (model == nullptr) { if (model == nullptr) {
switch (UI_USER_INTERFACE_IDIOM()) { switch ([[UIDevice currentDevice] userInterfaceIdiom]) {
case UIUserInterfaceIdiomPhone: case UIUserInterfaceIdiomPhone:
model = "iPhone"; model = "iPhone";
break; break;