react-native-acoustic-connect-beta 18.0.35 → 18.0.37
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 +1 -0
- package/README.md +30 -4
- package/android/src/main/assets/ConnectBasicConfig.properties +4 -4
- package/ios/AcousticConnectRNConfig.json +7 -153
- package/ios/HybridAcousticConnectRN.swift +16 -0
- package/package.json +1 -1
- package/plugin/build/index.d.ts +17 -5
- package/plugin/build/index.d.ts.map +1 -1
- package/plugin/build/index.js +27 -7
- package/plugin/build/index.js.map +1 -1
- package/plugin/build/withConnectAndroidConfig.d.ts +20 -0
- package/plugin/build/withConnectAndroidConfig.d.ts.map +1 -0
- package/plugin/build/withConnectAndroidConfig.js +64 -0
- package/plugin/build/withConnectAndroidConfig.js.map +1 -0
- package/plugin/build/withConnectNCE.d.ts +88 -0
- package/plugin/build/withConnectNCE.d.ts.map +1 -0
- package/plugin/build/withConnectNCE.js +385 -0
- package/plugin/build/withConnectNCE.js.map +1 -0
- package/plugin/build/withConnectNSE.d.ts +37 -4
- package/plugin/build/withConnectNSE.d.ts.map +1 -1
- package/plugin/build/withConnectNSE.js +46 -17
- package/plugin/build/withConnectNSE.js.map +1 -1
- package/plugin/src/index.ts +25 -7
- package/plugin/src/withConnectAndroidConfig.ts +70 -0
- package/plugin/src/withConnectNCE.ts +512 -0
- package/plugin/src/withConnectNSE.ts +58 -17
- package/plugin/swift/NotificationViewController.swift +34 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
## [18.0.37](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/compare/18.0.36...18.0.37) (2026-06-22)
|
|
1
2
|
## [18.0.35](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/compare/18.0.34...18.0.35) (2026-06-15)
|
|
2
3
|
## [18.0.34](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/compare/18.0.33...18.0.34) (2026-06-15)
|
|
3
4
|
## [18.0.33](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/compare/18.0.32...18.0.33) (2026-06-15)
|
package/README.md
CHANGED
|
@@ -163,14 +163,40 @@ During `expo prebuild` the plugin automatically:
|
|
|
163
163
|
- adds a `ConnectNSE` Notification Service Extension target to the Xcode
|
|
164
164
|
project (rich-media push attachments + delivery tracking), with
|
|
165
165
|
`NotificationService.swift` generated from the SDK template;
|
|
166
|
-
- adds
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
- adds a `ConnectNCE` Notification Content Extension target (rich expansion
|
|
167
|
+
UI — renders the attached media / expanded body when the user expands an
|
|
168
|
+
Acoustic notification), with `NotificationViewController.swift` generated
|
|
169
|
+
from the SDK template;
|
|
170
|
+
- adds the App Group entitlement to the host app and to both extensions, so
|
|
171
|
+
all three processes share the same pending store;
|
|
172
|
+
- appends `ConnectNSE` and `ConnectNCE` targets to the generated `Podfile`,
|
|
173
|
+
each linking the same Connect SDK pod as the app.
|
|
169
174
|
|
|
170
175
|
Re-running `expo prebuild` — with or without `--clean` — is idempotent: no
|
|
171
176
|
duplicate targets, entitlements, or Podfile entries.
|
|
172
177
|
|
|
173
|
-
|
|
178
|
+
The NCE renders notifications whose category matches
|
|
179
|
+
`ACOUSTIC_RICH_NOTIFICATION` or `ACTIONABLE_NOTIFICATION` (the categories the
|
|
180
|
+
Connect backend sets on rich-media pushes). No app-side configuration is
|
|
181
|
+
required — the category identifiers are baked into the generated target's
|
|
182
|
+
`Info.plist`.
|
|
183
|
+
|
|
184
|
+
### EAS Build
|
|
185
|
+
|
|
186
|
+
The plugin works with [EAS Build](https://docs.expo.dev/build/introduction/)
|
|
187
|
+
out of the box — the NSE and NCE targets are provisioned by the same
|
|
188
|
+
`expo prebuild` step EAS runs on its build workers. iOS extension targets are
|
|
189
|
+
signed automatically when you use EAS-managed credentials (`eas credentials`),
|
|
190
|
+
which provisions the host app and both extension App IDs together.
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
eas build --profile development --platform ios
|
|
194
|
+
eas build --profile development --platform android
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
A working example — including a sample
|
|
198
|
+
[`eas.json`](Examples/expo/eas.json) — lives in
|
|
199
|
+
[`Examples/expo`](Examples/expo).
|
|
174
200
|
|
|
175
201
|
## Quick start
|
|
176
202
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
#Mon Jun
|
|
1
|
+
#Mon Jun 22 05:14:55 PDT 2026
|
|
2
2
|
UseWhiteList=true
|
|
3
3
|
PrintScreen=3
|
|
4
4
|
UseRandomSample=false
|
|
5
5
|
CookieDomain=.straussandplesser.com
|
|
6
|
-
PostMessageUrl=
|
|
6
|
+
PostMessageUrl=YOUR_POST_MESSAGE_URL_HERE
|
|
7
7
|
SessionTimeout=30
|
|
8
8
|
PercentToCompressImage=80
|
|
9
9
|
CookieExpires=false
|
|
10
|
-
AppKey=
|
|
10
|
+
AppKey=YOUR_CONNECT_APP_KEY_HERE
|
|
11
11
|
KillSwitchEnabled=false
|
|
12
12
|
ScreenShotPixelDensity=1.5
|
|
13
13
|
CookieExpiresFormat=ASCTIME
|
|
@@ -21,7 +21,7 @@ CookieUrl=http\://m.straussandplesser.com
|
|
|
21
21
|
ScreenshotFormat=JPG
|
|
22
22
|
Connection=3
|
|
23
23
|
CookiePath=/
|
|
24
|
-
KillSwitchUrl=
|
|
24
|
+
KillSwitchUrl=YOUR_KILL_SWITCH_URL_HERE
|
|
25
25
|
LogLocationEnabled=true
|
|
26
26
|
LogLocationTimeout=30
|
|
27
27
|
KillSwitchTimeInterval=5
|
|
@@ -1,160 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Connect": {
|
|
3
|
-
"AppKey": "b6c3709b7a4c479bb4b5a9fb8fec324c",
|
|
4
|
-
"KillSwitchUrl": "https://lib-us-2.brilliantcollector.com/collector/switch/b6c3709b7a4c479bb4b5a9fb8fec324c",
|
|
5
|
-
"PostMessageUrl": "https://lib-us-2.brilliantcollector.com/collector/collectorPost",
|
|
6
3
|
"AndroidVersion": "",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
4
|
+
"AppKey": "YOUR_CONNECT_APP_KEY_HERE",
|
|
5
|
+
"KillSwitchUrl": "YOUR_KILL_SWITCH_URL_HERE",
|
|
6
|
+
"PostMessageUrl": "YOUR_POST_MESSAGE_URL_HERE",
|
|
7
|
+
"PushEnabled": true,
|
|
9
8
|
"iOSPushMode": "automatic",
|
|
10
|
-
"iOSAppGroupIdentifier":
|
|
11
|
-
"AndroidNotificationIconResName":
|
|
12
|
-
"
|
|
13
|
-
"AppendMapIds": {
|
|
14
|
-
"[w,9290],[v,0]": {
|
|
15
|
-
"mid": "ASimpleUIView"
|
|
16
|
-
},
|
|
17
|
-
"idxPathValue": {
|
|
18
|
-
"mid": "giveAdditionalId2"
|
|
19
|
-
},
|
|
20
|
-
"tag2999999": {
|
|
21
|
-
"mid": "giveAdditionalId1"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"AutoLayout": {
|
|
25
|
-
"ExampleMaskingPage": {
|
|
26
|
-
"CaptureLayoutDelay": 0,
|
|
27
|
-
"CaptureLayoutOn": 0,
|
|
28
|
-
"CaptureScreenVisits": false,
|
|
29
|
-
"CaptureScreenshotOn": 0,
|
|
30
|
-
"CaptureUserEvents": false,
|
|
31
|
-
"DisplayName": "",
|
|
32
|
-
"Masking": {
|
|
33
|
-
"HasCustomMask": true,
|
|
34
|
-
"HasMasking": true,
|
|
35
|
-
"MaskAccessibilityIdList": [],
|
|
36
|
-
"MaskAccessibilityLabelList": [],
|
|
37
|
-
"MaskIdList": [
|
|
38
|
-
"^9[0-9][0-9][0-9]$",
|
|
39
|
-
"^\\[wvv,0\\],\\[dddv,0\\],\\[v,0\\],\\[v,0\\],\\[v,0\\],\\[b,0\\](.)*$"
|
|
40
|
-
],
|
|
41
|
-
"MaskValueList": [
|
|
42
|
-
"^4[0-9]{12}(?:[0-9]{3})?$",
|
|
43
|
-
"^3[47][0-9]{13}$",
|
|
44
|
-
"^65[4-9][0-9]{13}|64[4-9][0-9]{13}|6011[0-9]{12}|(622(?:12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|9[01][0-9]|92[0-5])[0-9]{10})$",
|
|
45
|
-
"^(5[1-5][0-9]{14}|2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12}))$"
|
|
46
|
-
],
|
|
47
|
-
"Sensitive": {
|
|
48
|
-
"capitalCaseAlphabet": "X",
|
|
49
|
-
"number": "9",
|
|
50
|
-
"smallCaseAlphabet": "x",
|
|
51
|
-
"symbol": "#"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"NumberOfWebViews": 0,
|
|
55
|
-
"ScreenChange": false,
|
|
56
|
-
"ScreenShot": false
|
|
57
|
-
},
|
|
58
|
-
"GlobalScreenSettings": {
|
|
59
|
-
"CaptureLayoutDelay": 1,
|
|
60
|
-
"CaptureLayoutOn": 2,
|
|
61
|
-
"CaptureScreenVisits": false,
|
|
62
|
-
"CaptureScreenshotOn": 2,
|
|
63
|
-
"CaptureUserEvents": true,
|
|
64
|
-
"DisplayName": "",
|
|
65
|
-
"Masking": {
|
|
66
|
-
"HasCustomMask": true,
|
|
67
|
-
"HasMasking": true,
|
|
68
|
-
"MaskAccessibilityIdList": [],
|
|
69
|
-
"MaskAccessibilityLabelList": [],
|
|
70
|
-
"MaskIdList": [],
|
|
71
|
-
"MaskValueList": [],
|
|
72
|
-
"Sensitive": {
|
|
73
|
-
"capitalCaseAlphabet": "X",
|
|
74
|
-
"number": "9",
|
|
75
|
-
"smallCaseAlphabet": "x",
|
|
76
|
-
"symbol": "#"
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
"NumberOfWebViews": 0,
|
|
80
|
-
"ScreenChange": true,
|
|
81
|
-
"ScreenShot": true
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
"layoutConfigIos": {
|
|
86
|
-
"AppendMapIds": {
|
|
87
|
-
"[w,9290],[v,0]": {
|
|
88
|
-
"mid": "ASimpleUIView"
|
|
89
|
-
},
|
|
90
|
-
"idxPathValue": {
|
|
91
|
-
"mid": "giveAdditionalId2"
|
|
92
|
-
},
|
|
93
|
-
"tag2999999": {
|
|
94
|
-
"mid": "giveAdditionalId1"
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
"AutoLayout": {
|
|
98
|
-
"ExampleMaskingPage": {
|
|
99
|
-
"CaptureLayoutDelay": 0,
|
|
100
|
-
"CaptureLayoutOn": 0,
|
|
101
|
-
"CaptureScreenVisits": false,
|
|
102
|
-
"CaptureScreenshotOn": 0,
|
|
103
|
-
"CaptureUserEvents": false,
|
|
104
|
-
"DisplayName": "",
|
|
105
|
-
"Masking": {
|
|
106
|
-
"HasCustomMask": true,
|
|
107
|
-
"HasMasking": true,
|
|
108
|
-
"MaskAccessibilityIdList": [],
|
|
109
|
-
"MaskAccessibilityLabelList": [],
|
|
110
|
-
"MaskIdList": [
|
|
111
|
-
"^9[0-9][0-9][0-9]$",
|
|
112
|
-
"^\\[wvv,0\\],\\[dddv,0\\],\\[v,0\\],\\[v,0\\],\\[v,0\\],\\[b,0\\](.)*$"
|
|
113
|
-
],
|
|
114
|
-
"MaskValueList": [
|
|
115
|
-
"^4[0-9]{12}(?:[0-9]{3})?$",
|
|
116
|
-
"^3[47][0-9]{13}$",
|
|
117
|
-
"^65[4-9][0-9]{13}|64[4-9][0-9]{13}|6011[0-9]{12}|(622(?:12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|9[01][0-9]|92[0-5])[0-9]{10})$",
|
|
118
|
-
"^(5[1-5][0-9]{14}|2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12}))$"
|
|
119
|
-
],
|
|
120
|
-
"Sensitive": {
|
|
121
|
-
"capitalCaseAlphabet": "X",
|
|
122
|
-
"number": "9",
|
|
123
|
-
"smallCaseAlphabet": "x",
|
|
124
|
-
"symbol": "#"
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
"NumberOfWebViews": 0,
|
|
128
|
-
"ScreenChange": false,
|
|
129
|
-
"ScreenShot": false
|
|
130
|
-
},
|
|
131
|
-
"GlobalScreenSettings": {
|
|
132
|
-
"CaptureLayoutDelay": 1,
|
|
133
|
-
"CaptureLayoutOn": 2,
|
|
134
|
-
"CaptureScreenVisits": false,
|
|
135
|
-
"CaptureScreenshotOn": 2,
|
|
136
|
-
"CaptureUserEvents": true,
|
|
137
|
-
"DisplayName": "",
|
|
138
|
-
"Masking": {
|
|
139
|
-
"HasCustomMask": true,
|
|
140
|
-
"HasMasking": true,
|
|
141
|
-
"MaskAccessibilityIdList": [],
|
|
142
|
-
"MaskAccessibilityLabelList": [],
|
|
143
|
-
"MaskIdList": [],
|
|
144
|
-
"MaskValueList": [],
|
|
145
|
-
"Sensitive": {
|
|
146
|
-
"capitalCaseAlphabet": "X",
|
|
147
|
-
"number": "9",
|
|
148
|
-
"smallCaseAlphabet": "x",
|
|
149
|
-
"symbol": "#"
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
"NumberOfWebViews": 0,
|
|
153
|
-
"ScreenChange": true,
|
|
154
|
-
"ScreenShot": true
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
},
|
|
9
|
+
"iOSAppGroupIdentifier": "group.co.acoustic.mobile.connect.rn.expodemo",
|
|
10
|
+
"AndroidNotificationIconResName": "ic_notification",
|
|
11
|
+
"iOSVersion": "",
|
|
158
12
|
"useRelease": false
|
|
159
13
|
}
|
|
160
14
|
}
|
|
@@ -145,6 +145,22 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
|
|
|
145
145
|
|
|
146
146
|
let pushConfig = self.resolvePushConfig(from: connectData)
|
|
147
147
|
|
|
148
|
+
// Non-release integrations (useRelease:false — the AcousticConnectDebug
|
|
149
|
+
// SDK variant) turn on the Connect/Tealeaf/EOCore verbose native logging
|
|
150
|
+
// so it surfaces in the Xcode console / Console.app for QA and support.
|
|
151
|
+
// Must be set before enable() below: EOCore reads `EODebug` from the
|
|
152
|
+
// process environment and caches it on the first log call. overwrite=0
|
|
153
|
+
// leaves any value the host already set (e.g. an Xcode scheme) intact,
|
|
154
|
+
// so a consumer can force it off with CONNECT_DEBUG=0. Release builds
|
|
155
|
+
// (useRelease:true) stay quiet.
|
|
156
|
+
let useRelease = (connectData["useRelease"] as? Bool) ?? false
|
|
157
|
+
if !useRelease {
|
|
158
|
+
setenv("CONNECT_DEBUG", "1", 0)
|
|
159
|
+
setenv("TLF_DEBUG", "1", 0)
|
|
160
|
+
setenv("EODebug", "1", 0)
|
|
161
|
+
bridgeLog.info("useRelease=false — enabled verbose native SDK logging (CONNECT_DEBUG/TLF_DEBUG/EODebug)")
|
|
162
|
+
}
|
|
163
|
+
|
|
148
164
|
let sdk = ConnectSDK.shared
|
|
149
165
|
bridgeLog.info("Calling ConnectSDK.shared.enable(with: ConnectConfig(push: \(pushConfig.modeDescription, privacy: .public)))")
|
|
150
166
|
sdk.enable(with: ConnectConfig(appKey: appKey, postURL: postURL, push: pushConfig))
|
package/package.json
CHANGED
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
"source": "src/index",
|
|
211
211
|
"summary": "react-native ios android tealeaf connect cxa wxca er enhanced-replay",
|
|
212
212
|
"types": "./lib/typescript/src/index.d.ts",
|
|
213
|
-
"version": "18.0.
|
|
213
|
+
"version": "18.0.37",
|
|
214
214
|
"workspaces": [
|
|
215
215
|
"example",
|
|
216
216
|
"Examples/bare-workflow"
|
package/plugin/build/index.d.ts
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
import { type ConfigPlugin } from '@expo/config-plugins';
|
|
2
2
|
import { withConnectNSE, type ConnectPluginProps } from './withConnectNSE';
|
|
3
|
+
import { withConnectNCE } from './withConnectNCE';
|
|
4
|
+
import { withConnectAndroidConfig } from './withConnectAndroidConfig';
|
|
3
5
|
/**
|
|
4
6
|
* Expo Config Plugin for react-native-acoustic-connect-beta.
|
|
5
7
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* iOS: provisions the ConnectNSE Notification Service Extension and the
|
|
9
|
+
* ConnectNCE Notification Content Extension targets during `expo prebuild`.
|
|
10
|
+
*
|
|
11
|
+
* Android: wires the SDK's config.gradle into the generated app build so
|
|
12
|
+
* ConnectConfig.json values (collector URL, app key) reach the native assets
|
|
13
|
+
* at build time (withConnectAndroidConfig). FCM push needs no mod here — Expo
|
|
14
|
+
* wires the google-services Gradle plugin natively when the consumer sets
|
|
15
|
+
* `android.googleServicesFile` in app.json.
|
|
16
|
+
*
|
|
17
|
+
* Designed as a chainable composition: additional mods are appended by adding
|
|
18
|
+
* to the mods array. Order matters for the iOS pair — withConnectNSE runs
|
|
19
|
+
* first so it seeds the host entitlements and the
|
|
20
|
+
* PBXTargetDependency/PBXContainerItemProxy sections that withConnectNCE
|
|
21
|
+
* reuses. The Android mod is independent of that ordering.
|
|
10
22
|
*
|
|
11
23
|
* Consumer app.json usage:
|
|
12
24
|
* // With explicit App Group override:
|
|
@@ -17,6 +29,6 @@ import { withConnectNSE, type ConnectPluginProps } from './withConnectNSE';
|
|
|
17
29
|
*/
|
|
18
30
|
declare const withAcousticConnect: ConfigPlugin<ConnectPluginProps | void>;
|
|
19
31
|
export default withAcousticConnect;
|
|
20
|
-
export { withConnectNSE };
|
|
32
|
+
export { withConnectNSE, withConnectNCE, withConnectAndroidConfig };
|
|
21
33
|
export type { ConnectPluginProps };
|
|
22
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAErE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,QAAA,MAAM,mBAAmB,EAAE,YAAY,CAAC,kBAAkB,GAAG,IAAI,CAiBhE,CAAA;AAED,eAAe,mBAAmB,CAAA;AAClC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,wBAAwB,EAAE,CAAA;AACnE,YAAY,EAAE,kBAAkB,EAAE,CAAA"}
|
package/plugin/build/index.js
CHANGED
|
@@ -7,16 +7,30 @@
|
|
|
7
7
|
// be provided in an agreement with Acoustic, L.P. Any unauthorized copying or
|
|
8
8
|
// distribution of content from this file is prohibited.
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.withConnectNSE = void 0;
|
|
10
|
+
exports.withConnectAndroidConfig = exports.withConnectNCE = exports.withConnectNSE = void 0;
|
|
11
11
|
const withConnectNSE_1 = require("./withConnectNSE");
|
|
12
12
|
Object.defineProperty(exports, "withConnectNSE", { enumerable: true, get: function () { return withConnectNSE_1.withConnectNSE; } });
|
|
13
|
+
const withConnectNCE_1 = require("./withConnectNCE");
|
|
14
|
+
Object.defineProperty(exports, "withConnectNCE", { enumerable: true, get: function () { return withConnectNCE_1.withConnectNCE; } });
|
|
15
|
+
const withConnectAndroidConfig_1 = require("./withConnectAndroidConfig");
|
|
16
|
+
Object.defineProperty(exports, "withConnectAndroidConfig", { enumerable: true, get: function () { return withConnectAndroidConfig_1.withConnectAndroidConfig; } });
|
|
13
17
|
/**
|
|
14
18
|
* Expo Config Plugin for react-native-acoustic-connect-beta.
|
|
15
19
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
+
* iOS: provisions the ConnectNSE Notification Service Extension and the
|
|
21
|
+
* ConnectNCE Notification Content Extension targets during `expo prebuild`.
|
|
22
|
+
*
|
|
23
|
+
* Android: wires the SDK's config.gradle into the generated app build so
|
|
24
|
+
* ConnectConfig.json values (collector URL, app key) reach the native assets
|
|
25
|
+
* at build time (withConnectAndroidConfig). FCM push needs no mod here — Expo
|
|
26
|
+
* wires the google-services Gradle plugin natively when the consumer sets
|
|
27
|
+
* `android.googleServicesFile` in app.json.
|
|
28
|
+
*
|
|
29
|
+
* Designed as a chainable composition: additional mods are appended by adding
|
|
30
|
+
* to the mods array. Order matters for the iOS pair — withConnectNSE runs
|
|
31
|
+
* first so it seeds the host entitlements and the
|
|
32
|
+
* PBXTargetDependency/PBXContainerItemProxy sections that withConnectNCE
|
|
33
|
+
* reuses. The Android mod is independent of that ordering.
|
|
20
34
|
*
|
|
21
35
|
* Consumer app.json usage:
|
|
22
36
|
* // With explicit App Group override:
|
|
@@ -27,8 +41,14 @@ Object.defineProperty(exports, "withConnectNSE", { enumerable: true, get: functi
|
|
|
27
41
|
*/
|
|
28
42
|
const withAcousticConnect = (config, props) => {
|
|
29
43
|
const resolvedProps = props != null && typeof props === 'object' ? props : {};
|
|
30
|
-
// Chainable composition array
|
|
31
|
-
|
|
44
|
+
// Chainable composition array. withConnectNSE must precede withConnectNCE:
|
|
45
|
+
// the NSE mod seeds the host App Group entitlement and the
|
|
46
|
+
// PBXTargetDependency/PBXContainerItemProxy sections the NCE mod relies on.
|
|
47
|
+
const mods = [
|
|
48
|
+
withConnectNSE_1.withConnectNSE,
|
|
49
|
+
withConnectNCE_1.withConnectNCE,
|
|
50
|
+
withConnectAndroidConfig_1.withConnectAndroidConfig,
|
|
51
|
+
];
|
|
32
52
|
return mods.reduce((accConfig, mod) => mod(accConfig, resolvedProps), config);
|
|
33
53
|
};
|
|
34
54
|
exports.default = withAcousticConnect;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,yDAAyD;AACzD,EAAE;AACF,8EAA8E;AAC9E,0EAA0E;AAC1E,6EAA6E;AAC7E,8EAA8E;AAC9E,wDAAwD;;;AAGxD,qDAA0E;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,yDAAyD;AACzD,EAAE;AACF,8EAA8E;AAC9E,0EAA0E;AAC1E,6EAA6E;AAC7E,8EAA8E;AAC9E,wDAAwD;;;AAGxD,qDAA0E;AAiDjE,+FAjDA,+BAAc,OAiDA;AAhDvB,qDAAiD;AAgDxB,+FAhDhB,+BAAc,OAgDgB;AA/CvC,yEAAqE;AA+C5B,yGA/ChC,mDAAwB,OA+CgC;AA7CjE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,mBAAmB,GAA4C,CACnE,MAAM,EACN,KAAK,EACL,EAAE;IACF,MAAM,aAAa,GACjB,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;IAEzD,2EAA2E;IAC3E,2DAA2D;IAC3D,4EAA4E;IAC5E,MAAM,IAAI,GAA4C;QACpD,+BAAc;QACd,+BAAc;QACd,mDAAwB;KACzB,CAAA;IAED,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,EAAE,aAAa,CAAC,EAAE,MAAM,CAAC,CAAA;AAC/E,CAAC,CAAA;AAED,kBAAe,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
+
import type { ConnectPluginProps } from './withConnectNSE';
|
|
3
|
+
export declare const CONFIG_GRADLE_APPLY: string;
|
|
4
|
+
/**
|
|
5
|
+
* Append the config.gradle `apply from:` line to an app `build.gradle` body.
|
|
6
|
+
*
|
|
7
|
+
* Idempotent: a no-op when the line is already present, so repeated prebuilds
|
|
8
|
+
* (and a prebuild over an already-patched, non-`--clean` project) don't stack
|
|
9
|
+
* duplicate applies.
|
|
10
|
+
*/
|
|
11
|
+
export declare function appendConfigGradleApply(contents: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Expo config mod: wire the SDK's config.gradle into the generated Android
|
|
14
|
+
* app build so ConnectConfig.json values reach the native assets at build
|
|
15
|
+
* time. Without it, the Android SDK ships its committed default collector
|
|
16
|
+
* config and the app reports to the wrong endpoint (iOS is unaffected — it
|
|
17
|
+
* uses AcousticConnectRNConfig.json via a separate flow).
|
|
18
|
+
*/
|
|
19
|
+
export declare const withConnectAndroidConfig: ConfigPlugin<ConnectPluginProps>;
|
|
20
|
+
//# sourceMappingURL=withConnectAndroidConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withConnectAndroidConfig.d.ts","sourceRoot":"","sources":["../src/withConnectAndroidConfig.ts"],"names":[],"mappings":"AAQA,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAgB1D,eAAO,MAAM,mBAAmB,QAEY,CAAA;AAE5C;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKhE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,EAAE,YAAY,CAAC,kBAAkB,CAmBlE,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (C) 2026 Acoustic, L.P. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// NOTICE: This file contains material that is confidential and proprietary to
|
|
5
|
+
// Acoustic, L.P. and/or other developers. No license is granted under any
|
|
6
|
+
// intellectual or industrial property rights of Acoustic, L.P. except as may
|
|
7
|
+
// be provided in an agreement with Acoustic, L.P. Any unauthorized copying or
|
|
8
|
+
// distribution of content from this file is prohibited.
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.withConnectAndroidConfig = exports.appendConfigGradleApply = exports.CONFIG_GRADLE_APPLY = void 0;
|
|
11
|
+
const config_plugins_1 = require("@expo/config-plugins");
|
|
12
|
+
// The Gradle snippet that runs the SDK's config.gradle. config.gradle reads
|
|
13
|
+
// the consumer app's ConnectConfig.json (`$project.rootDir/../ConnectConfig.json`)
|
|
14
|
+
// and writes AppKey / PostMessageUrl / KillSwitchUrl (and the Tealeaf + EOCore
|
|
15
|
+
// configs) into the SDK module's `src/main/assets/*` at Gradle configuration
|
|
16
|
+
// time — so the collector the app reports to is driven by ConnectConfig.json.
|
|
17
|
+
//
|
|
18
|
+
// This mirrors the line `scripts/gradleParser.js` appends for the bare-workflow
|
|
19
|
+
// sample (Examples/bare-workflow/android/app/build.gradle). The Expo Android
|
|
20
|
+
// project is gitignored and regenerated by `expo prebuild`, so the line cannot
|
|
21
|
+
// be committed there — this mod re-injects it on every prebuild instead.
|
|
22
|
+
//
|
|
23
|
+
// The ':react-native-acoustic-connect-beta' Gradle project is provided by
|
|
24
|
+
// React Native autolinking and resolves in the Expo app the same way it does
|
|
25
|
+
// in bare-workflow.
|
|
26
|
+
exports.CONFIG_GRADLE_APPLY = `apply from: project(':react-native-acoustic-connect-beta')` +
|
|
27
|
+
`.projectDir.getPath() + "/config.gradle"`;
|
|
28
|
+
/**
|
|
29
|
+
* Append the config.gradle `apply from:` line to an app `build.gradle` body.
|
|
30
|
+
*
|
|
31
|
+
* Idempotent: a no-op when the line is already present, so repeated prebuilds
|
|
32
|
+
* (and a prebuild over an already-patched, non-`--clean` project) don't stack
|
|
33
|
+
* duplicate applies.
|
|
34
|
+
*/
|
|
35
|
+
function appendConfigGradleApply(contents) {
|
|
36
|
+
if (contents.includes('/config.gradle')) {
|
|
37
|
+
return contents;
|
|
38
|
+
}
|
|
39
|
+
return `${contents}\n\n${exports.CONFIG_GRADLE_APPLY}\n`;
|
|
40
|
+
}
|
|
41
|
+
exports.appendConfigGradleApply = appendConfigGradleApply;
|
|
42
|
+
/**
|
|
43
|
+
* Expo config mod: wire the SDK's config.gradle into the generated Android
|
|
44
|
+
* app build so ConnectConfig.json values reach the native assets at build
|
|
45
|
+
* time. Without it, the Android SDK ships its committed default collector
|
|
46
|
+
* config and the app reports to the wrong endpoint (iOS is unaffected — it
|
|
47
|
+
* uses AcousticConnectRNConfig.json via a separate flow).
|
|
48
|
+
*/
|
|
49
|
+
const withConnectAndroidConfig = (config) => (0, config_plugins_1.withAppBuildGradle)(config, (cfg) => {
|
|
50
|
+
// The RN/Expo template app build.gradle is Groovy. If a future template
|
|
51
|
+
// switches to the Kotlin DSL the append heuristic no longer applies —
|
|
52
|
+
// warn and skip rather than corrupt the file.
|
|
53
|
+
if (cfg.modResults.language !== 'groovy') {
|
|
54
|
+
console.warn(`[react-native-acoustic-connect-beta] Skipping Android config ` +
|
|
55
|
+
`propagation: app/build.gradle is '${cfg.modResults.language}', ` +
|
|
56
|
+
`expected 'groovy'. Add the following line manually:\n` +
|
|
57
|
+
` ${exports.CONFIG_GRADLE_APPLY}`);
|
|
58
|
+
return cfg;
|
|
59
|
+
}
|
|
60
|
+
cfg.modResults.contents = appendConfigGradleApply(cfg.modResults.contents);
|
|
61
|
+
return cfg;
|
|
62
|
+
});
|
|
63
|
+
exports.withConnectAndroidConfig = withConnectAndroidConfig;
|
|
64
|
+
//# sourceMappingURL=withConnectAndroidConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withConnectAndroidConfig.js","sourceRoot":"","sources":["../src/withConnectAndroidConfig.ts"],"names":[],"mappings":";AAAA,yDAAyD;AACzD,EAAE;AACF,8EAA8E;AAC9E,0EAA0E;AAC1E,6EAA6E;AAC7E,8EAA8E;AAC9E,wDAAwD;;;AAExD,yDAA4E;AAG5E,4EAA4E;AAC5E,mFAAmF;AACnF,+EAA+E;AAC/E,6EAA6E;AAC7E,8EAA8E;AAC9E,EAAE;AACF,gFAAgF;AAChF,6EAA6E;AAC7E,+EAA+E;AAC/E,yEAAyE;AACzE,EAAE;AACF,0EAA0E;AAC1E,6EAA6E;AAC7E,oBAAoB;AACP,QAAA,mBAAmB,GAC9B,4DAA4D;IAC5D,0CAA0C,CAAA;AAE5C;;;;;;GAMG;AACH,SAAgB,uBAAuB,CAAC,QAAgB;IACtD,IAAI,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE;QACvC,OAAO,QAAQ,CAAA;KAChB;IACD,OAAO,GAAG,QAAQ,OAAO,2BAAmB,IAAI,CAAA;AAClD,CAAC;AALD,0DAKC;AAED;;;;;;GAMG;AACI,MAAM,wBAAwB,GAAqC,CACxE,MAAM,EACN,EAAE,CACF,IAAA,mCAAkB,EAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE;IACjC,wEAAwE;IACxE,sEAAsE;IACtE,8CAA8C;IAC9C,IAAI,GAAG,CAAC,UAAU,CAAC,QAAQ,KAAK,QAAQ,EAAE;QACxC,OAAO,CAAC,IAAI,CACV,+DAA+D;YAC7D,qCAAqC,GAAG,CAAC,UAAU,CAAC,QAAQ,KAAK;YACjE,uDAAuD;YACvD,KAAK,2BAAmB,EAAE,CAC7B,CAAA;QACD,OAAO,GAAG,CAAA;KACX;IAED,GAAG,CAAC,UAAU,CAAC,QAAQ,GAAG,uBAAuB,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;IAC1E,OAAO,GAAG,CAAA;AACZ,CAAC,CAAC,CAAA;AAnBS,QAAA,wBAAwB,4BAmBjC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
+
import type { ExpoConfig } from '@expo/config-types';
|
|
3
|
+
import { type ConnectPluginProps } from './withConnectNSE';
|
|
4
|
+
/**
|
|
5
|
+
* Generates the Info.plist content for the ConnectNCE target.
|
|
6
|
+
*
|
|
7
|
+
* The NSExtensionAttributes mirror the canonical bare-workflow reference
|
|
8
|
+
* (Examples/bare-workflow/ios/ConnectNCE/Info.plist), which itself mirrors the
|
|
9
|
+
* iOS-SDK NCE 1:1:
|
|
10
|
+
* - UNNotificationExtensionCategory: the category identifiers the Connect
|
|
11
|
+
* APNs payload routes rich-media notifications through. Must match the
|
|
12
|
+
* category the SDK/Collector sets — keep in sync with the iOS-SDK NCE.
|
|
13
|
+
* - UNNotificationExtensionDefaultContentHidden=false: keep the default
|
|
14
|
+
* system body alongside the custom content view.
|
|
15
|
+
* - UNNotificationExtensionInitialContentSizeRatio=1.0: start full-height;
|
|
16
|
+
* the SDK content controller resizes to fit the rendered media.
|
|
17
|
+
*
|
|
18
|
+
* RCTNewArchEnabled is intentionally omitted: the NCE links the Connect SDK
|
|
19
|
+
* only — no React Native runtime is present in the extension process. (The
|
|
20
|
+
* bare-workflow reference carries it as an Xcode-template leftover; the
|
|
21
|
+
* plugin-generated target drops it, consistent with the NSE template.)
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildNCEInfoPlist(): string;
|
|
24
|
+
/** Generates the entitlements plist content for the ConnectNCE target. */
|
|
25
|
+
export declare function buildNCEEntitlements(appGroupIdentifier: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the Ruby snippet to inject into the Expo-generated Podfile for the
|
|
28
|
+
* ConnectNCE target. Thin wrapper over the shared
|
|
29
|
+
* {@link buildConnectPodTargetBlock} (single source of truth for the
|
|
30
|
+
* AcousticConnect pod-resolution helper), parameterised with the NCE marker,
|
|
31
|
+
* helper name, and target name.
|
|
32
|
+
*/
|
|
33
|
+
export declare function buildPodfileBlock(): string;
|
|
34
|
+
/**
|
|
35
|
+
* Injects the ConnectNCE Podfile block into `podfileContent` if not already
|
|
36
|
+
* present (idempotent, guarded by PODFILE_MARKER).
|
|
37
|
+
*/
|
|
38
|
+
export declare function injectPodfileBlock(podfileContent: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Adds the ConnectNCE Xcode target (app_extension) to the project.
|
|
41
|
+
*
|
|
42
|
+
* Sibling to withNSEXcodeProject; the only differences are the target name,
|
|
43
|
+
* the Swift source file (NotificationViewController.swift), the NCE Info.plist
|
|
44
|
+
* (content-extension NSExtension keys), and skipping BOTH extension targets'
|
|
45
|
+
* configs when mirroring host build settings.
|
|
46
|
+
*
|
|
47
|
+
* Idempotent: if a target named ConnectNCE already exists, skips target
|
|
48
|
+
* creation but still (re)writes the source files.
|
|
49
|
+
*/
|
|
50
|
+
export declare function withNCEXcodeProject(config: ExpoConfig, appGroupIdentifier: string, swiftContent: string): ExpoConfig;
|
|
51
|
+
/**
|
|
52
|
+
* Injects the ConnectNCE Podfile target block via withDangerousMod.
|
|
53
|
+
* Guarded by a marker comment — re-runs are no-ops.
|
|
54
|
+
*
|
|
55
|
+
* Throws a clear, actionable error when the Podfile does not exist at
|
|
56
|
+
* mod-execution time, instead of silently returning — a silent skip would
|
|
57
|
+
* ship an NCE whose `import Connect` cannot resolve.
|
|
58
|
+
*/
|
|
59
|
+
export declare function withNCEPodfile(config: ExpoConfig): ExpoConfig;
|
|
60
|
+
/**
|
|
61
|
+
* Expo Config Plugin mod that provisions a Notification Content Extension
|
|
62
|
+
* (NCE) Xcode target named `ConnectNCE`.
|
|
63
|
+
*
|
|
64
|
+
* Applies three mutations — all idempotent:
|
|
65
|
+
* 1. Host app entitlements: merges App Group into
|
|
66
|
+
* `com.apple.security.application-groups` (reuses the NSE host-entitlements
|
|
67
|
+
* mod — the host shares one App Group across app + NSE + NCE; the merge is
|
|
68
|
+
* a no-op when the NSE mod already added it).
|
|
69
|
+
* 2. Xcode project: adds ConnectNCE target + files (skips if already present).
|
|
70
|
+
* 3. Podfile: injects `target 'ConnectNCE'` block (guarded by marker comment).
|
|
71
|
+
*
|
|
72
|
+
* `config._internal.projectRoot` is required (injected by Expo CLI during
|
|
73
|
+
* `expo prebuild`); an actionable error is thrown if absent rather than
|
|
74
|
+
* silently falling back to `process.cwd()`.
|
|
75
|
+
*
|
|
76
|
+
* NSE coupling (intentional, tracked for refactor): this mod deliberately
|
|
77
|
+
* reuses three pieces of withConnectNSE — `withNSEEntitlements` (the host App
|
|
78
|
+
* Group is shared across app + NSE + NCE), `buildConnectPodTargetBlock` (one
|
|
79
|
+
* source for the pod-resolution helper), and `getHostBuildSettingForConfig`
|
|
80
|
+
* (the per-config mirroring logic). The composition always runs withConnectNSE
|
|
81
|
+
* before withConnectNCE, so the shared host entitlement and the
|
|
82
|
+
* PBXTargetDependency/PBXContainerItemProxy sections already exist when this
|
|
83
|
+
* runs. Extracting a shared `withConnectExtension` base for NSE + NCE is
|
|
84
|
+
* tracked as a follow-up refactor (see PR description) rather than done here,
|
|
85
|
+
* to keep the already-landed NSE mod stable.
|
|
86
|
+
*/
|
|
87
|
+
export declare const withConnectNCE: ConfigPlugin<ConnectPluginProps>;
|
|
88
|
+
//# sourceMappingURL=withConnectNCE.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withConnectNCE.d.ts","sourceRoot":"","sources":["../src/withConnectNCE.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAGpD,OAAO,EAML,KAAK,kBAAkB,EACxB,MAAM,kBAAkB,CAAA;AAuBzB;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CA6C1C;AAED,0EAA0E;AAC1E,wBAAgB,oBAAoB,CAAC,kBAAkB,EAAE,MAAM,GAAG,MAAM,CAYvE;AAOD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAM1C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAKjE;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,UAAU,EAClB,kBAAkB,EAAE,MAAM,EAC1B,YAAY,EAAE,MAAM,GACnB,UAAU,CA8OZ;AAID;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAuB7D;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,cAAc,EAAE,YAAY,CAAC,kBAAkB,CAgC3D,CAAA"}
|