[iOS] Add icon for CallKit in-call UI

This commit is contained in:
Saúl Ibarra Corretgé 2017-10-09 15:23:25 -05:00 committed by Lyubo Marinov
parent fafffb519b
commit 20a6a61b45
4 changed files with 9 additions and 2 deletions

View File

@ -16,6 +16,7 @@
0BA13D311EE83FF8007BEF7F /* ExternalAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BA13D301EE83FF8007BEF7F /* ExternalAPI.m */; };
0BB9AD7B1F5EC8F4001C08DB /* CallKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BB9AD7A1F5EC8F4001C08DB /* CallKit.m */; };
0BB9AD7D1F60356D001C08DB /* AppInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BB9AD7C1F60356D001C08DB /* AppInfo.m */; };
0BC4B8691F8C03A700CE8B21 /* CallKitIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = 0BC4B8681F8C01E100CE8B21 /* CallKitIcon.png */; };
0BCA495F1EC4B6C600B793EE /* AudioMode.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BCA495C1EC4B6C600B793EE /* AudioMode.m */; };
0BCA49601EC4B6C600B793EE /* POSIX.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BCA495D1EC4B6C600B793EE /* POSIX.m */; };
0BCA49611EC4B6C600B793EE /* Proximity.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BCA495E1EC4B6C600B793EE /* Proximity.m */; };
@ -35,6 +36,7 @@
0BA13D301EE83FF8007BEF7F /* ExternalAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExternalAPI.m; sourceTree = "<group>"; };
0BB9AD7A1F5EC8F4001C08DB /* CallKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CallKit.m; sourceTree = "<group>"; };
0BB9AD7C1F60356D001C08DB /* AppInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppInfo.m; sourceTree = "<group>"; };
0BC4B8681F8C01E100CE8B21 /* CallKitIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = CallKitIcon.png; path = ../../react/features/mobile/callkit/CallKitIcon.png; sourceTree = "<group>"; };
0BCA495C1EC4B6C600B793EE /* AudioMode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AudioMode.m; sourceTree = "<group>"; };
0BCA495D1EC4B6C600B793EE /* POSIX.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = POSIX.m; sourceTree = "<group>"; };
0BCA495E1EC4B6C600B793EE /* Proximity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Proximity.m; sourceTree = "<group>"; };
@ -63,6 +65,7 @@
0BCA49681EC4BBE500B793EE /* Resources */ = {
isa = PBXGroup;
children = (
0BC4B8681F8C01E100CE8B21 /* CallKitIcon.png */,
0BCA496B1EC4BBF900B793EE /* jitsi.ttf */,
);
name = Resources;
@ -202,6 +205,7 @@
buildActionMask = 2147483647;
files = (
0BCA496C1EC4BBF900B793EE /* jitsi.ttf in Resources */,
0BC4B8691F8C03A700CE8B21 /* CallKitIcon.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@ -260,7 +260,10 @@ RCT_EXPORT_METHOD(updateCall:(NSString *)callUUID
// iconTemplateImageData
NSString *iconTemplateImageName = dictionary[@"iconTemplateImageName"];
if (iconTemplateImageName) {
UIImage *iconTemplateImage = [UIImage imageNamed:iconTemplateImageName];
UIImage *iconTemplateImage
= [UIImage imageNamed:iconTemplateImageName
inBundle:[NSBundle bundleForClass:self.class]
compatibleWithTraitCollection:nil];
if (iconTemplateImage) {
providerConfiguration.iconTemplateImageData
= UIImagePNGRepresentation(iconTemplateImage);

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

View File

@ -83,7 +83,7 @@ function _appWillMount({ dispatch, getState }, next, action) {
const result = next(action);
CallKit.setProviderConfiguration({
iconTemplateImageName: 'AppIcon40x40',
iconTemplateImageName: 'CallKitIcon',
localizedName: NativeModules.AppInfo.name
});