@robono/calling-react-native 0.10.0 → 0.11.1

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 CHANGED
@@ -1,3 +1,16 @@
1
+ # Changelog
2
+
3
+ ## 0.11.1
4
+
5
+ - Allow each host to supply a bundled CallKit template icon with the Expo plugin's `callKitIcon` PNG path or the native `RobonoCallKitIconName` Info.plist entry.
6
+ - Apply `CXProviderConfiguration.iconTemplateImageData` before creating CallKit, including native startup from a VoIP push while locked, without requiring JavaScript initialization.
7
+ - Validate and bundle Expo icons in the main application target without duplicate resources. Android branding is unchanged.
8
+
9
+
10
+ ## 0.11.0 — 2026-11-10
11
+
12
+ Add shared phrase-analysis request, participant consent and active notices on iPhone, Android and web.
13
+
1
14
  ## 0.9.2
2
15
 
3
16
  Older saved appearances default optional video-background labels without blocking ordinary calling. iPhone incoming-call cleanup leaves the system-owned audio session alone, including hangup cues and a following incoming call.
package/INCOMING-CALLS.md CHANGED
@@ -37,6 +37,48 @@ cached contact name displays “Incoming call”; the push contains no contact p
37
37
  Android’s incoming screen reuses the saved calling colors and button labels from Features & preview. Apple controls the language and layout of its system screen. The connected call uses the supplied Messenger call screen and feature choices.
38
38
  Calls answered elsewhere close the other devices' invitations.
39
39
 
40
+ ### Your bundled CallKit icon
41
+
42
+ Supply a local template PNG in the calling Expo plugin:
43
+
44
+ ```json
45
+ {
46
+ "plugins": [
47
+ ["@robono/calling-react-native", {
48
+ "callKitIcon": "./assets/callkit-icon.png"
49
+ }]
50
+ ]
51
+ }
52
+ ```
53
+
54
+ Rebuild the iPhone application after adding or changing the icon. The plugin
55
+ validates and copies the PNG into the application target's resources and sets
56
+ `RobonoCallKitIconName` in Info.plist. Use a square 40, 80, or 120 pixel PNG for
57
+ the 40-point icon, with the shape in its alpha channel and transparent space
58
+ around it. Apple uses the alpha channel as a template mask; a full-color app
59
+ icon with an opaque background usually produces a solid square. See Apple's
60
+ [iconTemplateImageData requirements](https://developer.apple.com/documentation/callkit/cxproviderconfiguration/icontemplateimagedata).
61
+
62
+ The native coordinator loads the bundled image and assigns
63
+ `CXProviderConfiguration.iconTemplateImageData` **before** creating its
64
+ `CXProvider`. The same path runs when a VoIP push launches the app while locked,
65
+ before React starts. There is no downloaded image, JavaScript callback, or
66
+ previous foreground-session requirement for loading this icon. Apple controls
67
+ where its system interface displays the template; it is not a replacement for
68
+ the caller's photo or your app's home-screen icon.
69
+
70
+ For bare React Native, add the PNG to the application's Copy Bundle Resources,
71
+ or add a template image to the application's asset catalog. Set
72
+ `RobonoCallKitIconName` to that resource filename (for example,
73
+ `CompanyCallKit.png`) or asset name (`CompanyCallKit`). No JavaScript setting is
74
+ required. A missing or invalid native resource is logged and calling continues
75
+ with Apple's default appearance.
76
+
77
+ Omitting `callKitIcon` preserves any manually configured Info.plist asset name.
78
+ Use `callKitIcon: null` to remove the generated setting. This is an iOS option;
79
+ Android keeps its existing app and notification branding. It does not change
80
+ incoming-call registration, account authorization, or notification delivery.
81
+
40
82
  Do Not Disturb, force-stop, notification settings and platform restrictions still
41
83
  apply. Android full-screen intents require the user's permission and Google Play
42
84
  eligibility for calling apps; otherwise the call notification offers the controls.
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.1.2 @robono/calling-react-native@0.2.1
30
+ npm install @robono/calling@0.7.0 @robono/calling-react-native@0.11.1
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.10.0",
6
- "documentNamespace": "https://robono.com/sbom/calling-react-native/0.10.0/b6d3cebe85ceea06d48694c5ed669a1f73d4ad7c",
5
+ "name": "@robono/calling-react-native@0.11.1",
6
+ "documentNamespace": "https://robono.com/sbom/calling-react-native/0.11.1/72b16d963d51406476ea0099022190af177f2a2e",
7
7
  "creationInfo": {
8
- "created": "2026-11-10T08:50:25.619Z",
8
+ "created": "2026-11-16T09:33:22.288Z",
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.10.0",
17
+ "versionInfo": "0.11.1",
18
18
  "downloadLocation": "NOASSERTION",
19
19
  "filesAnalyzed": true,
20
20
  "packageVerificationCode": {
21
- "packageVerificationCodeValue": "b6d3cebe85ceea06d48694c5ed669a1f73d4ad7c"
21
+ "packageVerificationCodeValue": "72b16d963d51406476ea0099022190af177f2a2e"
22
22
  },
23
23
  "licenseConcluded": "LicenseRef-RobonoSDK",
24
24
  "licenseDeclared": "LicenseRef-RobonoSDK",
@@ -26,7 +26,7 @@
26
26
  "LicenseRef-RobonoSDK"
27
27
  ],
28
28
  "copyrightText": "Copyright (c) 2026 Add to Loop LLC.",
29
- "comment": "Host-supplied peers (not bundled): {\"@robono/calling\":\"^0.6.2\",\"react\":\">=18.2 <20\",\"react-native\":\">=0.76 <1\",\"react-native-svg\":\">=15 <16\",\"react-native-safe-area-context\":\">=5 <6\",\"react-native-webrtc\":\">=124 <125\",\"react-native-incall-manager\":\">=4.2 <5\",\"expo-audio\":\">=1.1.1 <2 || >=55 <57\",\"expo-crypto\":\">=15.0.9 <16 || >=55 <57\",\"expo-notifications\":\">=0.32.17 <0.33 || >=55 <57\",\"expo-asset\":\">=12 <13 || >=55 <57\"}"
29
+ "comment": "Host-supplied peers (not bundled): {\"@robono/calling\":\"^0.7.0\",\"react\":\">=18.2 <20\",\"react-native\":\">=0.76 <1\",\"react-native-svg\":\">=15 <16\",\"react-native-safe-area-context\":\">=5 <6\",\"react-native-webrtc\":\">=124 <125\",\"react-native-incall-manager\":\">=4.2 <5\",\"expo-audio\":\">=1.1.1 <2 || >=55 <57\",\"expo-crypto\":\">=15.0.9 <16 || >=55 <57\",\"expo-notifications\":\">=0.32.17 <0.33 || >=55 <57\",\"expo-asset\":\">=12 <13 || >=55 <57\"}"
30
30
  }
