Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 14: App crashes on ScheduleRemindersController #307

Closed
subdigital opened this issue Jul 5, 2020 · 0 comments · Fixed by #309
Closed

iOS 14: App crashes on ScheduleRemindersController #307

subdigital opened this issue Jul 5, 2020 · 0 comments · Fixed by #309
Labels
iOS 14 Potential new features for iOS 14 starter-issue
Milestone

Comments

@subdigital
Copy link
Collaborator

To repro:

Load project in Xcode 12 and run on iOS 14 simulator. Tap the gear icon.

Crash:

2020-07-05 15:21:39.393452-0500 FiveCalls[74170:52955548] -[_UIDatePickerIOSCompactView _setTextColor:]: unrecognized selector sent to instance 0x7ff99b52b820
2020-07-05 15:21:39.417494-0500 FiveCalls[74170:52955548] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_UIDatePickerIOSCompactView _setTextColor:]: unrecognized selector sent to instance 0x7ff99b52b820'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff20434f16 __exceptionPreprocess + 242
	1   libobjc.A.dylib                     0x00007fff2017454e objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff20443a3a +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
	3   UIKitCore                           0x00007fff2455f50f -[UIResponder doesNotRecognizeSelector:] + 292
	4   CoreFoundation                      0x00007fff20439200 ___forwarding___ + 859
	5   CoreFoundation                      0x00007fff2043b4a8 _CF_forwarding_prep_0 + 120
	6   Foundation                          0x00007fff207b469e -[NSObject(NSKeyValueCoding) setValue:forKey:] + 325
	7   UIKitCore                           0x00007fff24a73d25 -[UIView(CALayerDelegate) setValue:forKey:] + 171
	8   FiveCalls                           0x0000000106b14716 $s9FiveCalls27ScheduleRemindersControllerC11viewDidLoadyyF + 2358
	9   FiveCalls                           0x0000000106b152db $s9FiveCalls27ScheduleRemindersControllerC11viewDidLoadyyFTo + 43
	10  UIKitCore                           0x00007fff23e24bf1 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 88
	11  UIKitCore                           0x00007fff23e29402 -[UIViewController loadViewIfRequired] + 1084
	12  UIKitCore                           0x00007fff23d66bca -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 162
	13  UIKitCore                           0x00007fff23d66ea9 -[UINavigationController _startTransition:fromViewController:toViewController:] + 143
	14  UIKitCore                           0x00007fff23d67cd2 -[UINavigationController _startDeferredTransitionIfNeeded:] + 851
	15  UIKitCore                           0x00007fff23d69025 -[UINavigationController __viewWillLayoutSubviews] + 150
	16  UIKitCore                           0x00007fff23d49fbe -[UILayoutContainerView layoutSubviews] + 217
	17  UIKitCore                           0x00007fff24a74928 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2480
	18  QuartzCore                          0x00007fff2789007b -[CALayer layoutSublayers] + 258
	19  QuartzCore                          0x00007fff278964d9 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 575
	20  UIKitCore                           0x00007fff24a60343 -[UIView(Hierarchy) layoutBelowIfNeeded] + 573
	21  UIKitCore                           0x00007fff23d21cb3 -[_UISheetPresentationController _sheetLayoutInfoLayout:] + 48
	22  UIKitCore                           0x00007fff23d1ee41 -[_UISheetLayoutInfo _layout] + 360
	23  UIKitCore                           0x00007fff23d23b30 __54-[_UISheetPresentationController transitionWillBegin:]_block_invoke_2 + 52
	24  UIKitCore                           0x00007fff24a677d1 +[UIView(Animation) performWithoutAnimation:] + 84
	25  UIKitCore                           0x00007fff23d23a6d __54-[_UISheetPresentationController transitionWillBegin:]_block_invoke.358 + 120
	26  UIKitCore                           0x00007fff23e57f81 -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] + 294
	27  UIKitCore                           0x00007fff23e5443c -[_UIViewControllerTransitionContext __runAlongsideAnimations] + 263
	28  UIKitCore                           0x00007fff24a675fa __63+[UIView(Animation) _setAlongsideAnimations:toRunByEndOfBlock:]_block_invoke + 16
	29  UIKitCore                           0x00007fff24a39180 -[UIViewAnimationState _runAlongsideAnimations] + 24
	30  UIKitCore                           0x00007fff24a37f83 -[UIViewAnimationState pop] + 37
	31  UIKitCore                           0x00007fff24a353bf +[UIViewAnimationState popAnimationState] + 62
	32  UIKitCore                           0x00007fff24a6907d +[UIView _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 696
	33  UIKitCore                           0x00007fff24a694dd +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] + 87
	34  UIKitCore                           0x00007fff24a30bdf __50-[UITransitionView _startTransition:withDuration:]_block_invoke.166 + 66
	35  UIKitCore                           0x00007fff24a699aa +[UIView(UIViewAnimationWithBlocks) conditionallyAnimate:withAnimation:layout:completion:] + 76
	36  UIKitCore                           0x00007fff24a30652 -[UITransitionView _startTransition:withDuration:] + 840
	37  UIKitCore                           0x00007fff24a300b4 -[UITransitionView transition:fromView:toView:removeFromView:] + 2854
	38  UIKitCore                           0x00007fff23e4fddc -[UIViewControllerBuiltinTransitionViewAnimator animateTransition:] + 1200
	39  UIKitCore                           0x00007fff23e58b50 ___UIViewControllerTransitioningRunCustomTransition_block_invoke_2 + 59
	40  UIKitCore                           0x00007fff23f87a5d +[UIInputResponderController _pinInputViewsForInputResponderController:onBehalfOfResponder:duringBlock:] + 99
	41  UIKitCore                           0x00007fff23e58adf ___UIViewControllerTransitioningRunCustomTransition_block_invoke.641 + 180
	42  UIKitCore                           0x00007fff24a6750b +[UIView(Animation) _setAlongsideAnimations:toRunByEndOfBlock:] + 175
	43  UIKitCore                           0x00007fff23e58965 _UIViewControllerTransitioningRunCustomTransition + 553
	44  UIKitCore                           0x00007fff23d0f28a __56-[UIPresentationController runTransitionForCurrentState]_block_invoke.463 + 2563
	45  UIKitCore                           0x00007fff24a0dfbb -[_UIAfterCACommitBlock run] + 54
	46  UIKitCore                           0x00007fff24539f04 _runAfterCACommitDeferredBlocks + 333
	47  UIKitCore                           0x00007fff2452a7d5 _cleanUpAfterCAFlushAndRunDeferredBlocks + 221
	48  UIKitCore                           0x00007fff2455a82b _afterCACommitHandler + 85
	49  CoreFoundation                      0x00007fff203a2ab7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
	50  CoreFoundation                      0x00007fff2039d5ee __CFRunLoopDoObservers + 487
	51  CoreFoundation                      0x00007fff2039db1f __CFRunLoopRun + 1137
	52  CoreFoundation                      0x00007fff2039d2fa CFRunLoopRunSpecific + 538
	53  GraphicsServices                    0x00007fff2b6c1db3 GSEventRunModal + 139
	54  UIKitCore                           0x00007fff2452b942 -[UIApplication _run] + 912
	55  UIKitCore                           0x00007fff24530f62 UIApplicationMain + 1570
	56  FiveCalls                           0x0000000106adc33b main + 75
	57  libdyld.dylib                       0x00007fff20253941 start + 1
	58  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_UIDatePickerIOSCompactView _setTextColor:]: unrecognized selector sent to instance 0x7ff99b52b820'
terminating with uncaught exception of type NSException
CoreSimulator 725.10 - Device: iPhone 11 Pro (40E4E60D-BB66-4E2B-97B3-678397B272C6) - Runtime: iOS 14.0 (18A5301v) - DeviceType: iPhone 11 Pro

Location:

ScheduleViewController.swift:

        timePicker.setValue(UIColor.fvc_darkBlue, forKey: "textColor")

This was really a private API anyway, so we should figure out the right way to do it, and if there isn't one, isolate this code out of iOS 14 builds.

@subdigital subdigital added starter-issue iOS 14 Potential new features for iOS 14 labels Jul 5, 2020
Abizern added a commit that referenced this issue Jul 7, 2020
Fix #307

It seems the issue isn't the way that the text color is configured. Rather, the .compact style is
being used which doesn't have a `textColor` key.
@nickoneill nickoneill added this to the 1.7 milestone Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iOS 14 Potential new features for iOS 14 starter-issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants