Comments (21)
Adding the following to the
didReceiveIncomingPushWithPayload
always me to get the call notification when the app is in the background. Still cannot get it to work when the app has been killed.NSString *uuid = [[NSUUID UUID] UUIDString]; [RNCallKeep reportNewIncomingCall:uuid handle:@"07...." handleType:@"number" hasVideo:NO localizedCallerName:@"CallersName" fromPushKit:YES];
As a quick question have you tried pushing to TestFlight and using the non-sandbox url? I’ve noticed that background ringing doesn’t work reliably with the app in debug scheme/dev mode, and release doesn’t prompt for production device tokens until pushed.
However I’ve never had an issue with the app in TestFlight or production and receiving calls while killed. I really think it’s a limitation of the sandbox.
from react-native-voip-push-notification.
Ok so I've been digging into it, and we need to "start" the call within
- (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(NSString *)type { // Process the received push [RNVoipPushNotificationManager didReceiveIncomingPushWithPayload:payload forType:(NSString *)type]; }
you dispatch an event here
- (void)handleRemoteNotificationReceived:(NSNotification *)notification { NSLog(@"[RNVoipPushNotificationManager] handleRemoteNotificationReceived notification.userInfo = %@", notification.userInfo); [_bridge.eventDispatcher sendDeviceEventWithName:@"voipRemoteNotificationReceived" body:notification.userInfo]; }
but that's native code and I can't imagine that we can call callkeep here.
So my idea is instead to run the call start from callkeep within the listener for notification within the RNVoipPushNotification's contstructor through adding a callback. Not sure if this is the right direction to go though but apple is restricting how we handle voip notifications in iOS 13.
If I can I'll attempt to implement this and submit a PR for it. If anyone has another solution I'd love to hear it.
from react-native-voip-push-notification.
- If you are using this library to display incoming call to user: react-native-callkeep support it already
- If you are using this library for another purposes -> They will stop working, you have to use another solution for your app.
from react-native-voip-push-notification.
I made a fix to my app delegate that called the CallKeep native code function for displaying the call screen. I triggered this within my appdelegate. In fact CallKeep has since updated their documentation to provide this fix. Their solution is cleaner and I have switched my temp fix to their changes.
I closed this issue since it was not an issue for this package to fix, as it still works properly for iOS 13, it just requires a different implementation.
from react-native-voip-push-notification.
Hi @ajnozari
As document said
optional func pushRegistry(_ registry: PKPushRegistry,
didReceiveIncomingPushWith payload: PKPushPayload,
for type: PKPushType,
completion: @escaping () -> Void)
On iOS 13.0 and later, incoming Voice over IP calls must be reported when they are received and before this method finishes execution
So I think we have to call displayIncomingCall (from RNCallKeep) directly.
I made some update here
r0b0t3d/react-native-callkeep@3bed1be
And call it inside AppDelegate.m
// Handle incoming pushes
- (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(NSString *)type {
// Process the received push
NSLog(@"RNVoipPushNotificationManager pushRegistry received");
// Add this line
[[RNCallKeep sharedInstance] displayIncomingCall:@"110ec58a-a0f2-4ac4-8393-c866d813b8d1" handle:@"generic" handleType:@"" hasVideo:true localizedCallerName:@"Caller Name"];
[RNVoipPushNotificationManager didReceiveIncomingPushWithPayload:payload forType:(NSString *)type];
}
How do you think?
from react-native-voip-push-notification.
I don’t see any outright issues. I’ll give it a test later. Had to pause things as we’re migrating to a new host.
from react-native-voip-push-notification.
Hi everybody !
Some news about that ? What we need to change in our code to adapt it for iOS 13 ?
There will be an update of the module to support IOS 13 ?
What sort of changes implies IOS 13 about voip notification ?
Apple told us we had until April 2020 to make this changes to our app, but for react-native, I have actually no idea about what we need to do.
Thank you :)
Florient
from react-native-voip-push-notification.
@r0b0t3d @ianlin @Linoa65
This library is deprecated and will not get any update any more ( for example iOS 13 ) ?
Or maybe(i wish!) someone will take care and stay this library a live and updated ?
It's really good library!
There is another alternative ? the only thing i see is this : https://documentation.onesignal.com/docs/voip-notifications but it's have just regular react native library and not voip react native library .
tnx!
from react-native-voip-push-notification.
Will you be interested in keep this library working closely with callkeep?
Or is there someone willing to do this?
from react-native-voip-push-notification.
Hello there,
I have not enough skills in IOS development to correctly update this library, but if needed I can help and try to maintain it with other developers. This library is simple and effective, all we need I react-native, and it is not needed to work with call kit (what I need to have to display my calls like I want).
Thanks ! :)
from react-native-voip-push-notification.
anyone gone to take care on this library ? it's really god one , the modifications is big ?
from react-native-voip-push-notification.
Hello, sorry we don't talk about that with @manuquentin but we don't really use it. @zxcpoiu you need to find a new maintainer for this lib?
from react-native-voip-push-notification.
I don't understand what implied the new way to catch notification VOiP. Is at registering we need to modify things ? Because I heard that we need to immediately send notification to CallKit to handle the VOiP notification, but I need to use my own custom display for the call, is it possible ?
from react-native-voip-push-notification.
So with IOS 13 within the loop that listens for the incoming VOIP notification you have to complete the handling and tell the phone to display the call at that point. This happens in your appdelegate.m.
Call kit has extended themselves to handle this and can handle the voip.
from react-native-voip-push-notification.
@ajnozari how complicated is to change the library to support that ?
from react-native-voip-push-notification.
@ajnozari how complicated is to change the library to support that ?
So I made a temp fix before these packages were updated, and that took me maybe 15 minutes.
Now that these packages are properly updated, it’s probably a copy-paste from the readme with a moment spent to check and make sure your variable names in the payload matches the native code and you’re done.
This will require you to edit the AppDelegate.m (which you should have already done once if push notifications are implemented in your app). So you will have to probably make minor edits to native code (see above about variable names). However if you’ve gotten this far it’s not a complicated fix.
from react-native-voip-push-notification.
Closing as this has been fixed by recent updates.
from react-native-voip-push-notification.
@ajnozari Thanks, but I can't see your code or any pull request , did you update the library or something?
from react-native-voip-push-notification.
@ajnozari to be clear: was it fixed by an update to this package, an update to iOS, or #36 (comment)
from react-native-voip-push-notification.
Adding the following to the didReceiveIncomingPushWithPayload
always me to get the call notification when the app is in the background. Still cannot get it to work when the app has been killed.
NSString *uuid = [[NSUUID UUID] UUIDString];
[RNCallKeep reportNewIncomingCall:uuid handle:@"07...." handleType:@"number" hasVideo:NO localizedCallerName:@"CallersName" fromPushKit:YES];
from react-native-voip-push-notification.
Closing as this has been fixed by recent updates.
Which updates fixed this issue ?
from react-native-voip-push-notification.
Related Issues (20)
- App crashes when i receive a VOIP notification when a call is cancelled. HOT 2
- delete this.
- No notification was received when the app entered the "Killed" state. HOT 4
- Integrating with Expo HOT 12
- App kill, bundle is made but no event or RNCallKeep run HOT 3
- VoipPushNotification.addEventListener('notification', () => {}); call twice HOT 12
- TypeError: Cannot read property 'registerVoipToken' of null
- Production/Staging Token HOT 1
- Sometimes Incoming Call UI does not display in background: Voip Push Dropped On Floor HOT 13
- _delayedEvents multiple initialisation HOT 1
- Unable to send Notification HOT 2
- Why is `didInvalidatePushTokenForType` event not listenable on the js ?
- Auto Linking is not working HOT 1
- Errors while building - AppDelegate.m HOT 1
- No known class method for selector 'reportNewIncomingCall' HOT 2
- EAS Build HOT 1
- error run: Expected a type HOT 4
- read "payload" in JS HOT 1
- unrecognized selector sent to instance HOT 3
- Ringing after logout HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-voip-push-notification.