It crashes when clicking the link of webview in iOS 13 - ios

When the link in webview with clicking, there is no response. When the link with long press, it crash with the message:
Trapped uncaught exception 'NSInternalInconsistencyException', reason: '_UIClickPresentationInteraction cannot determine presenting view controller.'
0 CoreFoundation 0x00007fff23b98bde __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff503b5b20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23b98958 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff255eb6f5 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
4 UIKitCore 0x00007fff470cf0fd -[_UIClickPresentationInteraction _canPerformPresentation] + 431
5 UIKitCore 0x00007fff470d16eb -[_UIClickPresentationInteraction _handleTransitionToPreview] + 136
6 UIKitCore 0x00007fff470d1046 __55-[_UIClickPresentationInteraction _prepareStateMachine]_block_invoke_3 + 35
7 UIKitCore 0x00007fff471f0fb0 -[_UIStateMachine handleEvent:withContext:] + 412
8 UIKitCore 0x00007fff470cff63 -[_UIClickPresentationInteraction clickInteractionDidClickUp:] + 55
9 UIKitCore 0x00007fff46dd5aed -[_UIClickInteraction clickDriver:didPerformEvent:] + 316
10 UIKitCore 0x00007fff46a3831f __58-[_UILongPressClickInteractionDriver _prepareStateMachine]_block_invoke_2 + 74
11 UIKitCore 0x00007fff471f0fb0 -[_UIStateMachine handleEvent:withContext:] + 412
12 UIKitCore 0x00007fff46a38e04 -[_UILongPressClickInteractionDriver _updateForActiveGestureRecognizer] + 673
13 UIKitCore 0x00007fff46a38a59 -[_UILongPressClickInteractionDriver _handleGestureRecognizer:] + 382
14 UIKitCore 0x00007fff46d1e777 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 44
15 UIKitCore 0x00007fff46d27909 _UIGestureRecognizerSendTargetActions + 109
16 UIKitCore 0x00007fff46d24fc5 _UIGestureRecognizerSendActions + 298
17 UIKitCore 0x00007fff46d242f2 -[UIGestureRecognizer _updateGestureForActiveEvents] + 757
18 UIKitCore 0x00007fff46d16308 _UIGestureEnvironmentUpdate + 2700
19 CoreFoundation 0x00007fff23afaeb7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
20 CoreFoundation 0x00007fff23af594e __CFRunLoopDoObservers + 430
21 CoreFoundation 0x00007fff23af5fca __CFRunLoopRun + 1514
22 CoreFoundation 0x00007fff23af56b6 CFRunLoopRunSpecific + 438
23 GraphicsServices 0x00007fff3815cbb0 GSEventRunModal + 65
24 UIKitCore 0x00007fff47162a67 UIApplicationMain + 1621
25 IBUWireless 0x000000010b372728 main + 296
26 libdyld.dylib 0x00007fff5123bcf5 start + 1
27 ??? 0x0000000000000001 0x0 + 1
iOS13 OS

I have recently fixed this issue and solved by setting
webviewcontroller.modalPresentationStyle = .fullScreen
self.present(webviewcontroller, animated: animated, completion: nil)

Webview has been depricated so You must use WKWebView.
Note
In apps that run in iOS 8 and later, use the WKWebView class instead of using UIWebView. Additionally, consider setting the WKPreferences property javaScriptEnabled to false if you render files that are not supposed to run JavaScript.
Read WkWebView
https://developer.apple.com/documentation/webkit/wkwebview

Related

App is hung on loading data on WKWebView() with strange error stack trace

