Back to All

iOS App crashes when using setItems & setTabs to implement dynamic menus using JavaScript Bridge.

After implementing dynamic menus using setItems(for sidebar navigation) & setTabs(for bottom navigation) with JavaScript Bridge, iOS App crashes though android app works fine.

I checked release notes for iOS and it says that problem resolved back in 2023.
https://median.co/docs/release-notes-ios-2023

Here is the output from debug log


2024-06-12 07:56:58.541 Median[87738:2552217] Received error while fetching deferred app link Error Domain=ATTrackingManager.AuthorizationStatus must be authorized for deferred deep linking to work. Read more at: https://developer.apple.com/documentation/apptrackingtransparency Code=-1 "(null)"

2024-06-12 07:56:59.051 Median[87738:2552217] got original agent Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[LEANWebViewController showNavigationItemButtonsAnimated:]: unrecognized selector sent to instance 0x158029200'
First throw call stack:
(
0 CoreFoundation 0x0000000109eed128 exceptionPreprocess + 172
1 libobjc.A.dylib 0x000000010727012c objcexception_throw + 56
2 CoreFoundation 0x0000000109f01f78 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
3 UIKitCore 0x000000013aa0c6e0 -[UIResponder doesNotRecognizeSelector:] + 232
4 CoreFoundation 0x0000000109ef1278
forwarding___ + 1280
5 CoreFoundation 0x0000000109ef359c _CF_forwarding_prep_0 + 92
6 GoNativeCore 0x0000000104f29858 -[GNJSBridgeHandler handleUrl:query:wvc:] + 8332

7   Median                              0x00000001045bc14c -[LEANWebViewController handleJSBridgeFunct  ions:] + 372
8   Median                              0x00000001045d6c10 -[GNJSBridgeInterface userContentController:didReceiveScriptMessage:] + 276
9   WebKit                              0x000000010a893c2c _ZN28ScriptMessageHandlerDelegate14didPostMessageERN6WebKit12WebPageProxyEONS0_13FrameInfoDataERN3API12ContentWorldERN7WebCore21SerializedScriptValueE + 224

10  WebKit                              0x000000010ac50c00 _ZN6WebKit29WebUserContentControllerProxy14didPostMessageEN3WTF23ObjectIdentifierGenericINS_26WebPageProxyIdentifierTypeENS1_38ObjectIdentifierMainThreadAccessTraitsEEEONS_13FrameInfoDataEyRKNSt3	11  WebKit                              0x000000010af84534 _ZN3IPC18handleMessageAsyncIN8Messages29WebUserContentControllerProxy14DidPostMessageEN6WebKit29WebUserContentControllerProxyES5_FvN3WTF23ObjectIdentifierGenericINS4_26WebPageProxyIdentifierTypeE	12  WebKit                              0x000000010af84464 _ZN6WebKit29WebUserContentControllerProxy17didReceiveMessageERN3IPC10ConnectionERNS1_  7DecoderE + 76
13  WebKit                              0x000000010afd4714 _ZN3IPC18MessageReceiverMap15dispatchMessageERNS_10ConnectionERNS_7DecoderE + 252
14  WebKit                              0x000000010abd3108 _ZN6WebKit15WebProcessProxy17didReceiveMessageERN3IPC10ConnectionERNS1_7DecoderE + 36
15  WebKit                              0x000000010afd0924 _ZN3IPC10Connection15dispatchMessageENSt3__110unique_ptrINS_7DecoderENS1_14default_deleteIS3_EEEE + 732
16  WebKit                              0x000000010afd0c44 _ZN3IPC10Connection24dispatchIncomingMessagesEv + 468
17  JavaScriptCore                      0x00000001193822b4 _ZN3WTF7RunLoop11performWorkEv + 176
18  JavaScriptCore                      0x0000000119382fc4 _ZN3WTF7RunLoop11performWorkEPv + 32
19  CoreFoundation                      0x0000000109e4df18 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
20  CoreFoundation                      0x0000000109e4de60 __CFRunLoopDoSource0 + 172

Melibc++abi: terminating due to uncaught exception of type NSException

Can anyone help?

Thanks.