美文网首页
Xcode 15 runtime crasher: [dyld[

Xcode 15 runtime crasher: [dyld[

作者: 瞬csr | 来源:发表于2023-09-24 17:57 被阅读0次

升级到xcode15时,项目依赖的pod中包含如下类型的代码时

 @try {
    ...
  } @catch (NSError *e) {
    ...
  }

编译没问题,但运行项目会crash:

dyld[2544]: Symbol not found: _OBJC_CLASS_$_NSError
  Referenced from: /private/var/containers/Bundle/Application/18DFF079-5E7A-49C0-B8BF-9B43A6BD88CB/Runner.app/Runner
  Expected in: /private/var/containers/Bundle/Application/18DFF079-5E7A-49C0-B8BF-9B43A6BD88CB/Runner.app/Frameworks/camera_avfoundation.framework/camera_avfoundation

解决办法,就是将NSError *改为 NSException *

 @try {
    ...
  } @catch (NSException *e) {
    ...
  }

在运行项目就没问题了。

参考资料:
https://github.com/RonRadtke/react-native-blob-util/pull/288
https://developer.apple.com/forums/thread/735610

相关文章

网友评论

      本文标题:Xcode 15 runtime crasher: [dyld[

      本文链接:https://www.haomeiwen.com/subject/lyxqbdtx.html