I'm following the example posted in the official doc for native module ios. I've set up everything, build it and run the application.
// CAL.h
#import <React/RCTBridgeModule.h>
@interface CAL : NSObject <RCTBridgeModule>
@end
// CAL.m
#import <React/RCTLog.h>
#import "CAL.h"
@implementation CAL
RCT_EXPORT_MODULE(CAL);
RCT_EXPORT_METHOD(createCalendarEvent:(NSString *)name location:(NSString *)location)
{
RCTLogInfo(@"Pretending to create an event %@ at %@", name, location);
}
@end
But when I check NativeModules from react-native it shows an empty object - {}.
I'm not sure what I'm missing.