React native objective C component set property not working

Viewed 15

I need to use a native iOS component from React Native. Without any property, it's working well. Now I'm trying to pass a ``bannerDetails` prop, but it's throwing an error all the time. Event with a simple view. This is the obj-c part.

#import <React/RCTViewManager.h>

@interface MyBannerViewManager: RCTViewManager
@end

@implementation MyBannerViewManager
RCT_EXPORT_MODULE(POBBannerView)


- (UIView *) view {
  // Simple view for now...
  return [[UIView alloc] init];
}

RCT_EXPORT_VIEW_PROPERTY(bannerDetails, NSDictionary *)

@end

The error i'm getting is [POBBannerView setBannerDetails:]: unrecognized selector sent to instance 0x144b39630

0 Answers
Related