mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 15:32:10 +08:00
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 <justincohen@chromium.org> Commit-Queue: Joemer Ramos <joemerramos@chromium.org>
This commit is contained in:
parent
707d0d4dac
commit
3e54a2cd1b
@ -110,13 +110,17 @@ GetProcessSnapshotMinidumpFromSinglePending() {
|
|||||||
|
|
||||||
UIWindow* GetAnyWindow() {
|
UIWindow* GetAnyWindow() {
|
||||||
#if defined(__IPHONE_15_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_15_0
|
#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, *)) {
|
if (@available(iOS 15.0, *)) {
|
||||||
UIWindowScene* scene = reinterpret_cast<UIWindowScene*>(
|
|
||||||
[UIApplication sharedApplication].connectedScenes.anyObject);
|
|
||||||
return scene.keyWindow;
|
return scene.keyWindow;
|
||||||
|
} else {
|
||||||
|
return [scene.windows firstObject];
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
#else
|
||||||
return [UIApplication sharedApplication].windows[0];
|
return [UIApplication sharedApplication].windows[0];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
[[clang::optnone]] void recurse(int counter) {
|
[[clang::optnone]] void recurse(int counter) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user