Closed psdevss closed 2 years ago
Please paste the example code you are using. You need to add the module in the sdk target, not the app.
I'm trying to implement the iOS screen share using replaykit and HoppFoundation's implementation but I can't bridge the ScreenShareController to the react native part. Here is a sample code
@implementation ScreenShareController
RCT_EXPORT_MODULE();
(id)allocWithZone:(NSZone )zone { static ScreenShareController sharedInstance = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ sharedInstance = [super allocWithZone:zone]; }); return sharedInstance; }
(ScreenShareController*) getSingleton { return [ScreenShareController allocWithZone:nil]; }
(NSArray<NSString > )supportedEvents { return @[@"ScreenRecState"]; }
-(void) recStarted { NSLog(@"starting recording"); [self sendEventWithName:@"ScreenRecState" body:@{@"name": @"recStarted"}]; }
-(void) recStopped { NSLog(@"stopping recording"); [self sendEventWithName:@"ScreenRecState" body:@{@"name": @"recStopped"}]; }
//stopRecording RCT_EXPORT_METHOD(stopRecording) { RCTLogInfo(@"stopping recording - from react native"); [SocketShim closeSocket]; }
@end
Why are you not doing it the same way they did?
I did. I have an existing app, so I tried to copy their implementation step by step but mine doesn't seem to bridge correctly. It is alway null
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Description:
Steps to reproduce:
Expected behavior:
No errors
Actual behavior:
native component and native event is always null
Server information:
Additional information:
[error][tid:com.facebook.react.JavaScript] Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication) [JitsiMeetSDK] Unhandled JS Exception: Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)