31
31
  ],
32
32
  "files": [
@@ -36,11 +36,11 @@
36
36
  "checksums": [
37
37
  {
38
38
  "algorithm": "SHA256",
39
- "checksumValue": "d7ef80202def5a1bc19217ec5acf853f9694f426811635213da0521b7f3a2407"
39
+ "checksumValue": "22305063bbe69b6ea106fccf3389fe8b97c1a0f56b22672d45bc0a984e17adcf"
40
40
  },
41
41
  {
42
42
  "algorithm": "SHA1",
43
- "checksumValue": "21ccad285fa013fa743fcd174a8047ced2cf72c0"
43
+ "checksumValue": "81dbb8ebbb37727d96c44cb8913ed42b83ec3947"
44
44
  }
45
45
  ],
46
46
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -55,11 +55,11 @@
55
55
  "checksums": [
56
56
  {
57
57
  "algorithm": "SHA256",
58
- "checksumValue": "ca412be2b388aef60c422f8a8a979e89e1d8a3228abaee32fe63dfb49b69469e"
58
+ "checksumValue": "9b67ea3da6a4bffeafb972ae0125a17164aae93d0bb7e0b901064e0652000e34"
59
59
  },
60
60
  {
61
61
  "algorithm": "SHA1",
62
- "checksumValue": "6fabff1358efdfc665b8516df3cc81784e0f0b37"
62
+ "checksumValue": "dc9fa07d2d812eacb82aaa2aeccb9e65102a370e"
63
63
  }
64
64
  ],
65
65
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -93,11 +93,11 @@
93
93
  "checksums": [
94
94
  {
95
95
  "algorithm": "SHA256",
96
- "checksumValue": "1ebb385fcc01f891e5678cad5c5343d7fa7cc32f66fe992776e2b526d94b19f0"
96
+ "checksumValue": "7936b78aa20398e123e0dabd63eab70bbbcbbd3019f7d642cf9e20e86b786611"
97
97
  },
98
98
  {
99
99
  "algorithm": "SHA1",
100
- "checksumValue": "ec8bd8b69372828e9272b88c35a4093b9593301c"
100
+ "checksumValue": "21a26eef8bf2baead54d246e2269609a76f69f74"
101
101
  }
102
102
  ],
103
103
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -416,11 +416,11 @@
416
416
  "checksums": [
417
417
  {
418
418
  "algorithm": "SHA256",
419
- "checksumValue": "25191a9348150d9e9396b6e8948c0f64c14676d0f897d07c76412477d0fe8f76"
419
+ "checksumValue": "d60e063d519e02131f61baebd5d27432a4de537bbfc493d3e8d5697b7373652b"
420
420
  },
421
421
  {
422
422
  "algorithm": "SHA1",
423
- "checksumValue": "e74f4aa5d5aacba419ac6a5fd1bed82c56670d0b"
423
+ "checksumValue": "63dc507a0d0706511d20c386c68e7d409282ad6a"
424
424
  }
425
425
  ],
426
426
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -6021,11 +6021,11 @@
6021
6021
  "checksums": [
6022
6022
  {
6023
6023
  "algorithm": "SHA256",
6024
- "checksumValue": "e44e0d5d9de28f2080f20530fdb97f94da5c5ae3049a89f6c84eb4f7688ed3be"
6024
+ "checksumValue": "3cdc8d8f16015b5f870868e4e47745cc35b1abbe4ed4f6855ecf53476f36ce39"
6025
6025
  },
6026
6026
  {
6027
6027
  "algorithm": "SHA1",
6028
- "checksumValue": "8a302c0af5fadd75e31eeb724f42d13a75aef12c"
6028
+ "checksumValue": "21f09679d3f0a7a7f2f1c90d049ed354cfa5eec0"
6029
6029
  }
6030
6030
  ],
6031
6031
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -6040,11 +6040,11 @@
6040
6040
  "checksums": [
6041
6041
  {
6042
6042
  "algorithm": "SHA256",
6043
- "checksumValue": "1af5f7c9a610852e994d2052f5dc99719e2e138c7f80730e5c87df38cbedf18f"
6043
+ "checksumValue": "3147809ee6ae3b85e9cac13d0db945e93f6a9e15056e49d96cbfa71039cf49c4"
6044
6044
  },
6045
6045
  {
6046
6046
  "algorithm": "SHA1",
6047
- "checksumValue": "f64e3f5a205170b854db72c032d63f843f075693"
6047
+ "checksumValue": "16a1728d8f567b2ebd26711c9fad49bdb31fad77"
6048
6048
  }
6049
6049
  ],
6050
6050
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -6211,11 +6211,11 @@
6211
6211
  "checksums": [
6212
6212
  {
6213
6213
  "algorithm": "SHA256",
6214
- "checksumValue": "b804bcb068b37a743f81696f00c2c4df37f8eb741992bb1ce45a868559201b86"
6214
+ "checksumValue": "a17135441eace4c13b55445f62d563e03a0367448fdd38abd27b319cf5d6553e"
6215
6215
  },
6216
6216
  {
6217
6217
  "algorithm": "SHA1",
6218
- "checksumValue": "bd9b5a4b7127373352243d8f4bd2b04a33a0805e"
6218
+ "checksumValue": "b6ef4b18d6274f9bbd0eb09eca1af6838c6ba412"
6219
6219
  }
6220
6220
  ],
6221
6221
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -6230,11 +6230,11 @@
6230
6230
  "checksums": [
6231
6231
  {
6232
6232
  "algorithm": "SHA256",
6233
- "checksumValue": "a451c4c23c241eff445fc19d0ea7cedb42439a7584519247afafd36d8b8a02db"
6233
+ "checksumValue": "cf456234cad640c5a01c511fd1c66a15c8c9f84eaee3823b807270b1ecaedb2f"
6234
6234
  },
6235
6235
  {
6236
6236
  "algorithm": "SHA1",
6237
- "checksumValue": "2fac37dfa3cd3f631abbc0256f1b7a9b1e2512fe"
6237
+ "checksumValue": "ed33bc9aa8370e37f327b18aef04488b22723648"
6238
6238
  }
6239
6239
  ],
6240
6240
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -6496,11 +6496,11 @@
6496
6496
  "checksums": [
6497
6497
  {
6498
6498
  "algorithm": "SHA256",
6499
- "checksumValue": "32bc41a29950ad9c4a61c602d2469a937394d941ffd10f154ffcbdd84a764009"
6499
+ "checksumValue": "ac4c82483ef4635ef72f451a4c4dd4e5655fe01d7ec7662b21921e6867efc0f7"
6500
6500
  },
6501
6501
  {
6502
6502
  "algorithm": "SHA1",
6503
- "checksumValue": "9a6d8e8011028022dc54ec99babb581b531630db"
6503
+ "checksumValue": "95f4be3d65b5c60fe5e16b448572ec68db7ca6e6"
6504
6504
  }
6505
6505
  ],
6506
6506
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -6591,11 +6591,11 @@
6591
6591
  "checksums": [
6592
6592
  {
6593
6593
  "algorithm": "SHA256",
6594
- "checksumValue": "3b1e2c61b3dbc9ac0a6627e8bf090e0442d7e4e082958886600888655904dfe2"
6594
+ "checksumValue": "489bad49c1abc105e5fe930c49f3a7cbe37a96ee7edfa8f75b32477ac0a22bc6"
6595
6595
  },
6596
6596
  {
6597
6597
  "algorithm": "SHA1",
6598
- "checksumValue": "2ca63a8877dcef5b508d93b47adbc0518589d100"
6598
+ "checksumValue": "eeaa790b2d646b52f90eda739529d632e0e4e68f"
6599
6599
  }
6600
6600
  ],
6601
6601
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -6605,8 +6605,27 @@
6605
6605
  "copyrightText": "Copyright (c) 2026 Add to Loop LLC."
6606
6606
  },
