3
我已經爲CallKit iOS配置了我的提供程序配置。其中我還設置了'iconTemplateImageData',用於在CallKit UI中顯示應用程序圖標。但應用圖標未顯示。它顯示一個白色方形框。應用程序圖標未在CallKit UI中顯示
提供配置代碼:
CXProviderConfiguration *configuration = [[CXProviderConfiguration alloc] initWithLocalizedName:[NSString stringWithFormat:@"%@\n", _title]];
configuration.maximumCallGroups = 1;
configuration.maximumCallsPerCallGroup = 1;
UIImage *callkitIcon = [UIImage imageNamed:@"AppIcon"];
configuration.iconTemplateImageData = UIImagePNGRepresentation(callkitIcon);
_callKitProvider = [[CXProvider alloc] initWithConfiguration:configuration];
[_callKitProvider setDelegate:self queue:nil];
_callKitCallController = [[CXCallController alloc] initWithQueue:dispatch_get_main_queue()];
我用APPICON圖像 'Images.xcassets' 與尺寸: - 1X: 40 * 40,2倍: 80 * 80,3x: 120 * 120
請幫助爲什麼我的應用程序圖標不顯示。
在此先感謝。
看到這個演示應用程序可能會幫助你:https://developer.apple.com/library/content/samplecode/Speakerbox/Introduction/Intro.html –
我已經看到它。這裏他們也使用了相同的方法來設置AppIcon的配置。 Like ....... if let iconMaskImage = UIImage(named:「IconMask」){ providerConfiguration.iconTemplateImageData = UIImagePNGRepresentation(iconMaskImage) } –
open var iconTemplateImageData:Data? //圖片應該是一個邊長爲40分的正方形 –