ios - 使用硬件键盘 iOS Swift 按“Shift”时 WKWebView 应用程序崩溃
问题描述
我正在使用WKWebView
,当我尝试在WebPage
使用HardWare KeyBoard应用程序中插入任何值时,应用程序崩溃了。当我用我的External KeyBoardShift按+时,它总是崩溃。Any Other Key
注意: -我已经尝试
webview.keyboardDisplayRequiresUserAction
过true
false
我已经尝试过以下解决方案,但如果用户回答传入的 iMessage ,则 WKWebView 崩溃对我不起作用。
调用文件选择器时,带有新 iOS13 模式的 WKWebview 崩溃。
由于 NSInvalidUnarchiveOperationException 导致 iOS11 WKWebview 崩溃崩溃日志
2021-04-14 19:05:25.253969+0530 ZapDial[13417:318028] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1]'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23e3de6e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff512a19b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23ed09d1 _CFThrowFormattedException + 194
3 CoreFoundation 0x00007fff23edb426 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:].cold.4 + 38
4 CoreFoundation 0x00007fff23e9c6e7 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 247
5 CoreFoundation 0x00007fff23e39d71 +[NSDictionary dictionaryWithObjects:forKeys:count:] + 49
6 UIAccessibility 0x00007fff4877c634 AXUIAutomationHandleKeyComplete + 200
7 WebKitLegacy 0x000000011c197592 sendNotificationAfterHandlingWebKeyEventIfNeeded + 144
8 WebKitLegacy 0x000000011c1974ee -[DOMNodeAccessibility handleKeyWebEvent:] + 72
9 CoreFoundation 0x00007fff23e44dec __invoking___ + 140
10 CoreFoundation 0x00007fff23e41fd1 -[NSInvocation invoke] + 321
11 CoreFoundation 0x00007fff23e422a4 -[NSInvocation invokeWithTarget:] + 68
12 UIKitCore 0x00007fff498c7b79 -[UIThreadSafeNode forwardInvocation:] + 92
13 CoreFoundation 0x00007fff23e42616 ___forwarding___ + 838
14 CoreFoundation 0x00007fff23e44b58 _CF_forwarding_prep_0 + 120
15 UIKitCore 0x00007fff49192ccb -[UIKeyboardImpl _handleWebKeyEvent:withEventType:withInputString:withInputStringIgnoringModifiers:executionContext:] + 635
16 UIKitCore 0x00007fff49194b14 -[UIKeyboardImpl handleModifiersChangeForKeyEvent:executionContext:] + 528
17 UIKitCore 0x00007fff491a965d -[UIKeyboardTaskEntry execute:] + 147
18 UIKitCore 0x00007fff491a8173 -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 310
19 UIKitCore 0x00007fff49193ec6 -[UIKeyboardImpl handleKeyEvent:] + 201
20 CoreFoundation 0x00007fff23e44dec __invoking___ + 140
21 CoreFoundation 0x00007fff23e41fd1 -[NSInvocation invoke] + 321
22 UIKitCore 0x00007fff4971d9a1 -[UIRepeatedAction invoke] + 278
23 UIKitCore 0x00007fff4971dba1 -[UIRepeatedAction _preInvocationTimerFire] + 45
24 UIKitCore 0x00007fff4938d523 -[UIApplication _handleKeyboardPressEvent:] + 2214
25 UIKitCore 0x00007fff49377487 -[UIApplication pressesBegan:withEvent:] + 401
26 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
27 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
28 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
29 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
30 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
31 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
32 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
33 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
34 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
35 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
36 UIKitCore 0x00007fff48bf7489 -[UITabBarController pressesBegan:withEvent:] + 115
37 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
38 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
39 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
40 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
41 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
42 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
43 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
44 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
45 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
46 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
47 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
48 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
49 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
50 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
51 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
52 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
53 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
54 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
55 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
56 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
57 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
58 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
59 UIKitCore 0x00007fff493a045a forwardTouchMethod + 323
60 UIKitCore 0x00007fff493a4182 -[UIResponder pressesBegan:withEvent:] + 49
61 UIKitCore 0x00007fff493afde8 -[UIWindow _sendButtonsForEvent:] + 393
62 UIKitCore 0x00007fff493b0dbd -[UIWindow sendEvent:] + 3273
63 UIKitCore 0x00007fff4938b6cd -[UIApplication sendEvent:] + 356
64 UIKit 0x00000001140260b8 -[UIApplicationAccessibility sendEvent:] + 85
65 UIKitCore 0x00007fff4938c356 -[UIApplication _handleKeyUIEvent:] + 627
66 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
67 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
68 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
69 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
70 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
71 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
72 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
73 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
74 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
75 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
76 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
77 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
78 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
79 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
80 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
81 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
82 UIKitCore 0x00007fff493a3705 -[UIResponder _handleKeyUIEvent:] + 79
83 UIKitCore 0x00007fff4938c402 -[UIApplication handleKeyUIEvent:] + 79
84 UIKitCore 0x00007fff4938c0c2 -[UIApplication handleKeyHIDEvent:] + 535
85 UIKit 0x000000011401fb05 -[UIApplicationAccessibility handleKeyHIDEvent:] + 41
86 UIKitCore 0x00007fff49415781 __dispatchPreprocessedEventFromEventQueue + 4227
87 UIKitCore 0x00007fff4941968e __handleEventQueueInternal + 6584
88 UIKitCore 0x00007fff4940ff31 __handleHIDEventFetcherDrain + 88
89 CoreFoundation 0x00007fff23da1c91 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
90 CoreFoundation 0x00007fff23da1bbc __CFRunLoopDoSource0 + 76
91 CoreFoundation 0x00007fff23da1394 __CFRunLoopDoSources0 + 180
92 CoreFoundation 0x00007fff23d9bf8e __CFRunLoopRun + 974
93 CoreFoundation 0x00007fff23d9b8a4 CFRunLoopRunSpecific + 404
94 GraphicsServices 0x00007fff38c05bbe GSEventRunModal + 139
95 UIKitCore 0x00007fff49372964 UIApplicationMain + 1605
96 ZapDial 0x000000010c7fab2b main + 75
97 libdyld.dylib 0x00007fff5211c1fd start + 1
98 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
解决方案
推荐阅读
- parsing - 为上下文敏感的标记语言编写词法分析器,具有递归结构,例如嵌套列表
- xamarin - Xamarin.Forms 检测自定义 ContentView 单击外部事件
- c# - 如何在 ASP.NET Core MVC 中使用数据库中的数据制作下拉列表
- delphi - 将 EPSG:2180 中的 X、Y 转换为
- sql - 禁用触发器语法 (Oracle)
- linq - LinqToSql 表不返回任何对象
- neo4j - Neo4j 和 Electron 的结合
- r - 哪些 R 包适合绘制随时间推移的疾病传播?
- javascript - ng2charts 使用带有数组值的borderColor
- pagination - 如何在不使用库文件的情况下在 Codeigniter 中设置分页