parameter 'localizedName' cannot be nil'
See original GitHub issueBug report
I use apn to push voip with the following content
note.badge = 1; note.alert = “You have 111 new call”; note.payload = { uuid: “0731961b-415b-44f3-a960-dd94ef3372fc”, callerName: “John Appleseed hi”, handle: “testemail@email.com”, extraPayLoad: “John Appleseed ID”, }; note.topic = “com.demo.practice.webrtc.voip”; apnProvider.send (note, [deviceToken])
–> in AppDelegate.m I have configured to receive data
NSString *uuid = [payload.dictionaryPayload valueForKey:@“uuid”]; NSString *callerName =[payload.dictionaryPayload valueForKey:@“callerName”]; NSString *handle = [payload.dictionaryPayload valueForKey:@“handle”]; NSDictionary *extra = [payload.dictionaryPayload valueForKey:@“extraPayLoad”]; // — You should make sure to report to callkit BEFORE execute
completion()
[RNCallKeep reportNewIncomingCall:uuid handle:handle handleType:@“email” hasVideo:false localizedCallerName:callerName fromPushKit: YES payload:extra];
-> When I get the message, I get the uuid, but I always get the error: parameter ‘localizedName’ cannot be nil ’
Demo WebRTC[3182:891552] [RNVoipPushNotificationManager] didReceiveIncomingPushWithPayload payload.dictionaryPayload = { aps = { alert = “You have 111 new call”; badge = 1; }; callerName = “John Appleseed hi”; extraPayLoad = “John Appleseed ID”; handle = “testemail@email.com”; messageFrom = “John Appleseed”; uuid = “0731961b-415b-44f3-a960-dd94ef3372fc”; }, type = PKPushTypeVoIP 2020-04-21 23:59:58.059200+0700 Demo WebRTC[3182:891552] [RNVoipPushNotificationManager] handleRemoteNotificationReceived notification.userInfo = { aps = { alert = “You have 111 new call”; badge = 1; }; callerName = “John Appleseed hi”; extraPayLoad = “John Appleseed ID”; handle = “testemail@email.com”; messageFrom = “John Appleseed”; uuid = “0731961b-415b-44f3-a960-dd94ef3372fc”; } 2020-04-21 23:59:58.059852+0700 Demo WebRTC[3182:891552] [RNCallKeep][reportNewIncomingCall] uuidString = 0731961b-415b-44f3-a960-dd94ef3372fc 2020-04-21 23:59:58.060032+0700 Demo WebRTC[3182:891552] [RNCallKeep][getProviderConfiguration] 2020-04-21 23:59:58.060395+0700 Demo WebRTC[3182:891552] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[CXProviderConfiguration initWithLocalizedName:]: parameter ‘localizedName’ cannot be nil’
- Reproduced on:
- iOS
Versions
- Callkeep:"3.0.12",
- React Native: "0.62.0",
- iOS:13.3.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Can you show me the code, please ?
This is how I solved it: The code that receives the notification and then displays the incoming call should be placed at the beginning. Initialise it as soon as possible. In my case I initialised it after the login and that was the reason it didn’t work. Now I’m running it before the login, in App.js and it works great.
Here the code: