I am trying to set the value of an @objc object in my Swift code using obj.setValue(value, forKey: key).
@objc
obj.setValue(value, forKey: key)
It works fine when the object has the
see this answer:
// // ExceptionCatcher.h // #import NS_INLINE NSException * _Nullable tryBlock(void(^_Nonnull tryBlock)(void)) { @try { tryBlock(); } @catch (NSException *exception) { return exception; } return nil; }