-
Notifications
You must be signed in to change notification settings - Fork 67
help setting up event listener? #44
Comments
+1 |
@aarkalyk Do you have any thoughts here? I'm sorry to mention you without prompting, just figured you may have some helpful insights! Thanks |
Listeners not working for me, none fired when receive calls, or i make calls.. |
Hey guys! Are you sure you've implemented this delegate method? - (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void(^)(NSArray * __nullable restorableObjects))restorationHandler
{
return [RNCallKit application:application
continueUserActivity:userActivity
restorationHandler:restorationHandler];
} |
Hi @aarkalyk, thank you so much for responding! This is my AppDelegate.m, please let me know what you think!
|
I think these lines should be removed. No need to initialize RNCallKit. ///*
//Initialise RNCallKit
RNCallKit *rncallkit = [[RNCallKit alloc] init];
//Initialise React Bridge with RNCallKit
RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:jsCodeLocation
moduleProvider:^{ return @[rncallkit]; }
launchOptions:launchOptions];
//Initialise React Root View with React Bridge you've just created
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"catchup"
initialProperties:nil];
//*/ |
@aarkalyk Ok I'll give this a shot, thanks a ton! |
I have removed these lines and no working in my project |
Hi @aarkalyk, thanks for all your help so far. I commented out the lines you suggested in AppDelegate.m, and still can't get the EventListener functions to work. Here is the main component that I am using to try and display current call information (right now just to the console). The main difference with what is listed in the npm doc for callkit is the initialization (i.e., using Again the problem is that when starting a call from Recents and from ending a call I don't see the output from the functions
|
I think I have react-native-callkit set up correctly, because I can get checkIfBusy to report
true
if I am in a call, andfalse
otherwise. I am somewhat new to react-native so please forgive me if this is something basic!However, I'm having trouble getting the event listeners to work.
My current setup is this:
in the component constructor:
RNCallKit.addEventListener('didReceiveStartCallAction', this.onRNCallKitDidReceiveStartCallAction);
as the first component method after the constructor and the state declaration:
I open the app on my Iphone (5s with iOS 11.4), with XCode and the debugger running, and make a call from my Recents, but the console doesn't display '--Start call action--', which I interpret to mean that this event is not being processed.
I'm not seeing any error messages or anything. Thank you for any help!
The text was updated successfully, but these errors were encountered: