Ios React native Native modules return my module with null

848 views Asked by At

I tried to implement the example of the Native Module for ios, but the module doesn't seem to be registered.

RCTCalendarModule.h

#import <React/RCTBridgeModule.h>
@interface RCTCalendarModule : NSObject <RCTBridgeModule>
@end

RCTCalendarModule.m

#import "RCTCalendarModule.h"

@implementation RCTCalendarModule

// To export a module named RCTCalendarModule
RCT_EXPORT_MODULE();
#import <React/RCTLog.h>
RCT_EXPORT_METHOD(createCalendarEvent:(NSString *)name location:(NSString *)location)
{
 RCTLogInfo(@"Pretending to create an event %@ at %@", name, location);
}
@end

enter image description here

0

There are 0 answers