I am loading data on WebView on my iOS App but my app is getting frozen. It is not crashing but freezing the app with the below stack trace. I don't have any idea where is issue actually. It is giving something related to ABBI SDK. I haven't used any such SDK in my app. As soon as I am calling the following method, I am getting this error.
self?.webView.load(data, mimeType: "application/pdf", characterEncodingName: "utf-8", baseURL: URL(fileURLWithPath: ""))
Here is the console output
ABBI_SDK| ABEventsMgr.m:457 -[ABEventsMgr sendException:] (
0 CoreFoundation 0x00007fff203fbbb4 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff2019ebe7 objc_exception_throw + 48
2 CoreFoundation 0x00007fff203fba92 -[NSException initWithCoder:] + 0
3 WebKit 0x00007fff29644cb5 _ZN6WebKit28CompletionHandlerCallCheckerD2Ev + 127
4 WebKit 0x00007fff29760538 _ZN3WTF3RefIN6WebKit28CompletionHandlerCallCheckerENS_12RawPtrTraitsIS2_EEED2Ev + 48
5 WebKit 0x00007fff297f0abc _ZZN3WTF8BlockPtrIFv24WKNavigationActionPolicyEE12fromCallableIZN6WebKit15NavigationState16NavigationClient31decidePolicyForNavigationActionERNS5_12WebPageProxyEONS_3RefIN3API16NavigationActionENS_12RawPtrTraitsISC_EEEEONSA_INS5_27WebFramePolicyListenerProxyENSD_ISH_EEEEPNSB_6ObjectEE4$_10EES3_T_ENUlPKvE_8__invokeESQ_ + 70
6 libsystem_blocks.dylib 0x00007fff2008a434 _Block_release + 130
7 WebKit 0x00007fff297e7eb8 _ZN6WebKit15NavigationState16NavigationClient31decidePolicyForNavigationActionERNS_12WebPageProxyEON3WTF3RefIN3API16NavigationActionENS4_12RawPtrTraitsIS7_EEEEONS5_INS_27WebFramePolicyListenerProxyENS8_ISC_EEEEPNS6_6ObjectE + 944
8 WebKit 0x00007fff298c4749 _ZN6WebKit12WebPageProxy31decidePolicyForNavigationActionEON3WTF3RefINS_15WebProcessProxyENS1_12RawPtrTraitsIS3_EEEERNS_13WebFrameProxyEONS_13FrameInfoDataEyONS_20NavigationActionDataESB_NSt3__18optionalINS1_16ObjectIdentifierINS_26WebPageProxyIdentifierTypeEEEEERKN7WebCore15ResourceRequestEOSL_ON3IPC17FormDataReferenceEONSK_16ResourceResponseERKNS_8UserDataEONS2_INS0_20PolicyDecisionSenderENS4_ISX_EEEE + 6337
9 WebKit 0x00007fff298c2e47 _ZN6WebKit12WebPageProxy42decidePolicyForNavigationActionAsyncSharedEON3WTF3RefINS_15WebProcessProxyENS1_12RawPtrTraitsIS3_EEEENS1_16ObjectIdentifierIN7WebCore18PageIdentifierTypeEEENS8_INS9_19FrameIdentifierTypeEEEONS_13FrameInfoDataENS9_21PolicyCheckIdentifierEyONS_20NavigationActionDataESF_NSt3__18optionalINS8_INS_26WebPageProxyIdentifierTypeEEEEERKNS9_15ResourceRequestEOSO_ON3IPC17FormDataReferenceEONS9_16ResourceResponseERKNS_8UserDataEy + 315
10 WebKit 0x00007fff298c2cec _ZN6WebKit12WebPageProxy36decidePolicyForNavigationActionAsyncEN3WTF16ObjectIdentifierIN7WebCore19FrameIdentifierTypeEEEONS_13FrameInfoDataENS3_21PolicyCheckIdentifierEyONS_20NavigationActionDataES7_NSt3__18optionalINS2_INS_26WebPageProxyIdentifierTypeEEEEERKNS3_15ResourceRequestEOSG_ON3IPC17FormDataReferenceEONS3_16ResourceResponseERKNS_8UserDataEy + 112
11 WebKit 0x00007fff29c049bf _ZN6WebKit12WebPageProxy17didReceiveMessageERN3IPC10ConnectionERNS1_7DecoderE + 12877
12 WebKit 0x00007fff29530f7d _ZN3IPC18MessageReceiverMap15dispatchMessageERNS_10ConnectionERNS_7DecoderE + 199
13 WebKit 0x00007fff29905d7b _ZN6WebKit15WebProcessProxy17didReceiveMessageERN3IPC10ConnectionERNS1_7DecoderE + 31
14 WebKit 0x00007fff2950d68e _ZN3IPC10Connection15dispatchMessageENSt3__110unique_ptrINS_7DecoderENS1_14default_deleteIS3_EEEE + 658
15 WebKit 0x00007fff2950ce66 _ZN3IPC10Connection24dispatchIncomingMessagesEv + 572
16 JavaScriptCore 0x00007fff334ff58f _ZN3WTF7RunLoop11performWorkEv + 303
17 JavaScriptCore 0x00007fff3350057a _ZN3WTF7RunLoop11performWorkEPv + 26
18 CoreFoundation 0x00007fff20369e25 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
19 CoreFoundation 0x00007fff20369d1d __CFRunLoopDoSource0 + 180
20 CoreFoundation 0x00007fff203691f2 __CFRunLoopDoSources0 + 242
21 CoreFoundation 0x00007fff20363951 __CFRunLoopRun + 875
22 CoreFoundation 0x00007fff20363103 CFRunLoopRunSpecific + 567
23 GraphicsServices 0x00007fff2c851cd3 GSEventRunModal + 139
24 UIKitCore 0x00007fff24ffbe63 -[UIApplication _run] + 928
25 UIKitCore 0x00007fff25000a53 UIApplicationMain + 101
26 MyAPP 0x00000001065c0e79 main + 809
27 dyld 0x000000010931ee1e start_sim + 10
28 ??? 0x000000010b23c51e 0x0 + 4481860894
)
2022-07-21 19:00:50.426834+0530 MyAPP[92824:1138257] ABBI_SDK| ABHTTPMgr.m:77 -[ABHTTPMgr doHTTPPostJSON:withArgs:completion:] POST request to server. URL https://stats.abbi.io/api/logs

