Explorar el Código

[iOS] Add icon for CallKit in-call UI

master
Saúl Ibarra Corretgé hace 7 años
padre
commit
20a6a61b45

+ 4
- 0
ios/sdk/sdk.xcodeproj/project.pbxproj Ver fichero

@@ -16,6 +16,7 @@
16 16
 		0BA13D311EE83FF8007BEF7F /* ExternalAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BA13D301EE83FF8007BEF7F /* ExternalAPI.m */; };
17 17
 		0BB9AD7B1F5EC8F4001C08DB /* CallKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BB9AD7A1F5EC8F4001C08DB /* CallKit.m */; };
18 18
 		0BB9AD7D1F60356D001C08DB /* AppInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BB9AD7C1F60356D001C08DB /* AppInfo.m */; };
19
+		0BC4B8691F8C03A700CE8B21 /* CallKitIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = 0BC4B8681F8C01E100CE8B21 /* CallKitIcon.png */; };
19 20
 		0BCA495F1EC4B6C600B793EE /* AudioMode.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BCA495C1EC4B6C600B793EE /* AudioMode.m */; };
20 21
 		0BCA49601EC4B6C600B793EE /* POSIX.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BCA495D1EC4B6C600B793EE /* POSIX.m */; };
21 22
 		0BCA49611EC4B6C600B793EE /* Proximity.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BCA495E1EC4B6C600B793EE /* Proximity.m */; };
@@ -35,6 +36,7 @@
35 36
 		0BA13D301EE83FF8007BEF7F /* ExternalAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExternalAPI.m; sourceTree = "<group>"; };
36 37
 		0BB9AD7A1F5EC8F4001C08DB /* CallKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CallKit.m; sourceTree = "<group>"; };
37 38
 		0BB9AD7C1F60356D001C08DB /* AppInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppInfo.m; sourceTree = "<group>"; };
39
+		0BC4B8681F8C01E100CE8B21 /* CallKitIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = CallKitIcon.png; path = ../../react/features/mobile/callkit/CallKitIcon.png; sourceTree = "<group>"; };
38 40
 		0BCA495C1EC4B6C600B793EE /* AudioMode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AudioMode.m; sourceTree = "<group>"; };
39 41
 		0BCA495D1EC4B6C600B793EE /* POSIX.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = POSIX.m; sourceTree = "<group>"; };
40 42
 		0BCA495E1EC4B6C600B793EE /* Proximity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Proximity.m; sourceTree = "<group>"; };
@@ -63,6 +65,7 @@
63 65
 		0BCA49681EC4BBE500B793EE /* Resources */ = {
64 66
 			isa = PBXGroup;
65 67
 			children = (
68
+				0BC4B8681F8C01E100CE8B21 /* CallKitIcon.png */,
66 69
 				0BCA496B1EC4BBF900B793EE /* jitsi.ttf */,
67 70
 			);
68 71
 			name = Resources;
@@ -202,6 +205,7 @@
202 205
 			buildActionMask = 2147483647;
203 206
 			files = (
204 207
 				0BCA496C1EC4BBF900B793EE /* jitsi.ttf in Resources */,
208
+				0BC4B8691F8C03A700CE8B21 /* CallKitIcon.png in Resources */,
205 209
 			);
206 210
 			runOnlyForDeploymentPostprocessing = 0;
207 211
 		};

+ 4
- 1
ios/sdk/src/CallKit.m Ver fichero

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

BIN
react/features/mobile/callkit/CallKitIcon.png Ver fichero


+ 1
- 1
react/features/mobile/callkit/middleware.js Ver fichero

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

Loading…
Cancelar
Guardar