Attention is currently required from: Ben Hamilton, Joemer Ramos, Mark Mentovai.
Patch set 8:Code-Review +1
To view, visit change 4304398. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Ben Hamilton, Joemer Ramos, Mark Mentovai.
Patch set 8:Commit-Queue +2
Crashpad LUCI CQ submitted this change.
ios: Support minimum deployment targets of iOS15
The windows property of UIApplication is unavailable in iOS15.
Bug: 1406561 crashpad:
Change-Id: I19642067a13801142cd3f24586bab6958a81635d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4304398
Reviewed-by: Justin Cohen <justi...@chromium.org>
Commit-Queue: Joemer Ramos <joeme...@chromium.org>
---
M test/ios/host/cptest_application_delegate.mm
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/test/ios/host/cptest_application_delegate.mm b/test/ios/host/cptest_application_delegate.mm
index c2ee194..8740f6d 100644
--- a/test/ios/host/cptest_application_delegate.mm
+++ b/test/ios/host/cptest_application_delegate.mm
@@ -110,13 +110,17 @@
UIWindow* GetAnyWindow() {
#if defined(__IPHONE_15_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_15_0
+ UIWindowScene* scene = reinterpret_cast<UIWindowScene*>(
+ [UIApplication sharedApplication].connectedScenes.anyObject);
if (@available(iOS 15.0, *)) {
- UIWindowScene* scene = reinterpret_cast<UIWindowScene*>(
- [UIApplication sharedApplication].connectedScenes.anyObject);
return scene.keyWindow;
+ } else {
+ return [scene.windows firstObject];
}
-#endif
+
+#else
return [UIApplication sharedApplication].windows[0];
+#endif
}
[[clang::optnone]] void recurse(int counter) {
To view, visit change 4304398. To unsubscribe, or for help writing mail filters, visit settings.