2

My problem is exactly like this one App icon is not showing in CallKit UI

I've already added transparent app icon in AppDelegate's didFinishLaunchingWithOptions method for incoming voice call

configuration.iconTemplateImageData = UIImage.appIconTransparent.pngData() 

App icon doesn't show on CallKit UI for client to client call (using twilio).

I've added exactly same line for incoming video call for which it shows correctly. In this case icon is added in VC's init() method.

Why it doesn't show for incoming voice call? Is AppDelegate wrong place to add it?

Davis
  • 105
  • 1
  • 12
  • 1
    In the Twilio Callkit example application, this is done as part of `viewDidLoad` in a view controller: https://github.com/twilio/voice-callkit-quickstart-objc/blob/dcab6479edd944e41237115dcd04fee5021b3e52/ObjCVoiceCallKitQuickstart/ViewController.m#L55 – philnash Apr 08 '19 at 04:04

2 Answers2

0

You need to use the below code in order to set the app name and app icon for incoming VOIP calls

    let localizedName = NSLocalizedString("App-Name", comment: "Name of application")
    let providerConfiguration = CXProviderConfiguration(localizedName: localizedName)
    providerConfiguration.iconTemplateImageData = UIImage.init(named: "appicon-Name")?.pngData()

Note: Your app icon must be transparent.

Asad Farooq
  • 191
  • 1
  • 13
0

The icon image should be a square with side length of 40 points. It also must be transparent.

config.iconTemplateImageData = UIImage.init(named: "CallkitIcon")?.pngData()

https://developer.apple.com/documentation/callkit/cxproviderconfiguration/2274376-icontemplateimagedata

Bugs
  • 4,491
  • 9
  • 32
  • 41