Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

[iOS] Add icon for CallKit in-call UI

Saúl Ibarra Corretgé20a6a61b4551
diff --git a/ios/sdk/sdk.xcodeproj/project.pbxproj b/ios/sdk/sdk.xcodeproj/project.pbxproj
index 1081f77118..6d9712b779 100644
--- a/ios/sdk/sdk.xcodeproj/project.pbxproj
+++ b/ios/sdk/sdk.xcodeproj/project.pbxproj
@@ -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;
};
diff --git a/ios/sdk/src/CallKit.m b/ios/sdk/src/CallKit.m
index 63d700bbd6..995ec862c6 100644
--- a/ios/sdk/src/CallKit.m
+++ b/ios/sdk/src/CallKit.m
@@ -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);
diff --git a/react/features/mobile/callkit/CallKitIcon.png b/react/features/mobile/callkit/CallKitIcon.png
new file mode 100644
index 0000000000..adefa67d43
Binary files /dev/null and b/react/features/mobile/callkit/CallKitIcon.png differ
diff --git a/react/features/mobile/callkit/middleware.js b/react/features/mobile/callkit/middleware.js
index c1dfc3ef07..67900b2583 100644
--- a/react/features/mobile/callkit/middleware.js
+++ b/react/features/mobile/callkit/middleware.js
@@ -83,7 +83,7 @@ function _appWillMount({ dispatch, getState }, next, action) {
const result = next(action);
CallKit.setProviderConfiguration({
- iconTemplateImageName: 'AppIcon40x40',
+ iconTemplateImageName: 'CallKitIcon',
localizedName: NativeModules.AppInfo.name
});