iOS App Crash On PushViewController, but only in TestFlight

In my app, I have a TestFlight beta. It loads fine, and all the buttons and actions work, except for clicking on one section of the TableView, when I click that, it crashes every time. But, only in TestFlight beta installs. On Xcode Simulator it runs fine, if debugging on my phone by plugging into computer and running, it works fine. When I open the crash log in Xcode, I get the image below, but it doesn't really tell me anything. Here is the crash log:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x195260164 __exceptionPreprocess + 228 (NSException.m:199)
1 libobjc.A.dylib 0x194f74c1c objc_exception_throw + 60 (objc-exception.mm:565)
2 CoreFoundation 0x19514fbb8 +[NSException raise:format:] + 112 (NSException.m:155)
3 UIKitCore 0x198cf0d14 -[UISearchDisplayController initWithCoder:] + 88 (UISearchDisplayController.m:350)
4 UIFoundation 0x1988c793c UINibDecoderDecodeObjectForValue + 728 (UINibDecoder.m:717)
5 UIFoundation 0x198862d50 -[UINibDecoder decodeObjectForKey:] + 312 (UINibDecoder.m:811)
6 UIKitCore 0x199029668 -[UIRuntimeConnection initWithCoder:] + 132 (UIRuntimeConnection.m:22)
7 UIFoundation 0x1988c793c UINibDecoderDecodeObjectForValue + 728 (UINibDecoder.m:717)
8 UIFoundation 0x1988c7b5c UINibDecoderDecodeObjectForValue + 1272 (UINibDecoder.m:611)
9 UIFoundation 0x198862d50 -[UINibDecoder decodeObjectForKey:] + 312 (UINibDecoder.m:811)
10 UIKitCore 0x199024638 -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:f... + 492 (UIClassSwapper.m:57)
11 UIKitCore 0x199027200 -[UINib instantiateWithOwner:options:] + 1068 (UINib.m:347)
12 UIKitCore 0x198d3dea4 -[UIViewController _loadViewFromNibNamed:bundle:] + 368 (UIViewController.m:3105)
13 UIKitCore 0x198d3e954 -[UIViewController loadView] + 180 (UIViewController.m:3247)
14 UIKitCore 0x198d3ec24 -[UIViewController loadViewIfRequired] + 188 (UIViewController.m:3346)
15 UIKitCore 0x198d3f30c -[UIViewController view] + 32 (UIViewController.m:3404)
16 UIKitCore 0x198c9afa4 -[UINavigationController _startCustomTransition:] + 1148 (UINavigationController.m:1893)
17 UIKitCore 0x198caf478 -[UINavigationController _startDeferredTransitionIfNeeded:] + 692 (UINavigationController.m:6719)
18 UIKitCore 0x198cb0818 -[UINavigationController __viewWillLayoutSubviews] + 176 (UINavigationController.m:6988)
19 UIKitCore 0x198c934fc -[UILayoutContainerView layoutSubviews] + 228 (UILayoutContainerView.m:86)
20 UIKitCore 0x1998766a0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2168 (UIView.m:17176)
21 QuartzCore 0x19bec94a0 -[CALayer layoutSublayers] + 292 (CALayer.mm:9644)
22 QuartzCore 0x19bec98e0 CA::Layer::layout_if_needed(CA::Transaction*) + 472 (CALayer.mm:9518)
23 QuartzCore 0x19bedbdc4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 144 (CALayer.mm:2468)
24 QuartzCore 0x19be20884 CA::Context::commit_transaction(CA::Transaction*, double) + 304 (CAContextInternal.mm:1992)
25 QuartzCore 0x19be4b3d0 CA::Transaction::commit() + 656 (CATransactionInternal.mm:438)
26 UIKitCore 0x1993d48cc _afterCACommitHandler + 144 (UIApplication.m:3120)
27 CoreFoundation 0x1951dac54 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36 (CFRunLoop.c:1758)
28 CoreFoundation 0x1951d58e4 __CFRunLoopDoObservers + 420 (CFRunLoop.c:1868)
29 CoreFoundation 0x1951d5d84 __CFRunLoopRun + 1020 (CFRunLoop.c:2910)
30 CoreFoundation 0x1951d5660 CFRunLoopRunSpecific + 480 (CFRunLoop.c:3192)
31 GraphicsServices 0x19f5e6604 GSEventRunModal + 164 (GSEvent.c:2246)
32 UIKitCore 0x1993aa15c UIApplicationMain + 1944 (UIApplication.m:4820)
33 Ministry League 0x104093b48 main + 76 (main.m:16)
34 libdyld.dylib 0x1950511ec start + 4
Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000195046df0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000194f66930 pthread_kill + 228 (pthread.c:1458)
2 libsystem_c.dylib 0x0000000194ef48b4 abort + 104 (abort.c:110)
3 libc++abi.dylib 0x0000000195019f40 abort_message + 132 (abort_message.cpp:76)
4 libc++abi.dylib 0x000000019500b8c8 demangling_terminate_handler() + 308 (cxa_default_handlers.cpp:65)
5 libobjc.A.dylib 0x0000000194f74f0c _objc_terminate() + 132 (objc-exception.mm:701)
6 libc++abi.dylib 0x00000001950193cc std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59)
7 libc++abi.dylib 0x000000019501c154 __cxa_rethrow + 148 (cxa_exception.cpp:617)
8 libobjc.A.dylib 0x0000000194f74de8 objc_exception_rethrow + 44 (objc-exception.mm:604)
9 CoreFoundation 0x00000001951d56d0 CFRunLoopRunSpecific + 592 (CFRunLoop.c:3206)
10 GraphicsServices 0x000000019f5e6604 GSEventRunModal + 164 (GSEvent.c:2246)
11 UIKitCore 0x00000001993aa15c UIApplicationMain + 1944 (UIApplication.m:4820)
12 Ministry League 0x0000000104093b48 main + 76 (main.m:16)
13 libdyld.dylib 0x00000001950511ec start + 4
What this crash log tells me is that the app is loading a NIB that includes a UISearchDisplayController when it throws an exception. UISearchDisplayController is deprecated, and should be replaced with a UISearchController. The first thing I'd try is making that replacement.

