question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[iOS] [Bug report] isCallActive return undefined

See original GitHub issue

As docs in https://reactnative.dev/docs/native-modules-ios, ReactNative method always return void so to pass value to JS layer, we need to use callback, Promise or eventEmitter.

Current iOS implement. Return boolean value in this method doesn’t send to JS layer

+ (BOOL)isCallActive:(NSString *)uuidString
{
    CXCallObserver *callObserver = [[CXCallObserver alloc] init];
    NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:uuidString];

    for(CXCall *call in callObserver.calls){
        NSLog(@"[RNCallKeep] isCallActive %@ %d ?", call.UUID, [call.UUID isEqual:uuid]);
        if([call.UUID isEqual:[[NSUUID alloc] initWithUUIDString:uuidString]] && !call.hasConnected){
            return true;
        }
    }
    return false;
}

Js index:

isCallActive = async(uuid) => await RNCallKeepModule.isCallActive(uuid);

I already tried with Promise method, it’s work but not for my case. I needed to call this method each second so I changed to event emitter to prevent “illegal callback invocation from native module” error.

PR is not available atm.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ajnozaricommented, Dec 28, 2020

@devWaleed I’m finally back at this part of our app and am giving this a look now. I’ll have a pr coming soon.

0reactions
eminberkaycommented, Oct 20, 2022

the best is to find different library.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug Reporting - Apple Developer
Reports that discuss multiple issues aren't actionable and may be returned for resubmission as separate reports. Title. Your report title should be concise, ......
Read more >
Unable to reproduce TypeError: 'undefined' is not an object
I have tried enabling debug mode in safari on both an iPhone and iPad but not able to reproduce the bug. Here is...
Read more >
Error from Companion - undefined variable (irritants:yail/1)
I have successfully used the iOS app to run a soundboard-type app ... variable (irritants:yail/0) therefore similar problem prev report ...
Read more >
Bug Report: iOS SDK 6.4.0 introduces "Undefined symbols for ...
Hi New Relic, I just tracked down and verified a bug I was seeing with the newly release New Relic Agent 6.4.0 on...
Read more >
Feature Request/Bug Report Form - Adobe
Welcome to the Feature Request and Bug Report Submission Form. ... and that Adobe has no obligation to return anything submitted, respond to, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found