Posts

Post not yet marked as solved
4 Replies
1.7k Views
I was migrating from Xcode 14 -> 15, and noticed that my code was failing with dyld[46534]: Symbol not found: _OBJC_CLASS_$_NSError I was able to debug the problem to some old objective c code, as documented in this thread: https://github.com/RonRadtke/react-native-blob-util/issues/273 The error seems to stem from this particular try catch block @try { // Some code } @catch(NSError *er) { // handle error } When I convert the code to catch an NSException instead, the runtime error goes away. Understandably, according to the apple docs, it should be throwing an NSException in the first place, but the documents do say Important: Although you can throw and catch objects other than NSException objects, the Cocoa frameworks themselves might only catch NSException objects for some conditions. So if you throw other types of objects, the Cocoa handlers for that exception might not run, with undefined results. (Conversely, non-NSException objects that you throw could be caught by some Cocoa handlers.) For these reasons, it is recommended that you throw NSException objects only, while being prepared to catch exception objects of all types. So it seems like this should not have produced a runtime error. I wanted to flag this in case the underlying code behind the @try @catch changed unintentionally.
Posted
by mojolili.
Last updated
.
Post not yet marked as solved
0 Replies
328 Views
Been using Xcode 14 for a couple of weeks now, and it seems like the level of these build errors has skyrocketed from 0 on Xcode 13 to every couple of minutes. Not sure why it's happening so often now, any one have any ideas? It seems to happen particularly often if I'm running fastlane. SPM also seems to be struggling.
Posted
by mojolili.
Last updated
.