get a probeGC crash in Fabric Crashlytics

This crash is happening only on iOS 13.3.1 & 13.4.0
This crash is happening randomly and is a real deterrent to my customers.
I have update fabric library to lastest version (1.10.2).
Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x1947be090 objc_msgSend + 16
1 Foundation 0x194e564f0 probeGC + 120
2 Foundation 0x194d6cd64 -[NSConcreteMapTable rehashAround:] + 204
3 Foundation 0x194d6cc68 -[NSConcreteMapTable removeObjectForKey:] + 248
4 UIKitCore 0x198fbd484 _UIAnalyticsGatherMultitouchAnalytics + 632
5 UIKitCore 0x198b38a10 -[UIApplication sendEvent:] + 204
6 UIKitCore 0x198bb0c20 __dispatchPreprocessedEventFromEventQueue + 5880
7 UIKitCore 0x198bb317c __handleEventQueueInternal + 4924
8 UIKitCore 0x198babff0 __handleHIDEventFetcherDrain + 108
9 CoreFoundation 0x194a18a00 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
10 CoreFoundation 0x194a18958 __CFRunLoopDoSource0 + 80
11 CoreFoundation 0x194a180f0 __CFRunLoopDoSources0 + 180
12 CoreFoundation 0x194a1323c __CFRunLoopRun + 1080
13 CoreFoundation 0x194a12adc CFRunLoopRunSpecific + 464
14 GraphicsServices 0x19e9b3328 GSEventRunModal + 104
15 UIKitCore 0x198b2063c UIApplicationMain + 1936
16 xxxxxxxxxxxxxxx 0x1029863dc main + 17 (main.m:17)
17 libdyld.dylib 0x19489c360 start + 4
probably you can get some information here:
https://forums.developer.apple.com/thread/130095

