You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

iOS端App崩溃求助:UIView未识别bridge方法(Android正常)

iOS端App持续崩溃问题求助(Android端运行正常)

App在iOS平台启动后持续崩溃,但Android端运行流畅。已尝试以下操作但问题未解决:

  • 删除Derived Data
  • 执行pod update、pod install
  • 清理Xcode构建文件夹

报错信息

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView bridge]: unrecognized selector sent to instance 0x7f957cf1f340'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000011227d8ab __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x000000010bdb6ba3 objc_exception_throw + 48
    2   CoreFoundation                      0x000000011228cab8 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
    3   UIKitCore                           0x000000013a17ee0a -[UIResponder doesNotRecognizeSelector:] + 264
    4   CoreFoundation                      0x0000000112281d71 ___forwarding___ + 1431
    5   CoreFoundation                      0x0000000112284068 _CF_forwarding_prep_0 + 120
    6   TestApp                       0x000000010169c204 +[ReactNativeBlobUtil getRCTEventDispatcher] + 244
    7   TestApp                       0x000000010169c6c4 __27-[ReactNativeBlobUtil init]_block_invoke + 36
    8   libdispatch.dylib                   0x000000011679cd18 _dispatch_call_block_and_release + 12
    9   libdispatch.dylib                   0x000000011679df5b _dispatch_client_callout + 8
    10  libdispatch.dylib                   0x00000001167aed55 _dispatch_main_queue_drain + 1463
    11  libdispatch.dylib                   0x00000001167ae790 _dispatch_main_queue_callback_4CF + 31
    12  CoreFoundation                      0x00000001121dcb1f __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    13  CoreFoundation                      0x00000001121d7436 __CFRunLoopRun + 2482
    14  CoreFoundation                      0x00000001121d66a7 CFRunLoopRunSpecific + 560
    15  GraphicsServices                    0x000000011fd1128a GSEventRunModal + 139
    16  UIKitCore                           0x000000013a144ad3 -[UIApplication _run] + 994
    17  UIKitCore                           0x000000013a1499ef UIApplicationMain + 123
18  TestApp                       0x0000000100f8d678 main + 104
    19  dyld                                0x000000010ba342bf start_sim + 10
    20  ???                                 0x0000000203536310 0x0 + 8645731088
)
libc++abi: terminating with uncaught exception of type NSException
Message from debugger: Terminated due to signal 6

排查解决方案

  • 版本兼容性检查:确认react-native-blob-util版本与当前React Native版本匹配,RN 0.60+版本需使用适配自动链接的库版本,尝试升级或降级该库至官方推荐的兼容版本。
  • 重置Pod依赖:执行pod deintegrate彻底移除现有Pod配置,再执行pod install重新安装依赖,避免重复链接或配置冲突。
  • 检查原生代码逻辑:查看ReactNativeBlobUtil.m中的getRCTEventDispatcher方法,确认获取RCTBridge的方式是否正确,应使用[RCTBridge currentBridge]而非错误的UIView实例。
  • 清理RN缓存:执行npm start -- --reset-cache清除React Native缓存,重启Metro后重新构建iOS项目。
  • 排查库冲突:临时移除近期新增的第三方原生库,逐一排查是否与react-native-blob-util存在冲突。

内容的提问来源于stack exchange,提问作者Kristopher Jared Ong

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.31 03:27:39