react-native-webrtc / react-native-callkit

#deprecated iOS 10 new CallKit framework for React Native
ISC License
122 stars 67 forks source link

Callkit UI doesn't appear for outgoing calls. #13

Open nikhildaga opened 7 years ago

nikhildaga commented 7 years ago

After making a call through endpoint, I am calling RNCallKit.startCall like this. But, screen remains the same as dial screen and system ui doesn't show up. What am I doing wrong?

    endpoint.makeCall(account, destination).then(
      call => {
        if (isIOS) {
          const _uuid = uuid.v4();
          this.setState({ uuid: _uuid });
          RNCallKit.startCall(_uuid, call.getRemoteFormattedNumber());
        }
      },
      error => {
        console.log(error);
      },
    );

Thank you!

ianlin commented 7 years ago

I think CallKit provides system UI for incoming calls only. startCall() makes the call records can be seen through system's Recents.

flafuente commented 6 years ago

CallKit doesn't provide the UI for outgoing calls or answered incoming calls with the phone unlocked.

CedricSoubrie commented 6 years ago

@flafuente "CallKit doesn't provide the UI for outgoing calls or answered incoming calls with the phone unlocked." What ??? This means every VoIP app needs to code the exact same interface Apple provides for incoming call when device is locked ? Isn't that super weird ?

aarkalyk commented 6 years ago

@CedricSoubrie When the phone is locked it's the system UI what you see. The thing is within your app, you should implement a custom UI, but whenever you go outside of it you can switch to the system one. So basically outgoing calls are made within your app, thus you should implement the UI.

CedricSoubrie commented 6 years ago

Thanks @aarkalyk Do you know why we have to implement our own interface when Apple have a nice and clean one which we already use when device is locked ? Don't you think it's a bit strange ?

glocore commented 5 years ago

From what I've read (link, link), CallKit will show the native UI when the phone rings in the unlocked state, but switches to the app view once the user answers the call.