my app crash in uikit ,only happen on IPhone X and above exception name NSInternalInconsistencyException

Failed to load bounding path bitmap data from the asset manager for asset name: BoundingPathBitmap-1125x2436-375x812-3.00x
The crash happen on the viewcontroller contain UIScrollView When open it,and only happens with the iPhone X and above
We develop app UI use storyboard
0 CoreFoundation ___exceptionPreprocess + 228
1 libobjc.A.dylib objc_exception_throw + 56
2 CoreFoundation +[_CFXNotificationTokenRegistration keyCallbacks]
3 Foundation -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 112
4 UIKitCore -[_UIScreenBezierBoundingPathUtilities _loadBitmapForScreen:type:] + 1124
5 UIKitCore -[_UIScreenBezierBoundingPathUtilities initWithScreen:] + 144
6 UIKitCore +[_UIScreenBoundingPathUtilities boundingPathUtilitiesForScreen:] + 108
7 UIKitCore -[UIScreen _boundingPathUtilities] + 56
8 UIKitCore -[UIWindow _boundingPath] + 168
9 UIKitCore -[UIView(UIViewBoundingPathSupportInternal) _effectiveBoundingPathAndBoundingPathView:] + 256
10 UIKitCore -[UIView(UIViewBoundingPathSupport) _inscribedRectInBoundingPathByInsettingRect:onEdges:withOptions:] + 88
11 UIKitCore -[UIScrollView(UIScrollViewInternal) _baseInsetsForTrailingEdgeAccessoryWithBoundingPathEdgesToUse:safeAreaInsets:bounds:scale:accessoryWidth:additionalInsetFromEdge:] + 180
12 UIKitCore -[UIScrollView(UIScrollViewInternal) _baseInsetsForAccessoryOnEdge:hasCustomClientInsets:accessorySize:additionalInsetFromEdge:] + 1388
13 UIKitCore -[UIScrollView(UIScrollViewInternal) _effectiveVerticalScrollIndicatorInsets] + 152
14 UIKitCore -[UIScrollView _layoutVerticalScrollIndicatorWithBounds:effectiveInset:contentOffset:fraction:additionalInset:cornerAdjust:showing:recalcSize:] + 252
15 UIKitCore -[UIScrollView _adjustScrollerIndicators:alwaysShowingThem:] + 1040
16 UIKitCore -[UIScrollView _updateForChangedScrollIndicatorRelatedInsets] + 132
17 UIKitCore __UIScrollViewAdjustForOverlayInsetsChangeIfNecessary + 512
18 UIKitCore -[UIScrollView(UIScrollViewInternal) setSafeAreaInsets:] + 312
19 UIKitCore -[UIView(Geometry) _applyISEngineLayoutValuesToBoundsOnly:] + 1288
20 UIKitCore -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 124
21 UIKitCore -[UIScrollView(_UIOldConstraintBasedLayoutSupport) _resizeWithOldSuperviewSize:] + 52
22 CoreFoundation -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 464
23 UIKitCore -[UIView(Geometry) resizeSubviewsWithOldSize:] + 156
24 UIKitCore -[UIView(AdditionalLayoutSupport) _is_layout] + 152
25 UIKitCore -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 988
26 UIKitCore -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1380
27 QuartzCore 0x00000001ca79e000 + 1309564
28 QuartzCore 0x00000001ca79e000 + 1329972
29 QuartzCore 0x00000001ca79e000 + 669080
30 QuartzCore 0x00000001ca79e000 + 859848
31 QuartzCore 0x00000001ca79e000 + 863536
32 CoreFoundation ___CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
33 CoreFoundation ___CFRunLoopDoObservers + 412
34 CoreFoundation ___CFRunLoopRun + 1264
35 CoreFoundation CFRunLoopRunSpecific + 436
36 GraphicsServices GSEventRunModal + 100
37 UIKitCore UIApplicationMain + 212
38 live main (main.mm:23)
39 libdyld.dylib 0x00000001c5d2a000 + 2996
hope someone could give me some advice, thanks
The same crash also happened in my app.
When I turned off the 'Show Horizontal Indicator' and 'Show Vertical Indicator' on the storyboard, the crash no longer occurred.
It just happened with my app .. Fixed ,
Delete the app and restart Simulator ..
^ command + shift + K to clean build folder

