Comments (11)
I was trying to figure this out for a while. It turned out to be a simulator issue.
To trigger the listeners, Run and build on a physical device through Xcode.
from react-native-voip-push-notification.
@nikhildaga did you figure this one out?
from react-native-voip-push-notification.
@eugenehp : I think its a bug in library. Instead of listening for voip notification register event its listening for push notifications register event .
When you turn on push notifications capability in xcode, the register event will be triggered.
But, the token we get is for push notification, not voip.
from react-native-voip-push-notification.
interesting. thanks for sharing this @nikhildaga
isn't voip push notification is a push notification in a nutshell?
how did you solve this issue after all?
from react-native-voip-push-notification.
Sorry for late, quite busy recently.
We've been using this module for a year, everything works as expected. There is no chance this module listens to normal push notification events as long as you set up PushKit delegate correctly in your AppDelegate.m
. Can you share your setup information as well as the versions of react-native and this module you use?
Cheers.
from react-native-voip-push-notification.
Hi @ianlin, thanks for your reply.
I am using latest version of rn and this module.
I created a sample repo following exact steps in readme: https://github.com/nikhildaga/voip
You can see the commits here: https://github.com/nikhildaga/voip/commits/master
The register event doesn't trigger.
I get the following warnings in xcode
Logs:
2017-04-22 18:18:10.801 [info][tid:main][RCTBatchedBridge.m:75] Initializing <RCTBatchedBridge: 0x1701b0300> (parent: <RCTBridge: 0x1700dc620>, executor: RCTJSCExecutor)
2017-04-22 18:18:10.807519-0700 voip[262:10909] Initializing <RCTBatchedBridge: 0x1701b0300> (parent: <RCTBridge: 0x1700dc620>, executor: RCTJSCExecutor)
2017-04-22 18:18:10.949 [warn][tid:com.facebook.react.JavaScript][RCTModuleData.mm:220] RCTBridge required dispatch_sync to load RCTDevSettings. This may lead to deadlocks
2017-04-22 18:18:10.949809-0700 voip[262:11058] RCTBridge required dispatch_sync to load RCTDevSettings. This may lead to deadlocks
2017-04-22 18:18:11.014344-0700 voip[262:10909] [RNVoipPushNotificationManager] constantsToExport currentState = active
2017-04-22 18:18:12.277 [info][tid:main][RCTRootView.m:284] Running application voip ({
initialProps = {
};
rootTag = 1;
})
2017-04-22 18:18:12.277348-0700 voip[262:10909] Running application voip ({
initialProps = {
};
rootTag = 1;
})
2017-04-22 18:18:12.281 [info][tid:com.facebook.react.JavaScript] Running application "voip" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
2017-04-22 18:18:12.281551-0700 voip[262:11058] Running application "voip" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
2017-04-22 18:18:12.292490-0700 voip[262:11046] [] nw_connection_get_connected_socket_block_invoke 3 Connection has no connected handler
2017-04-22 18:18:12.376161-0700 voip[262:11046] [RNVoipPushNotificationManager] voipRegistration
2017-04-22 18:18:14.426177-0700 voip[262:11077] [] nw_connection_get_connected_socket_block_invoke 4 Connection has no connected handler```
from react-native-voip-push-notification.
Hi @nikhildaga, thanks for the repo!
I have tried your repo and yes the register is never called however I've found others had encountered the same problem (this and this) and those are resolved by Enabling Push Notification Capability in Xcode. :/
This is quite weird and since I've been enabling both in my own project so I haven't run into this problem. I will update this in the README and thanks for your reporting anyway!
Cheers,
Ian
from react-native-voip-push-notification.
@ianlin, hi!
I have the same problem - register event doesn't trigger.
In capabilities i have enabled "Push notification" and manually added VOIP support into info.plist
So I can't get VOIP token for testing.
from react-native-voip-push-notification.
@Vetalyo @nikhildaga I had the exact same problem. And as absurd as this sounds, restarting my phone fixed this for me. Hope it helps you too.
from react-native-voip-push-notification.
My register
and notification
events get triggered correctly, but the localNotification
event is never triggered.
from react-native-voip-push-notification.
same 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
- TypeError: Cannot read property 'wakeupByPush' of undefined
- 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
- 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.