@robono/calling-react-native 0.11.2 → 0.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/INCOMING-CALLS.md +9 -3
- package/README.md +1 -1
- package/SBOM.spdx.json +65 -41
- package/dist/appearance.d.ts +6 -0
- package/dist/appearance.js +10 -0
- package/dist/messenger.d.ts +2 -0
- package/dist/messenger.js +21 -2
- package/dist/system-calling.js +2 -1
- package/dist/versions.d.ts +1 -1
- package/dist/versions.js +1 -1
- package/ios/RobonoCallKitIcon.h +56 -0
- package/ios/RobonoSystemCalling.m +14 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.11.3
|
|
4
|
+
|
|
5
|
+
- Sync applied website calling logos automatically. Preserve cached branding for locked iPhone calls, support removal and account changes, and refresh without interrupting active calls. Older apps need one SDK update; subsequent logo changes require no rebuild.
|
|
6
|
+
|
|
3
7
|
## 0.11.2
|
|
4
8
|
|
|
5
9
|
- Automatically bundle the website’s downloaded `.robono/callkit-icon.json` during iPhone builds. Explicit `callKitIcon` options take precedence. An exported removal restores the default on rebuild. Android setup is unchanged.
|
package/INCOMING-CALLS.md
CHANGED
|
@@ -109,8 +109,14 @@ controller with `attach`, pass `audio` to the native media adapter, and register
|
|
|
109
109
|
its notification fields with the normal device. Clear it before changing accounts.
|
|
110
110
|
Never construct account scopes from unverified notification contents.
|
|
111
111
|
|
|
112
|
-
###
|
|
112
|
+
### Automatic website logos (calling 0.11.3+, Messenger 0.25.1+)
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
Customers choose a calling screen and **iPhone call icon** in the website designer, upload a transparent PNG, then save and apply the design. No file download or project-file changes are required. Applied branding travels through the authenticated calling appearance response; drafts are never distributed.
|
|
115
115
|
|
|
116
|
-
The
|
|
116
|
+
The shared native Messenger refreshes the appearance when opened and once per minute while active. iOS stores the validated PNG atomically in an account-scoped local cache accessible while locked. Provider configuration reads that cache before React starts; incoming-call reporting never waits for a download. Removal is also synchronized, including across restarts. A failed fetch or invalid image retains the last good icon. Signing out clears the cached branding. A saved design without a website icon restores the optional bundled fallback.
|
|
117
|
+
|
|
118
|
+
Apps built with older SDKs need one native update to gain this capability. Subsequent logo changes need no rebuild. A phone must open the updated app online to receive its first logo or a later change; a phone that has not synced yet uses its previous icon or bundled fallback. Apple controls the icon’s placement and monochrome presentation. This Apple-specific icon does not change Android’s calling interface.
|
|
119
|
+
|
|
120
|
+
Custom calling hosts pass the authenticated `appearance` to `system.updateAppearance(appearance)` whenever it changes. `createMessengerCalling` provides `onAppearance` and `refreshAppearance()` so a host can refresh without reconnecting or ending a call. Shared Messenger wires these automatically. Hosts with their own CallKit provider remain responsible for that provider.
|
|
121
|
+
|
|
122
|
+
The optional `callKitIcon` plugin path and existing `.robono/callkit-icon.json` files remain supported as build-time fallbacks for older integrations. Website branding takes precedence once synchronized.
|
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ Installing the engine never installs or opens these screens. Importing this pack
|
|
|
27
27
|
Install the versioned calling engine and the optional mobile package from npm:
|
|
28
28
|
|
|
29
29
|
```sh
|
|
30
|
-
npm install @robono/calling@0.7.0 @robono/calling-react-native@0.11.
|
|
30
|
+
npm install @robono/calling@0.7.0 @robono/calling-react-native@0.11.3
|
|
31
31
|
```
|
|
32
32
|
The screens need React, React Native, React Native SVG and Safe Area Context 5. The native audio and notification adapters support the following Expo dependency families:
|
|
33
33
|
|
package/SBOM.spdx.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"spdxVersion": "SPDX-2.3",
|
|
3
3
|
"dataLicense": "CC0-1.0",
|
|
4
4
|
"SPDXID": "SPDXRef-DOCUMENT",
|
|
5
|
-
"name": "@robono/calling-react-native@0.11.
|
|
6
|
-
"documentNamespace": "https://robono.com/sbom/calling-react-native/0.11.
|
|
5
|
+
"name": "@robono/calling-react-native@0.11.3",
|
|
6
|
+
"documentNamespace": "https://robono.com/sbom/calling-react-native/0.11.3/0758bf3e55c3d66b222ac572ebebb29b6c02c8f7",
|
|
7
7
|
"creationInfo": {
|
|
8
|
-
"created": "2026-11-
|
|
8
|
+
"created": "2026-11-16T10:40:20.027Z",
|
|
9
9
|
"creators": [
|
|
10
10
|
"Organization: Robono (support@robono.com)"
|
|
11
11
|
]
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
{
|
|
15
15
|
"name": "@robono/calling-react-native",
|
|
16
16
|
"SPDXID": "SPDXRef-Package",
|
|
17
|
-
"versionInfo": "0.11.
|
|
17
|
+
"versionInfo": "0.11.3",
|
|
18
18
|
"downloadLocation": "NOASSERTION",
|
|
19
19
|
"filesAnalyzed": true,
|
|
20
20
|
"packageVerificationCode": {
|
|
21
|
-
"packageVerificationCodeValue": "
|
|
21
|
+
"packageVerificationCodeValue": "0758bf3e55c3d66b222ac572ebebb29b6c02c8f7"
|
|
22
22
|
},
|
|
23
23
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
24
24
|
"licenseDeclared": "LicenseRef-RobonoSDK",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"checksums": [
|
|
37
37
|
{
|
|
38
38
|
"algorithm": "SHA256",
|
|
39
|
-
"checksumValue": "
|
|
39
|
+
"checksumValue": "bcaa57b627dc7d0bb8f20e7b6dc01ab1a7a2c6d74d14f7a907cb1c9da330d97b"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"algorithm": "SHA1",
|
|
43
|
-
"checksumValue": "
|
|
43
|
+
"checksumValue": "808cfdb6f6791d29764e59720cfdcf91083761d1"
|
|
44
44
|
}
|
|
45
45
|
],
|
|
46
46
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"checksums": [
|
|
56
56
|
{
|
|
57
57
|
"algorithm": "SHA256",
|
|
58
|
-
"checksumValue": "
|
|
58
|
+
"checksumValue": "2179c191fec4f9c8d0cd7d4855aa5274f000824d087e7dc30397695fd7aeffaa"
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"algorithm": "SHA1",
|
|
62
|
-
"checksumValue": "
|
|
62
|
+
"checksumValue": "698faaa0502a71e505af252524d7a765ae3f8012"
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
65
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -93,11 +93,11 @@
|
|
|
93
93
|
"checksums": [
|
|
94
94
|
{
|
|
95
95
|
"algorithm": "SHA256",
|
|
96
|
-
"checksumValue": "
|
|
96
|
+
"checksumValue": "61ad2e9bf0c79ebbffd4d6d3a29d732f28f30995e024e7a469adba566d95f021"
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
"algorithm": "SHA1",
|
|
100
|
-
"checksumValue": "
|
|
100
|
+
"checksumValue": "c1327f8b85d48baf936483b41ed08e11961c51dd"
|
|
101
101
|
}
|
|
102
102
|
],
|
|
103
103
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -5185,11 +5185,11 @@
|
|
|
5185
5185
|
"checksums": [
|
|
5186
5186
|
{
|
|
5187
5187
|
"algorithm": "SHA256",
|
|
5188
|
-
"checksumValue": "
|
|
5188
|
+
"checksumValue": "5143f51a87acbaec4c441fd9b2929879a50ce1fb966f96d96a1dceb9738189fa"
|
|
5189
5189
|
},
|
|
5190
5190
|
{
|
|
5191
5191
|
"algorithm": "SHA1",
|
|
5192
|
-
"checksumValue": "
|
|
5192
|
+
"checksumValue": "e598baa35d04d36de8a37f7d484ec54f98acbb5f"
|
|
5193
5193
|
}
|
|
5194
5194
|
],
|
|
5195
5195
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -5204,11 +5204,11 @@
|
|
|
5204
5204
|
"checksums": [
|
|
5205
5205
|
{
|
|
5206
5206
|
"algorithm": "SHA256",
|
|
5207
|
-
"checksumValue": "
|
|
5207
|
+
"checksumValue": "7a79b837fe936415856cce84b8975836aa97b045f64f1d046ece3ed43e073b7b"
|
|
5208
5208
|
},
|
|
5209
5209
|
{
|
|
5210
5210
|
"algorithm": "SHA1",
|
|
5211
|
-
"checksumValue": "
|
|
5211
|
+
"checksumValue": "4a68284591defc1618db1069b2d35ec327b027c4"
|
|
5212
5212
|
}
|
|
5213
5213
|
],
|
|
5214
5214
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -5831,11 +5831,11 @@
|
|
|
5831
5831
|
"checksums": [
|
|
5832
5832
|
{
|
|
5833
5833
|
"algorithm": "SHA256",
|
|
5834
|
-
"checksumValue": "
|
|
5834
|
+
"checksumValue": "217017c8c9c418539fa6d817a93fe2e43c409e29e4e280d4a1d8a605f9cd06a8"
|
|
5835
5835
|
},
|
|
5836
5836
|
{
|
|
5837
5837
|
"algorithm": "SHA1",
|
|
5838
|
-
"checksumValue": "
|
|
5838
|
+
"checksumValue": "12eae06ccdc84b254e83b887a7b4c80ff867b1fa"
|
|
5839
5839
|
}
|
|
5840
5840
|
],
|
|
5841
5841
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -5850,11 +5850,11 @@
|
|
|
5850
5850
|
"checksums": [
|
|
5851
5851
|
{
|
|
5852
5852
|
"algorithm": "SHA256",
|
|
5853
|
-
"checksumValue": "
|
|
5853
|
+
"checksumValue": "ba2ee5cdc3201777545bb5d730b46ef9fdc072b661914b8d6bf98b90779d0dd1"
|
|
5854
5854
|
},
|
|
5855
5855
|
{
|
|
5856
5856
|
"algorithm": "SHA1",
|
|
5857
|
-
"checksumValue": "
|
|
5857
|
+
"checksumValue": "2910a2ad235f6cd4733d4fe55bdecd0dfb820a5a"
|
|
5858
5858
|
}
|
|
5859
5859
|
],
|
|
5860
5860
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -6154,11 +6154,11 @@
|
|
|
6154
6154
|
"checksums": [
|
|
6155
6155
|
{
|
|
6156
6156
|
"algorithm": "SHA256",
|
|
6157
|
-
"checksumValue": "
|
|
6157
|
+
"checksumValue": "ffdf7edd162e0ec80d8871e2e0d3724215570af353f9373fa32aa3fe1927bfa2"
|
|
6158
6158
|
},
|
|
6159
6159
|
{
|
|
6160
6160
|
"algorithm": "SHA1",
|
|
6161
|
-
"checksumValue": "
|
|
6161
|
+
"checksumValue": "3c82f7d1eb665cfe0a8f5c5d7bcf678c836732c4"
|
|
6162
6162
|
}
|
|
6163
6163
|
],
|
|
6164
6164
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -6211,11 +6211,11 @@
|
|
|
6211
6211
|
"checksums": [
|
|
6212
6212
|
{
|
|
6213
6213
|
"algorithm": "SHA256",
|
|
6214
|
-
"checksumValue": "
|
|
6214
|
+
"checksumValue": "7be3f6c42dd36c379121cd48791ad5c092d834da6078351f1fe8a01954103e53"
|
|
6215
6215
|
},
|
|
6216
6216
|
{
|
|
6217
6217
|
"algorithm": "SHA1",
|
|
6218
|
-
"checksumValue": "
|
|
6218
|
+
"checksumValue": "f55dfba235f2f07441e41ad7fc48f4eb91cc04c6"
|
|
6219
6219
|
}
|
|
6220
6220
|
],
|
|
6221
6221
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -6230,11 +6230,11 @@
|
|
|
6230
6230
|
"checksums": [
|
|
6231
6231
|
{
|
|
6232
6232
|
"algorithm": "SHA256",
|
|
6233
|
-
"checksumValue": "
|
|
6233
|
+
"checksumValue": "a8dcf29eb7359881a4f5ee4f91fabdb13469fd6aae3f1c50277c559e7650c99d"
|
|
6234
6234
|
},
|
|
6235
6235
|
{
|
|
6236
6236
|
"algorithm": "SHA1",
|
|
6237
|
-
"checksumValue": "
|
|
6237
|
+
"checksumValue": "8d2590e20bc873514f732fbbb84c80752aabec5c"
|
|
6238
6238
|
}
|
|
6239
6239
|
],
|
|
6240
6240
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -6472,8 +6472,27 @@
|
|
|
6472
6472
|
"copyrightText": "Copyright (c) 2026 Add to Loop LLC."
|
|
6473
6473
|
},
|
|
6474
6474
|
{
|
|
6475
|
-
"fileName": "./ios/
|
|
6475
|
+
"fileName": "./ios/RobonoCallKitIcon.h",
|
|
6476
6476
|
"SPDXID": "SPDXRef-File-339",
|
|
6477
|
+
"checksums": [
|
|
6478
|
+
{
|
|
6479
|
+
"algorithm": "SHA256",
|
|
6480
|
+
"checksumValue": "b137354d4576fa6e4ee5c2c107b46450c45e5a6f39062a1c29a1e72ec99edea4"
|
|
6481
|
+
},
|
|
6482
|
+
{
|
|
6483
|
+
"algorithm": "SHA1",
|
|
6484
|
+
"checksumValue": "5d8dc85481acfbd87f48688b37aae9e8a7c949f8"
|
|
6485
|
+
}
|
|
6486
|
+
],
|
|
6487
|
+
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
6488
|
+
"licenseInfoInFiles": [
|
|
6489
|
+
"LicenseRef-RobonoSDK"
|
|
6490
|
+
],
|
|
6491
|
+
"copyrightText": "Copyright (c) 2026 Add to Loop LLC."
|
|
6492
|
+
},
|
|
6493
|
+
{
|
|
6494
|
+
"fileName": "./ios/RobonoSystemCalling.h",
|
|
6495
|
+
"SPDXID": "SPDXRef-File-340",
|
|
6477
6496
|
"checksums": [
|
|
6478
6497
|
{
|
|
6479
6498
|
"algorithm": "SHA256",
|
|
@@ -6492,15 +6511,15 @@
|
|
|
6492
6511
|
},
|
|
6493
6512
|
{
|
|
6494
6513
|
"fileName": "./ios/RobonoSystemCalling.m",
|
|
6495
|
-
"SPDXID": "SPDXRef-File-
|
|
6514
|
+
"SPDXID": "SPDXRef-File-341",
|
|
6496
6515
|
"checksums": [
|
|
6497
6516
|
{
|
|
6498
6517
|
"algorithm": "SHA256",
|
|
6499
|
-
"checksumValue": "
|
|
6518
|
+
"checksumValue": "d50803862c3486660f8156bfb3ba61c55fa773fdebd4a92a58ae07f65c6d652b"
|
|
6500
6519
|
},
|
|
6501
6520
|
{
|
|
6502
6521
|
"algorithm": "SHA1",
|
|
6503
|
-
"checksumValue": "
|
|
6522
|
+
"checksumValue": "8eab0dadf028303b472696028748363990ee06ab"
|
|
6504
6523
|
}
|
|
6505
6524
|
],
|
|
6506
6525
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -6511,7 +6530,7 @@
|
|
|
6511
6530
|
},
|
|
6512
6531
|
{
|
|
6513
6532
|
"fileName": "./ios/RobonoVideoBackgrounds.m",
|
|
6514
|
-
"SPDXID": "SPDXRef-File-
|
|
6533
|
+
"SPDXID": "SPDXRef-File-342",
|
|
6515
6534
|
"checksums": [
|
|
6516
6535
|
{
|
|
6517
6536
|
"algorithm": "SHA256",
|
|
@@ -6530,7 +6549,7 @@
|
|
|
6530
6549
|
},
|
|
6531
6550
|
{
|
|
6532
6551
|
"fileName": "./licenses/robono-icons-lucide-license.txt",
|
|
6533
|
-
"SPDXID": "SPDXRef-File-
|
|
6552
|
+
"SPDXID": "SPDXRef-File-343",
|
|
6534
6553
|
"checksums": [
|
|
6535
6554
|
{
|
|
6536
6555
|
"algorithm": "SHA256",
|
|
@@ -6549,7 +6568,7 @@
|
|
|
6549
6568
|
},
|
|
6550
6569
|
{
|
|
6551
6570
|
"fileName": "./licenses/robono-icons-weather-attribution.txt",
|
|
6552
|
-
"SPDXID": "SPDXRef-File-
|
|
6571
|
+
"SPDXID": "SPDXRef-File-344",
|
|
6553
6572
|
"checksums": [
|
|
6554
6573
|
{
|
|
6555
6574
|
"algorithm": "SHA256",
|
|
@@ -6568,7 +6587,7 @@
|
|
|
6568
6587
|
},
|
|
6569
6588
|
{
|
|
6570
6589
|
"fileName": "./licenses/robono-icons-weather-license.txt",
|
|
6571
|
-
"SPDXID": "SPDXRef-File-
|
|
6590
|
+
"SPDXID": "SPDXRef-File-345",
|
|
6572
6591
|
"checksums": [
|
|
6573
6592
|
{
|
|
6574
6593
|
"algorithm": "SHA256",
|
|
@@ -6587,15 +6606,15 @@
|
|
|
6587
6606
|
},
|
|
6588
6607
|
{
|
|
6589
6608
|
"fileName": "./package.json",
|
|
6590
|
-
"SPDXID": "SPDXRef-File-
|
|
6609
|
+
"SPDXID": "SPDXRef-File-346",
|
|
6591
6610
|
"checksums": [
|
|
6592
6611
|
{
|
|
6593
6612
|
"algorithm": "SHA256",
|
|
6594
|
-
"checksumValue": "
|
|
6613
|
+
"checksumValue": "fff8841e456e105d7c592a4096899ae03d93e6bf0ac7685d6c5142c11ee0e64e"
|
|
6595
6614
|
},
|
|
6596
6615
|
{
|
|
6597
6616
|
"algorithm": "SHA1",
|
|
6598
|
-
"checksumValue": "
|
|
6617
|
+
"checksumValue": "ff9d44e9280bba6a4c04df09a699802094e355d5"
|
|
6599
6618
|
}
|
|
6600
6619
|
],
|
|
6601
6620
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -6606,7 +6625,7 @@
|
|
|
6606
6625
|
},
|
|
6607
6626
|
{
|
|
6608
6627
|
"fileName": "./plugin/callkit-icon.cjs",
|
|
6609
|
-
"SPDXID": "SPDXRef-File-
|
|
6628
|
+
"SPDXID": "SPDXRef-File-347",
|
|
6610
6629
|
"checksums": [
|
|
6611
6630
|
{
|
|
6612
6631
|
"algorithm": "SHA256",
|
|
@@ -6625,7 +6644,7 @@
|
|
|
6625
6644
|
},
|
|
6626
6645
|
{
|
|
6627
6646
|
"fileName": "./plugin/incoming-calls.cjs",
|
|
6628
|
-
"SPDXID": "SPDXRef-File-
|
|
6647
|
+
"SPDXID": "SPDXRef-File-348",
|
|
6629
6648
|
"checksums": [
|
|
6630
6649
|
{
|
|
6631
6650
|
"algorithm": "SHA256",
|
|
@@ -6644,7 +6663,7 @@
|
|
|
6644
6663
|
},
|
|
6645
6664
|
{
|
|
6646
6665
|
"fileName": "./plugin/picture-in-picture.cjs",
|
|
6647
|
-
"SPDXID": "SPDXRef-File-
|
|
6666
|
+
"SPDXID": "SPDXRef-File-349",
|
|
6648
6667
|
"checksums": [
|
|
6649
6668
|
{
|
|
6650
6669
|
"algorithm": "SHA256",
|
|
@@ -6663,7 +6682,7 @@
|
|
|
6663
6682
|
},
|
|
6664
6683
|
{
|
|
6665
6684
|
"fileName": "./plugin/screensharing.cjs",
|
|
6666
|
-
"SPDXID": "SPDXRef-File-
|
|
6685
|
+
"SPDXID": "SPDXRef-File-350",
|
|
6667
6686
|
"checksums": [
|
|
6668
6687
|
{
|
|
6669
6688
|
"algorithm": "SHA256",
|
|
@@ -6682,7 +6701,7 @@
|
|
|
6682
6701
|
},
|
|
6683
6702
|
{
|
|
6684
6703
|
"fileName": "./react-native.config.js",
|
|
6685
|
-
"SPDXID": "SPDXRef-File-
|
|
6704
|
+
"SPDXID": "SPDXRef-File-351",
|
|
6686
6705
|
"checksums": [
|
|
6687
6706
|
{
|
|
6688
6707
|
"algorithm": "SHA256",
|
|
@@ -8460,6 +8479,11 @@
|
|
|
8460
8479
|
"spdxElementId": "SPDXRef-Package",
|
|
8461
8480
|
"relationshipType": "CONTAINS",
|
|
8462
8481
|
"relatedSpdxElement": "SPDXRef-File-350"
|
|
8482
|
+
},
|
|
8483
|
+
{
|
|
8484
|
+
"spdxElementId": "SPDXRef-Package",
|
|
8485
|
+
"relationshipType": "CONTAINS",
|
|
8486
|
+
"relatedSpdxElement": "SPDXRef-File-351"
|
|
8463
8487
|
}
|
|
8464
8488
|
],
|
|
8465
8489
|
"hasExtractedLicensingInfos": [
|
package/dist/appearance.d.ts
CHANGED
|
@@ -89,6 +89,12 @@ export type CallingScreenStyle = {
|
|
|
89
89
|
export declare function callingStyleScreen(kind?: 'voice' | 'video', group?: boolean): CallingStyleScreen;
|
|
90
90
|
export declare function callingScreenAppearance(a: CallingAppearance, screen: CallingStyleScreen): CallingAppearance;
|
|
91
91
|
export interface CallingAppearance {
|
|
92
|
+
/** Server-supplied website branding. Omitted preserves a bundled fallback; null removes it. */
|
|
93
|
+
callKitIcon?: {
|
|
94
|
+
pngBase64: string;
|
|
95
|
+
} | null;
|
|
96
|
+
/** A successful server lookup; allows restoring an older design without an icon. */
|
|
97
|
+
callKitIconManaged?: boolean;
|
|
92
98
|
screenStyles?: Partial<Record<CallingStyleScreen, CallingScreenStyle>>;
|
|
93
99
|
schemaVersion: 1;
|
|
94
100
|
appName: string;
|
package/dist/appearance.js
CHANGED
|
@@ -98,6 +98,16 @@ export function validateCallingAppearance(input) {
|
|
|
98
98
|
throw Error("Use an HTTPS logo address.");
|
|
99
99
|
const out = defaultCallingAppearance(v.appName.trim());
|
|
100
100
|
out.logoUrl = v.logoUrl;
|
|
101
|
+
if (v.callKitIconManaged === true)
|
|
102
|
+
out.callKitIconManaged = true;
|
|
103
|
+
// Invalid optional branding must never disable calling. Native validates PNG
|
|
104
|
+
// structure and decoded dimensions before replacing the last good icon.
|
|
105
|
+
if (v.callKitIcon === null)
|
|
106
|
+
out.callKitIcon = null;
|
|
107
|
+
else if (v.callKitIcon && typeof v.callKitIcon.pngBase64 === 'string' && v.callKitIcon.pngBase64.length <= 87384 && /^[A-Za-z0-9+/]+={0,2}$/.test(v.callKitIcon.pngBase64))
|
|
108
|
+
out.callKitIcon = { pngBase64: v.callKitIcon.pngBase64 };
|
|
109
|
+
else if (v.callKitIcon !== undefined)
|
|
110
|
+
delete out.callKitIconManaged;
|
|
101
111
|
for (const key of Object.keys(callingColors)) {
|
|
102
112
|
const x = v.theme?.[key];
|
|
103
113
|
if (typeof x !== "string" || !/^#[0-9a-f]{6}$/i.test(x)) {
|
package/dist/messenger.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export interface MessengerCallAdapters extends Pick<CallingOptions, 'media' | 'a
|
|
|
24
24
|
export interface MessengerCallingOptions {
|
|
25
25
|
request: (operation: string, input: Record<string, unknown>) => Promise<any>;
|
|
26
26
|
adapters: (appearance: CallingAppearance) => MessengerCallAdapters;
|
|
27
|
+
onAppearance?: (appearance: CallingAppearance) => void;
|
|
27
28
|
resolveContact?: (conversationId: string) => Contact | null;
|
|
28
29
|
resolveMember?: (appId: string, userId: string) => Contact | null;
|
|
29
30
|
deviceCheck?: (active: () => boolean) => CallDeviceCheck;
|
|
@@ -40,6 +41,7 @@ export declare function createMessengerCalling(options: MessengerCallingOptions)
|
|
|
40
41
|
dispose(): Promise<void>;
|
|
41
42
|
} | undefined;
|
|
42
43
|
start: () => Promise<void>;
|
|
44
|
+
refreshAppearance: () => Promise<void>;
|
|
43
45
|
getSnapshot: () => MessengerCallingState;
|
|
44
46
|
subscribe(fn: () => void): () => void;
|
|
45
47
|
isActive: () => boolean;
|
package/dist/messenger.js
CHANGED
|
@@ -7,6 +7,9 @@ import { parseCallingNotification } from './notifications.js';
|
|
|
7
7
|
export function createMessengerCalling(options) {
|
|
8
8
|
let state = { direct: null, group: null, features: { voice: false, video: false }, loading: false, error: '' };
|
|
9
9
|
let closed = false, pending = null, transport, timer;
|
|
10
|
+
let appearanceRequest, appearanceRevision = -1;
|
|
11
|
+
const acceptAppearance = (appearance, revision) => { if (Number.isFinite(revision) && revision < appearanceRevision)
|
|
12
|
+
return; appearanceRevision = Number.isFinite(revision) ? revision : appearanceRevision; options.onAppearance?.(appearance); emit({ appearance }); };
|
|
10
13
|
let recoveryTimer, stableTimer, recoveryFailures = 0;
|
|
11
14
|
let adapters = [], detach = [];
|
|
12
15
|
const dismissed = new Set();
|
|
@@ -58,6 +61,20 @@ export function createMessengerCalling(options) {
|
|
|
58
61
|
void release().then(() => start()).catch(() => { });
|
|
59
62
|
}, Math.max(1000, Math.min(2147483647, transport.expiresAt - Date.now() - 60000)));
|
|
60
63
|
};
|
|
64
|
+
const refreshAppearance = () => {
|
|
65
|
+
if (closed)
|
|
66
|
+
return Promise.resolve();
|
|
67
|
+
if (appearanceRequest)
|
|
68
|
+
return appearanceRequest;
|
|
69
|
+
appearanceRequest = (async () => {
|
|
70
|
+
const result = await options.request('setup', {});
|
|
71
|
+
if (closed)
|
|
72
|
+
return;
|
|
73
|
+
const appearance = validateCallingAppearance(result.appearance);
|
|
74
|
+
acceptAppearance(appearance, result.revision);
|
|
75
|
+
})().finally(() => { appearanceRequest = undefined; });
|
|
76
|
+
return appearanceRequest;
|
|
77
|
+
};
|
|
61
78
|
const start = () => {
|
|
62
79
|
if (closed)
|
|
63
80
|
return Promise.reject(Error('Calling has been closed.'));
|
|
@@ -76,7 +93,9 @@ export function createMessengerCalling(options) {
|
|
|
76
93
|
return;
|
|
77
94
|
}
|
|
78
95
|
transport = session;
|
|
79
|
-
const
|
|
96
|
+
const received = validateCallingAppearance(session.appearance);
|
|
97
|
+
acceptAppearance(received, session.revision);
|
|
98
|
+
const appearance = state.appearance ?? received;
|
|
80
99
|
if (!session.features.voice && !session.features.video) {
|
|
81
100
|
emit({ appearance, features: session.features, loading: false });
|
|
82
101
|
renew();
|
|
@@ -116,7 +135,7 @@ export function createMessengerCalling(options) {
|
|
|
116
135
|
return pending;
|
|
117
136
|
};
|
|
118
137
|
return {
|
|
119
|
-
deviceCheck, start, getSnapshot: () => state, subscribe(fn) { listeners.add(fn); return () => { listeners.delete(fn); }; },
|
|
138
|
+
deviceCheck, start, refreshAppearance, getSnapshot: () => state, subscribe(fn) { listeners.add(fn); return () => { listeners.delete(fn); }; },
|
|
120
139
|
isActive: active,
|
|
121
140
|
reportError(message) { if (!closed)
|
|
122
141
|
emit({ error: message }); },
|
package/dist/system-calling.js
CHANGED
|
@@ -137,6 +137,7 @@ export function createNativeSystemCalling(options) {
|
|
|
137
137
|
if (!/^[a-f\d]{64}$/.test(scope))
|
|
138
138
|
throw Error('Invalid calling account.');
|
|
139
139
|
if (account && account !== scope) {
|
|
140
|
+
appearance = undefined;
|
|
140
141
|
nativeIds.clear();
|
|
141
142
|
known.clear();
|
|
142
143
|
for (const key of Object.keys(contacts))
|
|
@@ -155,7 +156,7 @@ export function createNativeSystemCalling(options) {
|
|
|
155
156
|
wake();
|
|
156
157
|
return registration();
|
|
157
158
|
}, registration,
|
|
158
|
-
async disconnect() { const previous = account; account = undefined; enabled = false; onChange = () => { }; nativeIds.clear(); known.clear(); for (const key of Object.keys(contacts))
|
|
159
|
+
async disconnect() { const previous = account; account = undefined; appearance = undefined; enabled = false; onChange = () => { }; nativeIds.clear(); known.clear(); for (const key of Object.keys(contacts))
|
|
159
160
|
delete contacts[key]; if (previous)
|
|
160
161
|
await native?.clear(previous); },
|
|
161
162
|
};
|
package/dist/versions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const mobileVersion = "0.11.
|
|
1
|
+
export declare const mobileVersion = "0.11.3";
|
|
2
2
|
export declare const engineVersion = "0.7.0";
|
package/dist/versions.js
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
#import <ImageIO/ImageIO.h>
|
|
3
|
+
#import <TargetConditionals.h>
|
|
4
|
+
|
|
5
|
+
// Public branding only. Bounded, account-scoped, atomic storage can be read
|
|
6
|
+
// before React starts. No network request is made on the incoming-call path.
|
|
7
|
+
static BOOL RobonoValidCallIcon(NSData *data) {
|
|
8
|
+
const unsigned char png[]={137,80,78,71,13,10,26,10};
|
|
9
|
+
if(data.length<45||data.length>65536||memcmp(data.bytes,png,8))return NO;
|
|
10
|
+
const unsigned char *b=data.bytes;
|
|
11
|
+
if(memcmp(b+12,"IHDR",4)||b[16]||b[17]||b[18]||b[19]!=120||b[20]||b[21]||b[22]||b[23]!=120||b[24]!=8||b[25]!=6)return NO;
|
|
12
|
+
CGImageSourceRef source=CGImageSourceCreateWithData((__bridge CFDataRef)data,NULL);
|
|
13
|
+
if(!source)return NO;
|
|
14
|
+
CGImageRef image=CGImageSourceCreateImageAtIndex(source,0,NULL);
|
|
15
|
+
BOOL valid=image&&CGImageGetWidth(image)==120&&CGImageGetHeight(image)==120;
|
|
16
|
+
if(image)CGImageRelease(image);CFRelease(source);return valid;
|
|
17
|
+
}
|
|
18
|
+
static NSURL *RobonoCallIconURL(void) {
|
|
19
|
+
NSURL *directory=[NSFileManager.defaultManager URLsForDirectory:NSApplicationSupportDirectory inDomains:NSUserDomainMask].firstObject;
|
|
20
|
+
return [[directory URLByAppendingPathComponent:@"RobonoCalling" isDirectory:YES] URLByAppendingPathComponent:@"icon.plist"];
|
|
21
|
+
}
|
|
22
|
+
static NSDictionary *RobonoReadCallIcon(NSURL *url,NSString *account) {
|
|
23
|
+
if(!account.length||!url)return nil;
|
|
24
|
+
NSNumber *size=nil;[url getResourceValue:&size forKey:NSURLFileSizeKey error:nil];if(size.unsignedLongLongValue>90000)return nil;
|
|
25
|
+
NSData *bytes=[NSData dataWithContentsOfURL:url];if(!bytes)return nil;
|
|
26
|
+
id record=[NSPropertyListSerialization propertyListWithData:bytes options:NSPropertyListImmutable format:NULL error:nil];
|
|
27
|
+
return [record isKindOfClass:NSDictionary.class]&&[record[@"account"] isEqual:account]?record:nil;
|
|
28
|
+
}
|
|
29
|
+
static NSData *RobonoStoredCallIcon(NSURL *url,NSString *account,NSData *fallback) {
|
|
30
|
+
NSDictionary *record=RobonoReadCallIcon(url,account);
|
|
31
|
+
if([record[@"removed"] isEqual:@YES])return nil;
|
|
32
|
+
id data=record[@"png"];
|
|
33
|
+
return [data isKindOfClass:NSData.class]&&RobonoValidCallIcon(data)?data:fallback;
|
|
34
|
+
}
|
|
35
|
+
static BOOL RobonoStoreCallIcon(NSURL *url,NSString *account,id icon) {
|
|
36
|
+
if(account.length!=64||!url)return NO;
|
|
37
|
+
NSData *data=nil;
|
|
38
|
+
if(icon!=NSNull.null){
|
|
39
|
+
if(![icon isKindOfClass:NSDictionary.class]||![icon[@"pngBase64"] isKindOfClass:NSString.class]||[icon[@"pngBase64"] length]>87384)return NO;
|
|
40
|
+
data=[[NSData alloc] initWithBase64EncodedString:icon[@"pngBase64"] options:0];if(!RobonoValidCallIcon(data))return NO;
|
|
41
|
+
}
|
|
42
|
+
NSDictionary *record=data?@{@"account":account,@"png":data}:@{@"account":account,@"removed":@YES};
|
|
43
|
+
if([RobonoReadCallIcon(url,account) isEqual:record])return YES;
|
|
44
|
+
NSDictionary *attributes=nil;NSDataWritingOptions options=NSDataWritingAtomic;
|
|
45
|
+
#if TARGET_OS_IPHONE
|
|
46
|
+
// A company logo is public; do not make lock-screen calling wait for unlock.
|
|
47
|
+
attributes=@{NSFileProtectionKey:NSFileProtectionNone};options|=NSDataWritingFileProtectionNone;
|
|
48
|
+
#endif
|
|
49
|
+
if(![NSFileManager.defaultManager createDirectoryAtURL:url.URLByDeletingLastPathComponent withIntermediateDirectories:YES attributes:attributes error:nil])return NO;
|
|
50
|
+
NSData *bytes=[NSPropertyListSerialization dataWithPropertyList:record format:NSPropertyListBinaryFormat_v1_0 options:0 error:nil];
|
|
51
|
+
if(!bytes||![bytes writeToURL:url options:options error:nil])return NO;
|
|
52
|
+
[url setResourceValue:@YES forKey:NSURLIsExcludedFromBackupKey error:nil];return YES;
|
|
53
|
+
}
|
|
54
|
+
static void RobonoClearCallIcon(NSURL *url,NSString *account) {
|
|
55
|
+
if(RobonoReadCallIcon(url,account))[NSFileManager.defaultManager removeItemAtURL:url error:nil];
|
|
56
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#import "RobonoSystemCalling.h"
|
|
2
|
+
#import "RobonoCallKitIcon.h"
|
|
2
3
|
#import <React/RCTBridgeModule.h>
|
|
3
4
|
#import <React/RCTEventEmitter.h>
|
|
4
5
|
#import <CallKit/CallKit.h>
|
|
@@ -10,8 +11,7 @@
|
|
|
10
11
|
static NSString *const Changed = @"RobonoSystemCallingChanged";
|
|
11
12
|
static NSString *const AccountKey = @"robono.sdk.calls.account.v1";
|
|
12
13
|
static NSString *const NamesKey = @"robono.sdk.calls.names.v1";
|
|
13
|
-
//
|
|
14
|
-
// is restored, including a launch caused by a VoIP push while locked.
|
|
14
|
+
// A bundled image remains the fallback until website branding has synced.
|
|
15
15
|
static NSData *RobonoCallKitIconData(void) {
|
|
16
16
|
NSBundle *bundle=NSBundle.mainBundle;
|
|
17
17
|
id value=[bundle objectForInfoDictionaryKey:@"RobonoCallKitIconName"];
|
|
@@ -55,7 +55,7 @@ static void RTCAudio(NSString *selector,AVAudioSession *audio){id s=RTCSession()
|
|
|
55
55
|
if(self.started||!self.enabled)return;self.started=YES;
|
|
56
56
|
NSString *name=[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]?:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]?:@"Calls";
|
|
57
57
|
CXProviderConfiguration *config=[[CXProviderConfiguration alloc] initWithLocalizedName:name];
|
|
58
|
-
config.iconTemplateImageData=RobonoCallKitIconData();
|
|
58
|
+
config.iconTemplateImageData=RobonoStoredCallIcon(RobonoCallIconURL(),self.account,RobonoCallKitIconData());
|
|
59
59
|
config.supportsVideo=YES;config.maximumCallGroups=1;config.maximumCallsPerCallGroup=1;config.supportedHandleTypes=[NSSet setWithObject:@(CXHandleTypeGeneric)];config.includesCallsInRecents=NO;
|
|
60
60
|
self.provider=[[CXProvider alloc] initWithConfiguration:config];[self.provider setDelegate:self queue:dispatch_get_main_queue()];self.controller=[CXCallController new];
|
|
61
61
|
if(self.account.length)[self registerPush];
|
|
@@ -68,11 +68,17 @@ static void RTCAudio(NSString *selector,AVAudioSession *audio){id s=RTCSession()
|
|
|
68
68
|
}
|
|
69
69
|
- (void)configure:(NSString *)account {
|
|
70
70
|
[self start];if(![self.account isEqualToString:account]){
|
|
71
|
+
RobonoClearCallIcon(RobonoCallIconURL(),self.account);
|
|
71
72
|
for(NSString *callId in self.calls.allKeys)[self end:callId reason:CXCallEndedReasonFailed];
|
|
72
73
|
[self.events removeAllObjects];[NSUserDefaults.standardUserDefaults removeObjectForKey:NamesKey];
|
|
73
74
|
}
|
|
74
75
|
if(account.length&&self.enabled){[NSUserDefaults.standardUserDefaults setObject:account forKey:AccountKey];[self registerPush];}
|
|
75
76
|
else {[NSUserDefaults.standardUserDefaults removeObjectForKey:AccountKey];self.registry.desiredPushTypes=[NSSet new];self.token=nil;}
|
|
77
|
+
[self refreshCallIcon];
|
|
78
|
+
}
|
|
79
|
+
- (void)refreshCallIcon {
|
|
80
|
+
if(!self.provider)return;CXProviderConfiguration *config=[self.provider.configuration copy];
|
|
81
|
+
config.iconTemplateImageData=RobonoStoredCallIcon(RobonoCallIconURL(),self.account,RobonoCallKitIconData());self.provider.configuration=config;
|
|
76
82
|
}
|
|
77
83
|
- (NSDictionary *)state {
|
|
78
84
|
id rtc=RTCSession(); NSMutableDictionary *audio=[@{@"active":@(self.audioActive),@"webrtcAvailable":@(rtc!=nil)} mutableCopy];
|
|
@@ -169,6 +175,11 @@ RCT_EXPORT_METHOD(configure:(NSString *)account resolver:(RCTPromiseResolveBlock
|
|
|
169
175
|
RCT_EXPORT_METHOD(state:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject){resolve([RobonoSystemCalling.shared state]);}
|
|
170
176
|
RCT_EXPORT_METHOD(clear:(NSString *)account resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject){if([account isEqual:RobonoSystemCalling.shared.account])[RobonoSystemCalling.shared configure:nil];resolve(nil);}
|
|
171
177
|
RCT_EXPORT_METHOD(drain:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject){NSArray *events=[RobonoSystemCalling.shared.events copy];[RobonoSystemCalling.shared.events removeAllObjects];resolve(events);}
|
|
178
|
+
RCT_EXPORT_METHOD(cacheAppearance:(NSString *)account appearance:(NSDictionary *)appearance){
|
|
179
|
+
if(![account isEqual:RobonoSystemCalling.shared.account])return;
|
|
180
|
+
if(!appearance[@"callKitIcon"]){if([appearance[@"callKitIconManaged"] isEqual:@YES]){RobonoClearCallIcon(RobonoCallIconURL(),account);[RobonoSystemCalling.shared refreshCallIcon];}return;}
|
|
181
|
+
if(RobonoStoreCallIcon(RobonoCallIconURL(),account,appearance[@"callKitIcon"]))[RobonoSystemCalling.shared refreshCallIcon];
|
|
182
|
+
}
|
|
172
183
|
RCT_EXPORT_METHOD(cacheContacts:(NSString *)account names:(NSDictionary *)names){if([account isEqual:RobonoSystemCalling.shared.account])[NSUserDefaults.standardUserDefaults setObject:names forKey:NamesKey];}
|
|
173
184
|
RCT_EXPORT_METHOD(receive:(NSDictionary *)data){if([data[@"event"] hasSuffix:@"dismissed"])[RobonoSystemCalling receiveRemoteNotification:data];else[RobonoSystemCalling.shared incoming:data mustReport:NO completion:^{}];}
|
|
174
185
|
RCT_EXPORT_METHOD(end:(NSString *)callId){[RobonoSystemCalling.shared end:callId.lowercaseString reason:CXCallEndedReasonRemoteEnded];}
|
package/package.json
CHANGED