App crashes when keyboard is numberPad, phonePad or decimalPad (iOS 12.2, Xcode 10.2)

My app has suddenly started crashing when keyboard type is numberPad or phonePad. The crash happen in simulator and device both. I am setting keyboard type by below code.
self.textFieldMobileNumber.keyboardType = .numberPad
Default keyboard just works fine. The crash log is blow
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSSetM addObject:]: object cannot be nil'
*** First throw call stack:
(
0 CoreFoundation 0x0000000112d0f6fb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x0000000112051ac5 objc_exception_throw + 48
2 CoreFoundation 0x0000000112c5dddc _CFThrowFormattedException + 194
3 CoreFoundation 0x0000000112c81601 -[__NSSetM addObject:] + 817
4 UIKitCore 0x000000011ca49f8f +[UIKeyboardImpl uniqueNumberPadInputModesFromInputModes:forKeyboardType:] + 1257
5 UIKitCore 0x000000011ca4998f -[UIKeyboardImpl desirableInputModesWithExtensions:] + 1446
6 UIKitCore 0x000000011ca4a0cf -[UIKeyboardImpl recomputeActiveInputModesWithExtensions:] + 54
7 UIKitCore 0x000000011ca3b158 -[UIKeyboardImpl setDelegate:force:] + 3343
8 UIKitCore 0x000000011ca8db1e -[UIPeripheralHost(UIKitInternal) _reloadInputViewsForResponder:] + 1506
9 UIKitCore 0x000000011cc4d417 -[UIResponder(UIResponderInputViewAdditions) reloadInputViews] + 81
10 UIKitCore 0x000000011cc4916a -[UIResponder becomeFirstResponder] + 865
11 UIKitCore 0x000000011d0d4fb8 -[UIView(Hierarchy) becomeFirstResponder] + 145
12 UIKitCore 0x000000011cf269ec -[UITextField becomeFirstResponder] + 237
13 UIKitCore 0x000000011cee67a5 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessary] + 208
14 UIKitCore 0x000000011ced3853 -[UITextSelectionInteraction oneFingerTap:] + 3851
15 UIKitCore 0x000000011c80714d -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 57
16 UIKitCore 0x000000011c80fc69 _UIGestureRecognizerSendTargetActions + 109
17 UIKitCore 0x000000011c80d5ba _UIGestureRecognizerSendActions + 311
18 UIKitCore 0x000000011c80c897 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 966
19 UIKitCore 0x000000011c7fec4e _UIGestureEnvironmentUpdate + 2820
20 UIKitCore 0x000000011c7fe108 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 478
21 UIKitCore 0x000000011c7fde96 -[UIGestureEnvironment _updateForEvent:window:] + 200
22 UIKitCore 0x000000011cc595bc -[UIWindow sendEvent:] + 4057
23 UIKitCore 0x000000011cc37d16 -[UIApplication sendEvent:] + 356
24 UIKitCore 0x000000011cd08293 __dispatchPreprocessedEventFromEventQueue + 3232
25 UIKitCore 0x000000011cd0abb9 __handleEventQueueInternal + 5911
26 CoreFoundation 0x0000000112c76be1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
27 CoreFoundation 0x0000000112c76463 __CFRunLoopDoSources0 + 243
28 CoreFoundation 0x0000000112c70b1f __CFRunLoopRun + 1231
29 CoreFoundation 0x0000000112c70302 CFRunLoopRunSpecific + 626
30 GraphicsServices 0x00000001171ab2fe GSEventRunModal + 65
31 UIKitCore 0x000000011cc1dba2 UIApplicationMain + 140
32 IMRide 0x000000010b39beb8 main + 72
33 libdyld.dylib 0x000000011560a541 start + 1
34 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I have searched all over the internet and tried many solution from my side but the issue did not fix.
Edit
When I set default keyboard. It shows (null) for number keyboard, switching to that does not crash but when set .numberPad keyboard it starts crashing.
Check the image below for the reference
Finally I found the issue. I had overridden a method of NumberFormatter which caused the crash while showing numberPad keyboard.
Below is the method that I override which should not have been done, or done in some other way.
extension NumberFormatter {
open override func string(for obj: Any?) -> String? {
if condition {
return <some value based on condition>
}
return nil
}
}
Returning nil caused the crash. Also if you return something else rather then the obj it will print the same in keyboard keys.

Resources