voximplant / react-native-voximplant

Voximplant mobile SDK for React Native (iOS/Android)
http://voximplant.com
205 stars 39 forks source link

IOS 13 Push Notification #101

Open ielonclesio opened 4 years ago

ielonclesio commented 4 years ago

Hello, I am using React Native Voip Notification and everything was working correctly, but on IOS 13 it stopped working. Is there any way to work PUSH Notification on IOS 13?

YuliaGrigorieva commented 4 years ago

Hello @ielonclesio !

Thank you for reaching out to us!

Apple changed the requirements for VoIP push notifications handling in iOS 13. According to the new requirements, it is now required to use CallKit framework and report new incoming call from the native iOS code (objective-c / swift).

We have updated our demo project to meet the new requirements. Please take a look at the latest version.

Please let us know if you face any issues.

Best regards, Yulia Grigorieva

ielonclesio commented 4 years ago

Hello, Thanks for the answer. My project is using React-Native. Is it possible to make any adaptation in this case? Regards.

YuliaGrigorieva commented 4 years ago

Hello @ielonclesio ,

The demo project is using React Native and we have adapted for the new requirements using react-native-callkeep and react-native-voip-push-notification modules.

https://github.com/voximplant/react-native-demo

Could you please test the demo project and let me know if you observe any issues?

Best regards, Yulia Grigorieva

ielonclesio commented 4 years ago

Hello, Thanks again for the answer, but does the demo work if the user has already logged in, but has already expired the VoxImplant Cloud token and is required when receiving the call to log in to capture the incoming call? Best regards, Ielon Clesio

YuliaGrigorieva commented 4 years ago

Hello,

The demo project has the functionality to login with access token. Currently it does not have the functionality to refresh the access token if it expired. However, it should not block the testing of incoming calls with push notifications.

Best regards, Yulia Grigorieva

ielonclesio commented 4 years ago

OK. I am trying to run this version of the demo to verify its operation with IOS 13, but it is giving error Invariation Violation: Native module cannot be null. Best Regards. Ielon Clesio

YuliaGrigorieva commented 4 years ago

Hello,

Please ensure that you ran pod install from react-native-demo/ios folder.

Best regards, Yulia Grigorieva

ielonclesio commented 4 years ago

Yes, i performed, but the error goes on.

Best regards, Ielon Clesio

ielonclesio commented 4 years ago

Hello, I made the changes as the demo and is working in the background, but when the application is active, when accepting the call automatically occurs a disconnect event, it is as if there were accepting two calls. I am using exactly your classes without any changes.

Best Regards,

Ielon Clesio

YuliaGrigorieva commented 4 years ago

Hello,

Have you added these lines of code to your AppDelegate? https://github.com/voximplant/react-native-demo/blob/cb7ba4d2c238149b8f9c326796c44bbe720e3a3e/ios/VoximplantDemo/AppDelegate.m#L50-L54

This code reports new incoming call from objective-c code only if the application is not in the foreground.

We have also checked the demo project, it should work. Please ensure that you run the command exactly in this order and there are no errors in their outputs:

Best regards, Yulia Grigorieva

ielonclesio commented 4 years ago

Hello,

Yes, you have this code. From what I noticed when calling showIncomingCall from the CallManager class the application is in idle state because of the CallKit screen and at this moment enters the Push call too, generating 2 instances of CallKit and accepting the call is immediately rejected.

Best Regards,

Ielon

giftset commented 4 years ago

@ielonclesio yay, it happens to me too. did you find any solutions for this?