升級(jí)到xcode15時(shí),項(xiàng)目依賴的pod中包含如下類(lèi)型的代碼時(shí)
@try {
...
} @catch (NSError *e) {
...
}
編譯沒(méi)問(wèn)題,但運(yùn)行項(xiàng)目會(huì)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) {
...
}
在運(yùn)行項(xiàng)目就沒(méi)問(wèn)題了。
參考資料:
https://github.com/RonRadtke/react-native-blob-util/pull/288
https://developer.apple.com/forums/thread/735610