From 877c70d52f8a25d4441bcee32e898c59c9471eb9 Mon Sep 17 00:00:00 2001 From: Alex Odawa Date: Tue, 30 Jul 2024 19:54:13 +0200 Subject: [PATCH 1/4] silencing non-exhaustive switch warning --- Sources/KIF/Additions/UIView-Debugging.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/KIF/Additions/UIView-Debugging.m b/Sources/KIF/Additions/UIView-Debugging.m index a9311e7b..419964d7 100644 --- a/Sources/KIF/Additions/UIView-Debugging.m +++ b/Sources/KIF/Additions/UIView-Debugging.m @@ -136,6 +136,11 @@ - (void)printDatePickerState { case UIDatePickerModeCountDownTimer: printf(" UIDatePickerModeCountDownTimer"); break; +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 17040 + case UIDatePickerModeYearAndMonth: + printf(" UIDatePickerModeYearAndMonth"); + break; +#endif } printf(")"); printf(" (minute interval: %s)", @(datePicker.minuteInterval).stringValue.UTF8String); From 28d5913425d823aeadcbc5140e4ad03c8f2d402b Mon Sep 17 00:00:00 2001 From: Alex Odawa Date: Tue, 30 Jul 2024 20:17:06 +0200 Subject: [PATCH 2/4] using xcode version instead of minimum deployment target --- Sources/KIF/Additions/UIView-Debugging.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/KIF/Additions/UIView-Debugging.m b/Sources/KIF/Additions/UIView-Debugging.m index 419964d7..da7669c6 100644 --- a/Sources/KIF/Additions/UIView-Debugging.m +++ b/Sources/KIF/Additions/UIView-Debugging.m @@ -136,7 +136,7 @@ - (void)printDatePickerState { case UIDatePickerModeCountDownTimer: printf(" UIDatePickerModeCountDownTimer"); break; -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 17040 +#if __clang_major__ >= 15 // Xcode 15 or better. This might still error on xcode versions between 15.0 and 15.3, but that much harder to check for as they all use the same version of clang. case UIDatePickerModeYearAndMonth: printf(" UIDatePickerModeYearAndMonth"); break; From ed916e133f54575e313bd7164917bec2f42a8f90 Mon Sep 17 00:00:00 2001 From: Alex Odawa Date: Tue, 30 Jul 2024 20:29:06 +0200 Subject: [PATCH 3/4] max allowed --- Sources/KIF/Additions/UIView-Debugging.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/KIF/Additions/UIView-Debugging.m b/Sources/KIF/Additions/UIView-Debugging.m index da7669c6..a91a6cd0 100644 --- a/Sources/KIF/Additions/UIView-Debugging.m +++ b/Sources/KIF/Additions/UIView-Debugging.m @@ -136,7 +136,7 @@ - (void)printDatePickerState { case UIDatePickerModeCountDownTimer: printf(" UIDatePickerModeCountDownTimer"); break; -#if __clang_major__ >= 15 // Xcode 15 or better. This might still error on xcode versions between 15.0 and 15.3, but that much harder to check for as they all use the same version of clang. +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_17_4 case UIDatePickerModeYearAndMonth: printf(" UIDatePickerModeYearAndMonth"); break; From 2e64f21a7cde369a42a2ff6e25229d2a3ae281b4 Mon Sep 17 00:00:00 2001 From: Alex Odawa Date: Tue, 30 Jul 2024 20:34:57 +0200 Subject: [PATCH 4/4] test --- Sources/KIF/Additions/UIView-Debugging.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/KIF/Additions/UIView-Debugging.m b/Sources/KIF/Additions/UIView-Debugging.m index a91a6cd0..8f7b12ac 100644 --- a/Sources/KIF/Additions/UIView-Debugging.m +++ b/Sources/KIF/Additions/UIView-Debugging.m @@ -136,7 +136,7 @@ - (void)printDatePickerState { case UIDatePickerModeCountDownTimer: printf(" UIDatePickerModeCountDownTimer"); break; -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_17_4 +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 170400 //__IPHONE_17_4 case UIDatePickerModeYearAndMonth: printf(" UIDatePickerModeYearAndMonth"); break;