I am trying to pass to react-native a BOOL from objective C. My code is:
-(void)editProfile:(BOOL) success
{
[self sendEventWithName:@"editUserProfile" body:success];
}
I keep getting the error:
Implicit conversion of 'BOOL' (aka 'bool') to 'id' is disallowed with ARC
Any thoughts?
The body parameter is an object, not a primitive. You need to convert success to an NSNumber. The easiest way is with @():
[self sendEventWithName:@"editUserProfile" body:@(success)];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With