6607
6607
  {
6608
- "fileName": "./plugin/incoming-calls.cjs",
6608
+ "fileName": "./plugin/callkit-icon.cjs",
6609
6609
  "SPDXID": "SPDXRef-File-346",
6610
+ "checksums": [
6611
+ {
6612
+ "algorithm": "SHA256",
6613
+ "checksumValue": "94ffa4440350e49b43b195aa70249080a64d4aa2ccd06dce4f8006c208b57d26"
6614
+ },
6615
+ {
6616
+ "algorithm": "SHA1",
6617
+ "checksumValue": "719e1af963d6479ec6c64fd83a001219e0fcc4f8"
6618
+ }
6619
+ ],
6620
+ "licenseConcluded": "LicenseRef-RobonoSDK",
6621
+ "licenseInfoInFiles": [
6622
+ "LicenseRef-RobonoSDK"
6623
+ ],
6624
+ "copyrightText": "Copyright (c) 2026 Add to Loop LLC."
6625
+ },
6626
+ {
6627
+ "fileName": "./plugin/incoming-calls.cjs",
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/picture-in-picture.cjs",
6628
- "SPDXID": "SPDXRef-File-347",
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/screensharing.cjs",
6647
- "SPDXID": "SPDXRef-File-348",
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": "./react-native.config.js",
6666
- "SPDXID": "SPDXRef-File-349",
6685
+ "SPDXID": "SPDXRef-File-350",
6667
6686
  "checksums": [
6668
6687
  {
6669
6688
  "algorithm": "SHA256",
@@ -8436,6 +8455,11 @@
8436
8455
  "spdxElementId": "SPDXRef-Package",
8437
8456
  "relationshipType": "CONTAINS",
8438
8457
  "relatedSpdxElement": "SPDXRef-File-349"
8458
+ },
8459
+ {
8460
+ "spdxElementId": "SPDXRef-Package",
8461
+ "relationshipType": "CONTAINS",
8462
+ "relatedSpdxElement": "SPDXRef-File-350"
8439
8463
  }
8440
8464
  ],
8441
8465
  "hasExtractedLicensingInfos": [
package/app.plugin.cjs CHANGED
@@ -1,5 +1,6 @@
1
1
  const {withInfoPlist, withAndroidManifest, createRunOncePlugin} = require('expo/config-plugins');
2
2
  function withCallingRuntime(config, options = {}) {
3
+ config=require('./plugin/callkit-icon.cjs').withCallKitIcon(config,options.callKitIcon);
3
4
  if(options.video&&options.pictureInPicture!==false)config=require('./plugin/picture-in-picture.cjs').withCallPictureInPicture(config);
4
5
  if(options.incomingCalls!==false)config=require('./plugin/incoming-calls.cjs').withIncomingCalls(config);
5
6
  if(options.screenSharing)config=require('./plugin/screensharing.cjs').withScreenSharing(config,typeof options.screenSharing==='object'?options.screenSharing:{});
@@ -2,6 +2,9 @@ import React from 'react';
2
2
  export declare const callRecordingText: {
3
3
  you: string;
4
4
  caller: string;
5
+ analysis: string;
6
+ analysisNotice: string;
7
+ analysisActive: string;
5
8
  captions: string;
6
9
  captionNotice: string;
7
10
  captionUnavailable: string;
package/dist/recording.js CHANGED
@@ -3,16 +3,16 @@ import { useEffect, useRef, useState } from 'react';
3
3
  import { Pressable, Text, View } from 'react-native';
4
4
  import { useCallingUI } from './components.js';
5
5
  import { RobonoIcon } from './visual/RobonoIcon.js';
6
- export const callRecordingText = { you: 'You', caller: 'Caller', captions: 'Include automatic captions and a saved transcript', captionNotice: 'This includes automatic captions and a saved transcript.', captionUnavailable: 'Captions are unavailable. The call recording continues.', record: 'Record call', audio: 'Record audio', video: 'Record video', request: 'Allow this call to be recorded?', notice: 'The company requesting the recording can save this call. Everyone must agree.', allow: 'Allow', decline: 'Decline', waiting: 'Waiting for everyone to agree', preparing: 'Preparing recording', active: 'Recording', stop: 'Stop recording', saved: 'Recording saved', failed: 'Recording could not be saved', declined: 'Recording declined', cancelled: 'Recording cancelled', error: 'Recording is unavailable. Try again.', close: 'Close recording options' };
6
+ export const callRecordingText = { you: 'You', caller: 'Caller', analysis: 'Check configured words and phrases', analysisNotice: 'Automatic word and phrase detection is included for the requesting network.', analysisActive: 'Recording and phrase analysis', captions: 'Include automatic captions and a saved transcript', captionNotice: 'This includes automatic captions and a saved transcript.', captionUnavailable: 'Captions are unavailable. The call recording continues.', record: 'Record call', audio: 'Record audio', video: 'Record video', request: 'Allow this call to be recorded?', notice: 'The company requesting the recording can save this call. Everyone must agree.', allow: 'Allow', decline: 'Decline', waiting: 'Waiting for everyone to agree', preparing: 'Preparing recording', active: 'Recording', stop: 'Stop recording', saved: 'Recording saved', failed: 'Recording could not be saved', declined: 'Recording declined', cancelled: 'Recording cancelled', error: 'Recording is unavailable. Try again.', close: 'Close recording options' };
7
7
  /** Shared web/phone controls. A persistent notice is shown throughout capture. */
8
8
  export function CallingRecordingControls() {
9
9
  const { state, recordingController: controller, recordingLabels, theme, typography } = useCallingUI();
10
10
  const text = { ...callRecordingText, ...recordingLabels }, snapshot = state.recording, r = snapshot?.recording;
11
- const [includeCaptions, setIncludeCaptions] = useState(false);
11
+ const [includeCaptions, setIncludeCaptions] = useState(false), [includeAnalysis, setIncludeAnalysis] = useState(false);
12
12
  const [choose, setChoose] = useState(false), [busy, setBusy] = useState(false), [failure, setFailure] = useState(false);
13
13
  const mounted = useRef(true), operation = useRef(0);
14
14
  useEffect(() => { mounted.current = true; return () => { mounted.current = false; operation.current++; }; }, []);
15
- useEffect(() => { operation.current++; setChoose(false); setIncludeCaptions(false); setFailure(false); setBusy(false); }, [state.call?.id, state.phase === 'idle']);
15
+ useEffect(() => { operation.current++; setChoose(false); setIncludeCaptions(false); setIncludeAnalysis(false); setFailure(false); setBusy(false); }, [state.call?.id, state.phase === 'idle']);
16
16
  if (!controller || !snapshot?.available || !['connected', 'held'].includes(state.phase))
17
17
  return null;
18
18
  const own = state.call?.self ?? state.groupMembers?.find(p => p.local)?.id;
@@ -23,7 +23,7 @@ export function CallingRecordingControls() {
23
23
  setFailure(true); }).finally(() => { if (mounted.current && current === operation.current)
24
24
  setBusy(false); }); };
25
25
  const button = (label, action, primary = false, interrupt = false) => _jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: label, accessibilityState: { disabled: busy && !interrupt }, disabled: busy && !interrupt, onPress: action, style: { minHeight: 44, paddingHorizontal: 14, justifyContent: 'center', borderRadius: 12, backgroundColor: primary ? theme.accent : theme.control }, children: _jsx(Text, { style: [typography(15), { color: primary ? theme.background : theme.foreground, fontWeight: '600' }], children: label }) }, label);
26
- return _jsxs(View, { testID: "calling-recording", style: { width: '100%', maxWidth: 480, alignSelf: 'center', paddingHorizontal: 12, paddingVertical: 6, gap: 6 }, children: [consent ? _jsxs(View, { style: { backgroundColor: theme.control, borderRadius: 16, padding: 14, gap: 8 }, children: [_jsx(Text, { style: [typography(17), { color: theme.foreground, fontWeight: '600' }], children: text.request }), _jsxs(Text, { style: [typography(14), { color: theme.secondary }], children: [text.notice, r?.transcribe ? ' ' + text.captionNotice : ''] }), _jsxs(View, { style: { flexDirection: 'row', gap: 8, justifyContent: 'flex-end' }, children: [button(text.decline, () => run(() => controller.consent(false), true), false, true), button(text.allow, () => run(() => controller.consent(true)), true)] })] }) : active ? _jsxs(View, { style: { flexDirection: 'row', alignItems: 'center', justifyContent: 'center', gap: 10 }, children: [_jsx(View, { style: { width: 9, height: 9, borderRadius: 5, backgroundColor: r.state === 'recording' ? '#EE4848' : theme.accent } }), _jsx(Text, { accessibilityLiveRegion: "polite", style: [typography(15), { color: theme.foreground, flex: 1 }], children: r.state === 'recording' ? text.active : r.state === 'awaiting_consent' ? text.waiting : text.preparing }), button(text.stop, () => run(() => controller.stop(), true), false, true)] }) : _jsxs(_Fragment, { children: [r && ['complete', 'failed', 'declined', 'cancelled'].includes(r.state) && _jsx(Text, { accessibilityLiveRegion: "polite", style: [typography(14), { color: r.state === 'failed' ? theme.accent : theme.secondary, textAlign: 'center' }], children: r.state === 'complete' ? text.saved : r.state === 'failed' ? text.failed : r.state === 'declined' ? text.declined : text.cancelled }), choose ? _jsxs(View, { style: { backgroundColor: theme.control, borderRadius: 14, padding: 10, gap: 6 }, children: [_jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: text.close, onPress: () => setChoose(false), style: { alignSelf: 'flex-end', width: 44, height: 44, alignItems: 'center', justifyContent: 'center' }, children: _jsx(RobonoIcon, { name: "close", size: 22, color: theme.foreground }) }), _jsx(Text, { style: [typography(14), { color: theme.secondary }], children: text.notice }), snapshot.capabilities?.captions && _jsxs(Pressable, { accessibilityRole: "checkbox", "aria-checked": includeCaptions, accessibilityState: { checked: includeCaptions }, accessibilityLabel: text.captions, onPress: () => setIncludeCaptions(v => !v), style: { minHeight: 44, flexDirection: 'row', gap: 10, alignItems: 'center' }, children: [_jsx(View, { style: { width: 20, height: 20, borderWidth: 1, borderRadius: 4, borderColor: theme.accent, backgroundColor: includeCaptions ? theme.accent : 'transparent' } }), _jsx(Text, { style: [typography(14), { color: theme.foreground, flex: 1 }], children: text.captions })] }), _jsxs(View, { style: { flexDirection: 'row', gap: 8, justifyContent: 'center' }, children: [snapshot.capabilities?.audio !== false && button(text.audio, () => run(async () => { await controller.start({ mode: 'audio', transcribe: includeCaptions }); if (mounted.current)
27
- setChoose(false); }), true), state.kind === 'video' && snapshot.capabilities?.video !== false && button(text.video, () => run(async () => { await controller.start({ mode: 'video', transcribe: includeCaptions }); if (mounted.current)
26
+ return _jsxs(View, { testID: "calling-recording", style: { width: '100%', maxWidth: 480, alignSelf: 'center', paddingHorizontal: 12, paddingVertical: 6, gap: 6 }, children: [consent ? _jsxs(View, { style: { backgroundColor: theme.control, borderRadius: 16, padding: 14, gap: 8 }, children: [_jsx(Text, { style: [typography(17), { color: theme.foreground, fontWeight: '600' }], children: text.request }), _jsxs(Text, { style: [typography(14), { color: theme.secondary }], children: [text.notice, r?.transcribe ? ' ' + text.captionNotice : '', r?.phraseAnalysis ? ' ' + text.analysisNotice : ''] }), _jsxs(View, { style: { flexDirection: 'row', gap: 8, justifyContent: 'flex-end' }, children: [button(text.decline, () => run(() => controller.consent(false), true), false, true), button(text.allow, () => run(() => controller.consent(true)), true)] })] }) : active ? _jsxs(View, { style: { flexDirection: 'row', alignItems: 'center', justifyContent: 'center', gap: 10 }, children: [_jsx(View, { style: { width: 9, height: 9, borderRadius: 5, backgroundColor: r.state === 'recording' ? '#EE4848' : theme.accent } }), _jsx(Text, { accessibilityLiveRegion: "polite", style: [typography(15), { color: theme.foreground, flex: 1 }], children: r.state === 'recording' ? (r.phraseAnalysis ? text.analysisActive : text.active) : r.state === 'awaiting_consent' ? text.waiting : text.preparing }), button(text.stop, () => run(() => controller.stop(), true), false, true)] }) : _jsxs(_Fragment, { children: [r && ['complete', 'failed', 'declined', 'cancelled'].includes(r.state) && _jsx(Text, { accessibilityLiveRegion: "polite", style: [typography(14), { color: r.state === 'failed' ? theme.accent : theme.secondary, textAlign: 'center' }], children: r.state === 'complete' ? text.saved : r.state === 'failed' ? text.failed : r.state === 'declined' ? text.declined : text.cancelled }), choose ? _jsxs(View, { style: { backgroundColor: theme.control, borderRadius: 14, padding: 10, gap: 6 }, children: [_jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: text.close, onPress: () => setChoose(false), style: { alignSelf: 'flex-end', width: 44, height: 44, alignItems: 'center', justifyContent: 'center' }, children: _jsx(RobonoIcon, { name: "close", size: 22, color: theme.foreground }) }), _jsx(Text, { style: [typography(14), { color: theme.secondary }], children: text.notice }), snapshot.capabilities?.captions && _jsxs(Pressable, { accessibilityRole: "checkbox", "aria-checked": includeCaptions, accessibilityState: { checked: includeCaptions }, accessibilityLabel: text.captions, onPress: () => setIncludeCaptions(v => !v), style: { minHeight: 44, flexDirection: 'row', gap: 10, alignItems: 'center' }, children: [_jsx(View, { style: { width: 20, height: 20, borderWidth: 1, borderRadius: 4, borderColor: theme.accent, backgroundColor: includeCaptions ? theme.accent : 'transparent' } }), _jsx(Text, { style: [typography(14), { color: theme.foreground, flex: 1 }], children: text.captions })] }), snapshot.capabilities?.analysisRevision && _jsx(Pressable, { accessibilityRole: "checkbox", accessibilityLabel: text.analysis, accessibilityState: { checked: includeAnalysis }, onPress: () => { setIncludeAnalysis(v => !v); setIncludeCaptions(true); }, style: { minHeight: 44, justifyContent: 'center' }, children: _jsxs(Text, { style: [typography(14), { color: theme.foreground }], children: [includeAnalysis ? '☑ ' : '☐ ', text.analysis] }) }), _jsxs(View, { style: { flexDirection: 'row', gap: 8, justifyContent: 'center' }, children: [snapshot.capabilities?.audio !== false && button(text.audio, () => run(async () => { await controller.start({ mode: 'audio', transcribe: includeCaptions || includeAnalysis, analyzePhrases: includeAnalysis }); if (mounted.current)
27
+ setChoose(false); }), true), state.kind === 'video' && snapshot.capabilities?.video !== false && button(text.video, () => run(async () => { await controller.start({ mode: 'video', transcribe: includeCaptions || includeAnalysis, analyzePhrases: includeAnalysis }); if (mounted.current)
28
28
  setChoose(false); }), true)] })] }) : state.phase === 'connected' && snapshot.capabilities?.available === true && _jsxs(Pressable, { accessibilityRole: "button", accessibilityLabel: text.record, onPress: () => setChoose(true), style: { minHeight: 44, alignItems: 'center', justifyContent: 'center', flexDirection: 'row', gap: 8 }, children: [_jsx(RobonoIcon, { name: "circle-dot", size: 20, color: theme.foreground }), _jsx(Text, { style: [typography(14), { color: theme.foreground }], children: text.record })] })] }), r?.transcript?.captions.length ? _jsx(View, { accessibilityLiveRegion: "polite", style: { backgroundColor: '#111111dd', borderRadius: 12, padding: 10, gap: 4 }, children: r.transcript.captions.slice(-2).map(caption => _jsxs(Text, { numberOfLines: 3, style: [typography(16), { color: '#ffffff' }], children: [state.groupMembers?.find(m => m.id === caption.participant)?.name ?? (caption.participant === own ? text.you : state.contact?.name ?? text.caller), ": ", caption.text] }, caption.participant + ':' + caption.sequence)) }) : null, r?.transcript?.state === 'unavailable' && _jsx(Text, { accessibilityRole: "alert", style: [typography(14), { color: theme.secondary }], children: text.captionUnavailable }), (failure || snapshot.error) && _jsx(Text, { accessibilityRole: "alert", style: [typography(14), { color: theme.accent, textAlign: 'center' }], children: text.error })] });
29
29
  }
@@ -1,2 +1,2 @@
1
- export declare const mobileVersion = "0.10.0";
2
- export declare const engineVersion = "0.6.3";
1
+ export declare const mobileVersion = "0.11.1";
2
+ export declare const engineVersion = "0.7.0";
package/dist/versions.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // Generated from the package manifests by build.mjs.
2
- export const mobileVersion = "0.10.0";
3
- export const engineVersion = "0.6.3";
2
+ export const mobileVersion = "0.11.1";
3
+ export const engineVersion = "0.7.0";
@@ -10,6 +10,19 @@
10
10
  static NSString *const Changed = @"RobonoSystemCallingChanged";
11
11
  static NSString *const AccountKey = @"robono.sdk.calls.account.v1";
12
12
  static NSString *const NamesKey = @"robono.sdk.calls.names.v1";
13
+ // Read only signed, bundled resources. This runs before React or a host session
14
+ // is restored, including a launch caused by a VoIP push while locked.
15
+ static NSData *RobonoCallKitIconData(void) {
16
+ NSBundle *bundle=NSBundle.mainBundle;
17
+ id value=[bundle objectForInfoDictionaryKey:@"RobonoCallKitIconName"];
18
+ if(![value isKindOfClass:NSString.class]||![value length])return nil;
19
+ UIImage *icon=[UIImage imageNamed:value inBundle:bundle compatibleWithTraitCollection:nil];
20
+ if(!icon||icon.size.width<=0||icon.size.width!=icon.size.height){
21
+ NSLog(@"Robono calling: the configured CallKit template icon is missing or is not square. Check the bundled resource and RobonoCallKitIconName.");
22
+ return nil;
23
+ }
24
+ return UIImagePNGRepresentation(icon);
25
+ }
13
26
  // WebRTC remains an optional peer for customers using only the screen components.
14
27
  static id RTCSession(void) {
15
28
  Class c=NSClassFromString(@"RTCAudioSession");
@@ -42,6 +55,7 @@ static void RTCAudio(NSString *selector,AVAudioSession *audio){id s=RTCSession()
42
55
  if(self.started||!self.enabled)return;self.started=YES;
43
56
  NSString *name=[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]?:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]?:@"Calls";
44
57
  CXProviderConfiguration *config=[[CXProviderConfiguration alloc] initWithLocalizedName:name];
58
+ config.iconTemplateImageData=RobonoCallKitIconData();
45
59
  config.supportsVideo=YES;config.maximumCallGroups=1;config.maximumCallsPerCallGroup=1;config.supportedHandleTypes=[NSSet setWithObject:@(CXHandleTypeGeneric)];config.includesCallsInRecents=NO;
46
60
  self.provider=[[CXProvider alloc] initWithConfiguration:config];[self.provider setDelegate:self queue:dispatch_get_main_queue()];self.controller=[CXCallController new];
47
61
  if(self.account.length)[self registerPush];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robono/calling-react-native",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "description": "Optional branded calling screens, sounds and native audio adapters for Robono calling.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -81,7 +81,7 @@
81
81
  "@types/react": "~19.2.2"
82
82
  },
83
83
  "peerDependencies": {
84
- "@robono/calling": "^0.6.2",
84
+ "@robono/calling": "^0.7.0",
85
85
  "react": ">=18.2 <20",
86
86
  "react-native": ">=0.76 <1",
87
87
  "react-native-svg": ">=15 <16",
@@ -0,0 +1,49 @@
1
+ const fs=require('node:fs');
2
+ const path=require('node:path');
3
+ const {withInfoPlist,withXcodeProject,IOSConfig}=require('expo/config-plugins');
4
+ const resource='RobonoCallKitIcon.png';
5
+ const plistKey='RobonoCallKitIconName';
6
+
7
+ function readIcon(projectRoot,input){
8
+ if(typeof input!=='string'||!input.trim()||/^[a-z]+:\/\//i.test(input))throw Error('callKitIcon must be a local PNG file path.');
9
+ const file=path.resolve(projectRoot,input);
10
+ if(!fs.existsSync(file)||!fs.statSync(file).isFile())throw Error('The callKitIcon PNG file does not exist: '+input);
11
+ if(fs.statSync(file).size>1024*1024)throw Error('The callKitIcon PNG must be smaller than 1 MiB.');
12
+ const data=fs.readFileSync(file);
13
+ if(data.length<33||!data.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10]))||data.toString('ascii',12,16)!=='IHDR')throw Error('callKitIcon must be a PNG image.');
14
+ const width=data.readUInt32BE(16),height=data.readUInt32BE(20);
15
+ if(width!==height||![40,80,120].includes(width))throw Error('callKitIcon must be a square PNG: 40, 80, or 120 pixels for a 40-point icon.');
16
+ let alpha=[4,6].includes(data[25]),ended=false;
17
+ for(let offset=8;offset+12<=data.length;){
18
+ const length=data.readUInt32BE(offset),type=data.toString('ascii',offset+4,offset+8);
19
+ if(length>data.length-offset-12)throw Error('callKitIcon contains an incomplete PNG chunk.');
20
+ if(type==='tRNS')alpha=true;
21
+ offset+=length+12;
22
+ if(type==='IEND'){ended=true;break;}
23
+ }
24
+ if(!ended||!alpha)throw Error('callKitIcon must be a complete PNG with an alpha channel for Apple’s template mask.');
25
+ return data;
26
+ }
27
+ function installIcon(project,{projectRoot,platformProjectRoot,projectName,input}){
28
+ const data=readIcon(projectRoot,input);
29
+ const directory=path.join(platformProjectRoot,projectName);
30
+ fs.mkdirSync(directory,{recursive:true});
31
+ fs.writeFileSync(path.join(directory,resource),data);
32
+ const target=IOSConfig.XcodeUtils.getApplicationNativeTarget({project,projectName}).uuid;
33
+ IOSConfig.XcodeUtils.addResourceFileToGroup({filepath:`${projectName}/${resource}`,groupName:projectName,project,isBuildFile:true,targetUuid:target});
34
+ // Resolve from the project root, even when the host's app group has a path.
35
+ for(const file of Object.values(project.pbxFileReferenceSection())){
36
+ if(typeof file==='object'&&file.path?.replaceAll('"','')===`${projectName}/${resource}`)file.sourceTree='SOURCE_ROOT';
37
+ }
38
+ return project;
39
+ }
40
+ function withCallKitIcon(config,input){
41
+ // Leave a native host's manually configured bundle name alone when omitted.
42
+ if(input===undefined)return config;
43
+ config=withInfoPlist(config,c=>{if(input===null)delete c.modResults[plistKey];else c.modResults[plistKey]=resource;return c;});
44
+ if(input===null)return config;
45
+ return withXcodeProject(config,c=>{
46
+ installIcon(c.modResults,{projectRoot:c.modRequest.projectRoot,platformProjectRoot:c.modRequest.platformProjectRoot,projectName:IOSConfig.XcodeUtils.getProjectName(c.modRequest.projectRoot),input});return c;
47
+ });
48
+ }
49
+ module.exports={withCallKitIcon,installIcon,readIcon,resource,plistKey};