question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

parameter 'localizedName' cannot be nil'

See original GitHub issue

Bug 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:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
boygiandicommented, Jul 2, 2020

hi @willnaoosmit because I forgot to start at callkeep at the screen ^^

Can you show me the code, please ?

1reaction
linus-komnickcommented, Jul 28, 2021

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:

import VoipPushNotification from 'react-native-voip-push-notification';
import RNCallKeep from 'react-native-callkeep';

    const options: any = {
        ios: {
            appName: 'React Native PjSip',
        }
    };
    RNCallKeep.setup(options);

    VoipPushNotification.addEventListener('notification', (notification) => {
        const { uuid, handle } = notification;
        RNCallKeep.displayIncomingCall(uuid, handle);
    });
Read more comments on GitHub >

github_iconTop Results From Across the Web

[iOS] displayIncomingCall throws an error: parameter ... - GitHub
displayIncomingCall() using parameters described in the read me like ... throws an error: parameter 'localizedName' cannot be nil' #125.
Read more >
CXProviderDelegate Methods not called - Stack Overflow
setDelegate(self, queue: nil) // 'nil' means it will run on main queue ... error occurs if the system cannot handle the new outgoing...
Read more >
contentsForType:error: | Apple Developer Documentation
When you return a non- nil value in the outError parameter, the completion handlers for the following methods don't get called: saveToURL:forSaveOperation: ...
Read more >
"Fossies" - the Fresh Open Source Software Archive
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Go source code syntax highlighting...
Read more >
Tutorial: Build a video call app with iOS CallKit & Sendbird Calls
Provided codes may not be the only implementations. You can customize them to suit ... Initialize the CXProviderConfiguration object with a localized name....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found