react-native-acoustic-connect-beta 18.0.34 → 18.0.36
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 +2 -0
- package/README.md +117 -2
- package/android/src/main/assets/ConnectBasicConfig.properties +1 -1
- package/app.plugin.js +15 -0
- package/package.json +15 -1
- package/plugin/build/index.d.ts +25 -0
- package/plugin/build/index.d.ts.map +1 -0
- package/plugin/build/index.js +44 -0
- package/plugin/build/index.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 +366 -0
- package/plugin/build/withConnectNCE.js.map +1 -0
- package/plugin/build/withConnectNSE.d.ts +120 -0
- package/plugin/build/withConnectNSE.d.ts.map +1 -0
- package/plugin/build/withConnectNSE.js +512 -0
- package/plugin/build/withConnectNSE.js.map +1 -0
- package/plugin/src/index.ts +50 -0
- package/plugin/src/withConnectNCE.ts +487 -0
- package/plugin/src/withConnectNSE.ts +689 -0
- package/plugin/swift/NotificationService.swift +34 -0
- package/plugin/swift/NotificationViewController.swift +34 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
## [18.0.36](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/compare/18.0.35...18.0.36) (2026-06-17)
|
|
2
|
+
## [18.0.35](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/compare/18.0.34...18.0.35) (2026-06-15)
|
|
1
3
|
## [18.0.34](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/compare/18.0.33...18.0.34) (2026-06-15)
|
|
2
4
|
## [18.0.33](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/compare/18.0.32...18.0.33) (2026-06-15)
|
|
3
5
|
<!--
|
package/README.md
CHANGED
|
@@ -15,8 +15,9 @@ For the full product overview see the
|
|
|
15
15
|
- Node 20 or newer
|
|
16
16
|
- iOS deployment target ≥ 15.1, AcousticConnect / AcousticConnectDebug pod ≥ 2.0.5
|
|
17
17
|
- Android `minSdk` ≥ 26, `compileSdk` ≥ 35, `io.github.go-acoustic:connect` in `[11.0.11, 12.0.0)`
|
|
18
|
-
- **Expo is
|
|
19
|
-
|
|
18
|
+
- **Expo SDK 55+ is supported** via the bundled Expo Config Plugin —
|
|
19
|
+
development builds only (Expo Go is not supported); see
|
|
20
|
+
[Using with Expo SDK 55+](#using-with-expo-sdk-55).
|
|
20
21
|
|
|
21
22
|
### Nitro version pin
|
|
22
23
|
|
|
@@ -83,6 +84,120 @@ Field summary (see [API reference](#api-reference) for full semantics):
|
|
|
83
84
|
| `iOSAppGroupIdentifier` | `null` | iOS App Group shared with the Notification Service / Notification Content extension. |
|
|
84
85
|
| `AndroidNotificationIconResName` | `null` | Drawable resource name (no extension) for the Android notification small icon. |
|
|
85
86
|
|
|
87
|
+
## Using with Expo SDK 55+
|
|
88
|
+
|
|
89
|
+
Expo SDK 55 and newer is supported via the bundled Expo Config Plugin.
|
|
90
|
+
**Development builds only** — Expo Go is not supported: Nitro Modules and
|
|
91
|
+
native push registration require native code that Expo Go cannot load. There
|
|
92
|
+
is no runtime Expo Go detection or fallback; use
|
|
93
|
+
[`expo-dev-client`](https://docs.expo.dev/develop/development-builds/introduction/)
|
|
94
|
+
or EAS Build.
|
|
95
|
+
|
|
96
|
+
### Install
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npx create-expo-app@latest my-app # Expo SDK 55+, new architecture enabled
|
|
100
|
+
cd my-app
|
|
101
|
+
npx expo install expo-dev-client expo-build-properties
|
|
102
|
+
npm install react-native-acoustic-connect-beta react-native-nitro-modules
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
`expo-build-properties` is needed to raise Android `minSdkVersion` to 26
|
|
106
|
+
(the Connect Android SDK floor — Expo templates default to a lower value):
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"expo": {
|
|
111
|
+
"plugins": [
|
|
112
|
+
["expo-build-properties", { "android": { "minSdkVersion": 26 } }]
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Configure
|
|
119
|
+
|
|
120
|
+
1. Put `ConnectConfig.json` at the project root — the same file documented in
|
|
121
|
+
[Installation](#installation). For push, set `PushEnabled`, `iOSPushMode`,
|
|
122
|
+
and `iOSAppGroupIdentifier` in the `Connect` block.
|
|
123
|
+
|
|
124
|
+
2. Add the plugin to `app.json`:
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"expo": {
|
|
129
|
+
"plugins": ["react-native-acoustic-connect-beta"]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
The plugin reads the App Group from `Connect.iOSAppGroupIdentifier` in
|
|
135
|
+
`ConnectConfig.json` — the same value the SDK reads at runtime, so the
|
|
136
|
+
entitlement and the runtime config agree by construction. To use a different
|
|
137
|
+
value for the entitlement only (rarely needed), pass a plugin prop; the prop
|
|
138
|
+
takes precedence over `ConnectConfig.json`:
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"expo": {
|
|
143
|
+
"plugins": [
|
|
144
|
+
[
|
|
145
|
+
"react-native-acoustic-connect-beta",
|
|
146
|
+
{ "iosAppGroupIdentifier": "group.com.example.myapp" }
|
|
147
|
+
]
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Build
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
npx expo prebuild
|
|
157
|
+
npx expo run:ios # or: eas build --profile development --platform ios
|
|
158
|
+
npx expo run:android # or: eas build --profile development --platform android
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
During `expo prebuild` the plugin automatically:
|
|
162
|
+
|
|
163
|
+
- adds a `ConnectNSE` Notification Service Extension target to the Xcode
|
|
164
|
+
project (rich-media push attachments + delivery tracking), with
|
|
165
|
+
`NotificationService.swift` generated from the SDK template;
|
|
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.
|
|
174
|
+
|
|
175
|
+
Re-running `expo prebuild` — with or without `--clean` — is idempotent: no
|
|
176
|
+
duplicate targets, entitlements, or Podfile entries.
|
|
177
|
+
|
|
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).
|
|
200
|
+
|
|
86
201
|
## Quick start
|
|
87
202
|
|
|
88
203
|
### 1. Initialise the SDK
|
package/app.plugin.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright (C) 2026 Acoustic, L.P. All rights reserved.
|
|
2
|
+
//
|
|
3
|
+
// Thin entry shim for the Expo Config Plugin.
|
|
4
|
+
//
|
|
5
|
+
// Expo resolves the plugin from the package root via the `expo.plugins` field
|
|
6
|
+
// in app.json. This file delegates directly to the compiled plugin build so
|
|
7
|
+
// that Expo's Node.js environment (CommonJS) loads it correctly.
|
|
8
|
+
//
|
|
9
|
+
// The plugin composition is defined in plugin/src/index.ts and compiled to
|
|
10
|
+
// plugin/build/index.js (CommonJS) by `npm run build:plugin`.
|
|
11
|
+
//
|
|
12
|
+
// To add a new mod (e.g. withConnectNCE from CA-143488), extend the `mods`
|
|
13
|
+
// array in plugin/src/index.ts — do not modify this shim.
|
|
14
|
+
|
|
15
|
+
module.exports = require('./plugin/build/index').default
|
package/package.json
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"description": "BETA: React native plugin for Acoustic Connect",
|
|
10
10
|
"devDependencies": {
|
|
11
|
+
"@expo/config-plugins": "~55.0.10",
|
|
12
|
+
"@expo/config-types": "^55.0.5",
|
|
11
13
|
"@jamesacarr/eslint-formatter-github-actions": "^0.2.0",
|
|
12
14
|
"@release-it/bumper": "^7.0.1",
|
|
13
15
|
"@release-it/conventional-changelog": "^10.0.0",
|
|
@@ -71,6 +73,9 @@
|
|
|
71
73
|
"ios/**/*.swift",
|
|
72
74
|
"ios/AcousticConnectRNConfig.json",
|
|
73
75
|
"app.plugin.js",
|
|
76
|
+
"plugin/build",
|
|
77
|
+
"plugin/swift",
|
|
78
|
+
"plugin/src",
|
|
74
79
|
"*.podspec",
|
|
75
80
|
"README.md",
|
|
76
81
|
"CHANGELOG.md",
|
|
@@ -98,10 +103,16 @@
|
|
|
98
103
|
"module": "./lib/module/index.js",
|
|
99
104
|
"name": "react-native-acoustic-connect-beta",
|
|
100
105
|
"peerDependencies": {
|
|
106
|
+
"@expo/config-plugins": ">=55.0.0",
|
|
101
107
|
"react": ">=19.1.1 <20.0.0",
|
|
102
108
|
"react-native": ">=0.82.0 <0.86.0",
|
|
103
109
|
"react-native-nitro-modules": "0.35.9"
|
|
104
110
|
},
|
|
111
|
+
"peerDependenciesMeta": {
|
|
112
|
+
"@expo/config-plugins": {
|
|
113
|
+
"optional": true
|
|
114
|
+
}
|
|
115
|
+
},
|
|
105
116
|
"prettier": {
|
|
106
117
|
"quoteProps": "consistent",
|
|
107
118
|
"semi": false,
|
|
@@ -184,11 +195,14 @@
|
|
|
184
195
|
"scripts": {
|
|
185
196
|
"applyConfiguration": "node scripts/applyConfiguration.js $INIT_CWD",
|
|
186
197
|
"build": "npm run typecheck && bob build",
|
|
198
|
+
"build:plugin": "tsc -p plugin/tsconfig.json",
|
|
187
199
|
"codegen": "nitrogen --logLevel=\"debug\" && npm run build && node post-script.js",
|
|
188
200
|
"postinstall": "./scripts/postInstallScripts.sh",
|
|
201
|
+
"prepack": "npm run build:plugin",
|
|
189
202
|
"rebuild": "npm run codegen && npm run rebuildExample --prefix ./example",
|
|
190
203
|
"release": "release-it",
|
|
191
204
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
205
|
+
"test:plugin": "npm run build:plugin && node --test plugin/__tests__/",
|
|
192
206
|
"typecheck": "tsc --noEmit",
|
|
193
207
|
"verifyConnectSetup": "node scripts/verifyConnectSetup.js $INIT_CWD",
|
|
194
208
|
"yalcPublish": "npm run rebuild && yalc publish"
|
|
@@ -196,7 +210,7 @@
|
|
|
196
210
|
"source": "src/index",
|
|
197
211
|
"summary": "react-native ios android tealeaf connect cxa wxca er enhanced-replay",
|
|
198
212
|
"types": "./lib/typescript/src/index.d.ts",
|
|
199
|
-
"version": "18.0.
|
|
213
|
+
"version": "18.0.36",
|
|
200
214
|
"workspaces": [
|
|
201
215
|
"example",
|
|
202
216
|
"Examples/bare-workflow"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
+
import { withConnectNSE, type ConnectPluginProps } from './withConnectNSE';
|
|
3
|
+
import { withConnectNCE } from './withConnectNCE';
|
|
4
|
+
/**
|
|
5
|
+
* Expo Config Plugin for react-native-acoustic-connect-beta.
|
|
6
|
+
*
|
|
7
|
+
* Provisions the ConnectNSE Notification Service Extension and the ConnectNCE
|
|
8
|
+
* Notification Content Extension targets during `expo prebuild`. Designed as a
|
|
9
|
+
* chainable composition: additional mods are appended by adding to the mods
|
|
10
|
+
* array. Order matters — withConnectNSE runs first so it seeds the host
|
|
11
|
+
* entitlements and the PBXTargetDependency/PBXContainerItemProxy sections that
|
|
12
|
+
* withConnectNCE reuses.
|
|
13
|
+
*
|
|
14
|
+
* Consumer app.json usage:
|
|
15
|
+
* // With explicit App Group override:
|
|
16
|
+
* ["react-native-acoustic-connect-beta", { "iosAppGroupIdentifier": "group.com.example.app" }]
|
|
17
|
+
*
|
|
18
|
+
* // Without props (reads from ConnectConfig.json):
|
|
19
|
+
* "react-native-acoustic-connect-beta"
|
|
20
|
+
*/
|
|
21
|
+
declare const withAcousticConnect: ConfigPlugin<ConnectPluginProps | void>;
|
|
22
|
+
export default withAcousticConnect;
|
|
23
|
+
export { withConnectNSE, withConnectNCE };
|
|
24
|
+
export type { ConnectPluginProps };
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,mBAAmB,EAAE,YAAY,CAAC,kBAAkB,GAAG,IAAI,CAgBhE,CAAA;AAED,eAAe,mBAAmB,CAAA;AAClC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA;AACzC,YAAY,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.withConnectNCE = exports.withConnectNSE = void 0;
|
|
11
|
+
const withConnectNSE_1 = require("./withConnectNSE");
|
|
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
|
+
/**
|
|
16
|
+
* Expo Config Plugin for react-native-acoustic-connect-beta.
|
|
17
|
+
*
|
|
18
|
+
* Provisions the ConnectNSE Notification Service Extension and the ConnectNCE
|
|
19
|
+
* Notification Content Extension targets during `expo prebuild`. Designed as a
|
|
20
|
+
* chainable composition: additional mods are appended by adding to the mods
|
|
21
|
+
* array. Order matters — withConnectNSE runs first so it seeds the host
|
|
22
|
+
* entitlements and the PBXTargetDependency/PBXContainerItemProxy sections that
|
|
23
|
+
* withConnectNCE reuses.
|
|
24
|
+
*
|
|
25
|
+
* Consumer app.json usage:
|
|
26
|
+
* // With explicit App Group override:
|
|
27
|
+
* ["react-native-acoustic-connect-beta", { "iosAppGroupIdentifier": "group.com.example.app" }]
|
|
28
|
+
*
|
|
29
|
+
* // Without props (reads from ConnectConfig.json):
|
|
30
|
+
* "react-native-acoustic-connect-beta"
|
|
31
|
+
*/
|
|
32
|
+
const withAcousticConnect = (config, props) => {
|
|
33
|
+
const resolvedProps = props != null && typeof props === 'object' ? props : {};
|
|
34
|
+
// Chainable composition array. withConnectNSE must precede withConnectNCE:
|
|
35
|
+
// the NSE mod seeds the host App Group entitlement and the
|
|
36
|
+
// PBXTargetDependency/PBXContainerItemProxy sections the NCE mod relies on.
|
|
37
|
+
const mods = [
|
|
38
|
+
withConnectNSE_1.withConnectNSE,
|
|
39
|
+
withConnectNCE_1.withConnectNCE,
|
|
40
|
+
];
|
|
41
|
+
return mods.reduce((accConfig, mod) => mod(accConfig, resolvedProps), config);
|
|
42
|
+
};
|
|
43
|
+
exports.default = withAcousticConnect;
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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;AAuCjE,+FAvCA,+BAAc,OAuCA;AAtCvB,qDAAiD;AAsCxB,+FAtChB,+BAAc,OAsCgB;AApCvC;;;;;;;;;;;;;;;;GAgBG;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;KACf,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,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,CAqNZ;AAID;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAuB7D;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,cAAc,EAAE,YAAY,CAAC,kBAAkB,CAgC3D,CAAA"}
|