onesignal-expo-plugin 2.7.2 → 2.8.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/README.md +28 -16
- package/dist/index.d.ts +1 -3
- package/dist/index.js +52 -23
- package/dist/plugin.d.ts +2 -6
- package/dist/plugin.js +2 -4
- package/dist/{types-CCAtwmH-.d.ts → types-DJnWMAKM.d.ts} +7 -2
- package/package.json +17 -13
package/README.md
CHANGED
|
@@ -77,21 +77,22 @@ export default {
|
|
|
77
77
|
|
|
78
78
|
You can pass props to the plugin config object to configure:
|
|
79
79
|
|
|
80
|
-
| Plugin Prop
|
|
81
|
-
|
|
|
82
|
-
| `mode`
|
|
83
|
-
| `devTeam`
|
|
84
|
-
| `iPhoneDeploymentTarget`
|
|
85
|
-
| `smallIcons`
|
|
86
|
-
| `largeIcons`
|
|
87
|
-
| `smallIconAccentColor`
|
|
88
|
-
| `iosNSEFilePath`
|
|
89
|
-
| `appGroupName`
|
|
90
|
-
| `nseBundleIdentifier`
|
|
91
|
-
| `disableNSE`
|
|
92
|
-
| `disableLocation`
|
|
93
|
-
| `
|
|
94
|
-
| `
|
|
80
|
+
| Plugin Prop | | |
|
|
81
|
+
| ------------------------------ | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
82
|
+
| `mode` | **required** | Used to configure [APNs environment](https://developer.apple.com/documentation/bundleresources/entitlements/aps-environment) entitlement. `"development"` or `"production"` |
|
|
83
|
+
| `devTeam` | **deprecated** | Use [`ios.appleTeamId`](https://docs.expo.dev/versions/latest/config/app/#appleteamid) in your Expo config instead. Falls back to this value if `appleTeamId` is not set. e.g: `"91SW8A37CR"` |
|
|
84
|
+
| `iPhoneDeploymentTarget` | optional | Target `IPHONEOS_DEPLOYMENT_TARGET` value to be used when adding the iOS [NSE](https://documentation.onesignal.com/docs/service-extensions). A deployment target is nothing more than the minimum version of the operating system the application can run on. This value should match the value in your Podfile e.g: `"15.0"`. |
|
|
85
|
+
| `smallIcons` | optional | An array of local paths to small notification icons for Android. Image should be white, transparent, and 96x96 in size. Input images will be automatically scaled down and placed in the appropriate resource folders. e.g: `["./assets/ic_stat_onesignal_default.png"]`. See https://documentation.onesignal.com/docs/customize-notification-icons#small-notification-icons. |
|
|
86
|
+
| `largeIcons` | optional | An array of local paths to large notification icons for Android. Image should be white, transparent, and 256x256 in size. e.g: `["./assets/ic_onesignal_large_icon_default.png"]`. See https://documentation.onesignal.com/docs/customize-notification-icons#large-notification-icons. |
|
|
87
|
+
| `smallIconAccentColor` | optional | The accent color to use for notification icons on Android. Must be a valid hex value, e.g: `"#FF0000"` |
|
|
88
|
+
| `iosNSEFilePath` | optional | The local path to a custom Notification Service Extension (NSE), written in Swift. The NSE will typically start as a copy of the [default NSE](https://github.com/OneSignal/onesignal-expo-plugin/blob/main/serviceExtensionFiles/NotificationService.swift), then altered to support any custom logic required. e.g: `"./assets/NotificationService.swift"`. |
|
|
89
|
+
| `appGroupName` | optional | Used to configure a custom iOS [App Group](https://documentation.onesignal.com/docs/ios-sdk-setup#step-3-create-an-app-group) name. If not provided, defaults to `"group.{ios.bundleIdentifier}.onesignal"`. e.g: `"group.com.example.myapp.onesignal2"`. |
|
|
90
|
+
| `nseBundleIdentifier` | optional | Used to configure a custom bundle identifier suffix for the iOS Notification Service Extension. The full bundle identifier will be `"{ios.bundleIdentifier}.{nseBundleIdentifier}"`. If not provided, defaults to `"OneSignalNotificationServiceExtension"`. |
|
|
91
|
+
| `disableNSE` | optional | If `true`, the iOS Notification Service Extension (NSE) will not be added to the project. The NSE is required for badges, confirmed delivery, media attachments, and action buttons. Only disable this if you only need basic push notifications. |
|
|
92
|
+
| `disableLocation` | optional | If `true`, the native OneSignal location module will be excluded from iOS and Android builds. Use this if your app does not call `OneSignal.Location` and should not link native location APIs. |
|
|
93
|
+
| `enableFirebaseInstallationId` | optional | Android only. If `true`, adds `firebase_messaging_installation_id_enabled=true` meta-data to the Android manifest so push registration uses the Firebase Installation ID (FID) path. If unset, the manifest is untouched (legacy FCM token path). If `false`, removes the entry from the app manifest if present. See [Firebase Installation ID (Android)](#firebase-installation-id-android). |
|
|
94
|
+
| `sounds` | optional | An array of local paths to custom notification sound files (`.wav` only, ≤30 seconds). Files are copied into the app bundle on iOS and `res/raw/` on Android. e.g: `["./assets/notification_sound.wav"]`. See https://documentation.onesignal.com/docs/customize-notification-sounds. |
|
|
95
|
+
| `liveActivities` | optional | Opt in to scaffolding an iOS Widget Extension target for OneSignal Live Activities. Use `{}` for the default `OneSignalWidget` target, or pass `targetName`, `bundleIdentifierSuffix`, `widgetFilePath`, or `deploymentTarget` to customize it. See [Live Activities](#live-activities). |
|
|
95
96
|
|
|
96
97
|
### Disabling Location
|
|
97
98
|
|
|
@@ -101,6 +102,17 @@ writes the Podfile environment setting used during CocoaPods resolution. On
|
|
|
101
102
|
Android, it writes `onesignal.disableLocation=true` to the generated Gradle
|
|
102
103
|
properties.
|
|
103
104
|
|
|
105
|
+
### Firebase Installation ID (Android)
|
|
106
|
+
|
|
107
|
+
`enableFirebaseInstallationId: true` opts in to the Firebase Installation ID (FID) push registration path. The plugin only writes the manifest flag; the rest of the setup is owned by your app:
|
|
108
|
+
|
|
109
|
+
- Use `react-native-onesignal` 5.5.16 or newer (OneSignal Android SDK 5.11.0+). Prebuild fails on older versions.
|
|
110
|
+
- Set `android.googleServicesFile` in your Expo config to a `google-services.json` from your own Firebase project. Its client entry must match `android.package` (and every variant you build). Expo prebuild then applies the Google Services Gradle plugin.
|
|
111
|
+
- Resolve `com.google.firebase:firebase-messaging` 25.1.2 or newer. The OneSignal Android SDK declares a lower range, so force the version in your app, e.g. with a config plugin that adds a Gradle `resolutionStrategy`. Firebase Messaging 25.x requires `minSdkVersion` 23.
|
|
112
|
+
- Build with a development build or `expo run:android`. Expo Go is not supported.
|
|
113
|
+
|
|
114
|
+
Leaving the prop unset keeps the legacy FCM token path and requires none of the above. Setting it to `false` removes the flag from the app manifest, for example after an earlier `expo prebuild` without `--clean`; it never writes `false`. The flag is app-wide, so another dependency can also enable it through manifest merging; in that case the same setup applies even without this prop.
|
|
115
|
+
|
|
104
116
|
### Live Activities
|
|
105
117
|
|
|
106
118
|
Set `liveActivities` to an object to add the native iOS Widget Extension files and Podfile target required for OneSignal Live Activities.
|
|
@@ -167,8 +179,8 @@ Add your OneSignal App ID to your [Expo constants via the `extra` param](https:/
|
|
|
167
179
|
You can then access the value to pass to the `initialize` function:
|
|
168
180
|
|
|
169
181
|
```js
|
|
170
|
-
import { OneSignal } from 'react-native-onesignal';
|
|
171
182
|
import Constants from 'expo-constants';
|
|
183
|
+
import { OneSignal } from 'react-native-onesignal';
|
|
172
184
|
OneSignal.initialize(Constants.expoConfig.extra.oneSignalAppId);
|
|
173
185
|
```
|
|
174
186
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { t as OneSignalPluginProps } from "./types-
|
|
1
|
+
import { t as OneSignalPluginProps } from "./types-DJnWMAKM.js";
|
|
2
2
|
import { ConfigPlugin } from "expo/config-plugins";
|
|
3
|
-
//#region src/onesignal/withOneSignal.d.ts
|
|
4
3
|
declare const withOneSignal: ConfigPlugin<OneSignalPluginProps>;
|
|
5
|
-
//#endregion
|
|
6
4
|
export { type OneSignalPluginProps, withOneSignal as default };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -19,11 +19,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
19
19
|
value: mod,
|
|
20
20
|
enumerable: true
|
|
21
21
|
}) : target, mod));
|
|
22
|
-
//#endregion
|
|
23
22
|
let path = require("path");
|
|
24
23
|
path = __toESM(path);
|
|
25
24
|
let fs = require("fs");
|
|
26
25
|
fs = __toESM(fs);
|
|
26
|
+
let module$1 = require("module");
|
|
27
27
|
let _expo_image_utils = require("@expo/image-utils");
|
|
28
28
|
let expo_config_plugins = require("expo/config-plugins");
|
|
29
29
|
let fs_promises = require("fs/promises");
|
|
@@ -55,8 +55,7 @@ target '${targetName}' do
|
|
|
55
55
|
use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
|
|
56
56
|
end`;
|
|
57
57
|
const liveActivityPodfileRegex = (targetName) => new RegExp(`target '${targetName}'`);
|
|
58
|
-
|
|
59
|
-
//#region src/support/OneSignalLog.ts
|
|
58
|
+
// src/support/OneSignalLog.ts
|
|
60
59
|
var OneSignalLog = class {
|
|
61
60
|
static log(str) {
|
|
62
61
|
console.log(`\tonesignal-expo-plugin: ${str}`);
|
|
@@ -65,8 +64,7 @@ var OneSignalLog = class {
|
|
|
65
64
|
console.error(`\tonesignal-expo-plugin: ${str}`);
|
|
66
65
|
}
|
|
67
66
|
};
|
|
68
|
-
|
|
69
|
-
//#region src/support/helpers.ts
|
|
67
|
+
// src/support/helpers.ts
|
|
70
68
|
const HEX_COLOR_6_REGEX = /^#?[0-9A-Fa-f]{6}$/;
|
|
71
69
|
const HEX_COLOR_8_REGEX = /^#?[0-9A-Fa-f]{8}$/;
|
|
72
70
|
const ONESIGNAL_PLUGIN_PROPS = [
|
|
@@ -81,6 +79,7 @@ const ONESIGNAL_PLUGIN_PROPS = [
|
|
|
81
79
|
"nseBundleIdentifier",
|
|
82
80
|
"disableNSE",
|
|
83
81
|
"disableLocation",
|
|
82
|
+
"enableFirebaseInstallationId",
|
|
84
83
|
"sounds",
|
|
85
84
|
"liveActivities"
|
|
86
85
|
];
|
|
@@ -116,6 +115,7 @@ function validatePluginProps(props) {
|
|
|
116
115
|
if (props.nseBundleIdentifier && typeof props.nseBundleIdentifier !== "string") throw new Error("OneSignal Expo Plugin: 'nseBundleIdentifier' must be a string.");
|
|
117
116
|
if (props.disableNSE !== void 0 && typeof props.disableNSE !== "boolean") throw new Error("OneSignal Expo Plugin: 'disableNSE' must be a boolean.");
|
|
118
117
|
if (props.disableLocation !== void 0 && typeof props.disableLocation !== "boolean") throw new Error("OneSignal Expo Plugin: 'disableLocation' must be a boolean.");
|
|
118
|
+
if (props.enableFirebaseInstallationId !== void 0 && typeof props.enableFirebaseInstallationId !== "boolean") throw new Error("OneSignal Expo Plugin: 'enableFirebaseInstallationId' must be a boolean.");
|
|
119
119
|
if (props.sounds !== void 0) {
|
|
120
120
|
if (!Array.isArray(props.sounds)) throw new Error("OneSignal Expo Plugin: 'sounds' must be an array.");
|
|
121
121
|
for (const sound of props.sounds) {
|
|
@@ -170,14 +170,15 @@ function resolveDevTeam(config, props) {
|
|
|
170
170
|
return props.devTeam;
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
|
|
174
|
-
//#region src/onesignal/withOneSignalAndroid.ts
|
|
173
|
+
// src/onesignal/withOneSignalAndroid.ts
|
|
175
174
|
/**
|
|
176
175
|
* Expo config plugin for OneSignal (Android)
|
|
177
176
|
* @see https://documentation.onesignal.com/docs/react-native-sdk-setup#step-4-install-for-ios-using-cocoapods-for-ios-apps
|
|
178
177
|
*/
|
|
179
178
|
const RESOURCE_ROOT_PATH = "android/app/src/main/res/";
|
|
180
179
|
const ONESIGNAL_DISABLE_LOCATION_GRADLE_PROPERTY = "onesignal.disableLocation";
|
|
180
|
+
const FIREBASE_INSTALLATION_ID_META_DATA = "firebase_messaging_installation_id_enabled";
|
|
181
|
+
const MIN_FID_REACT_NATIVE_ONESIGNAL_VERSION = "5.5.16";
|
|
181
182
|
const SMALL_ICON_DIRS_TO_SIZE = {
|
|
182
183
|
"drawable-mdpi": 24,
|
|
183
184
|
"drawable-hdpi": 36,
|
|
@@ -236,6 +237,41 @@ const withLocationModuleGradleProperty = (config, onesignalProps) => {
|
|
|
236
237
|
return config;
|
|
237
238
|
});
|
|
238
239
|
};
|
|
240
|
+
const withFirebaseInstallationIdManifest = (config, onesignalProps) => {
|
|
241
|
+
const enabled = onesignalProps.enableFirebaseInstallationId;
|
|
242
|
+
if (enabled == null) return config;
|
|
243
|
+
if (enabled && !config.android?.googleServicesFile) expo_config_plugins.WarningAggregator.addWarningAndroid("onesignal-expo-plugin", "'enableFirebaseInstallationId' is true but 'android.googleServicesFile' is not set. Firebase Installation ID push registration needs your own Firebase project's google-services.json.");
|
|
244
|
+
return (0, expo_config_plugins.withAndroidManifest)(config, (config) => {
|
|
245
|
+
if (enabled) assertFidCapableReactNativeOneSignal(config.modRequest?.projectRoot);
|
|
246
|
+
const mainApplication = expo_config_plugins.AndroidConfig.Manifest.getMainApplicationOrThrow(config.modResults);
|
|
247
|
+
if (enabled) expo_config_plugins.AndroidConfig.Manifest.addMetaDataItemToMainApplication(mainApplication, FIREBASE_INSTALLATION_ID_META_DATA, "true");
|
|
248
|
+
else expo_config_plugins.AndroidConfig.Manifest.removeMetaDataItemFromMainApplication(mainApplication, FIREBASE_INSTALLATION_ID_META_DATA);
|
|
249
|
+
return config;
|
|
250
|
+
});
|
|
251
|
+
};
|
|
252
|
+
function assertFidCapableReactNativeOneSignal(projectRoot) {
|
|
253
|
+
if (!projectRoot) return;
|
|
254
|
+
const version = getInstalledReactNativeOneSignalVersion(projectRoot);
|
|
255
|
+
if (version && compareVersions(version, "5.5.16") < 0) throw new Error(`onesignal-expo-plugin: 'enableFirebaseInstallationId' requires react-native-onesignal ${MIN_FID_REACT_NATIVE_ONESIGNAL_VERSION} or newer, but ${version} is installed. Upgrade react-native-onesignal or remove 'enableFirebaseInstallationId'.`);
|
|
256
|
+
}
|
|
257
|
+
function getInstalledReactNativeOneSignalVersion(projectRoot) {
|
|
258
|
+
try {
|
|
259
|
+
const packageJsonPath = (0, module$1.createRequire)((0, path.resolve)(projectRoot, "package.json")).resolve("react-native-onesignal/package.json");
|
|
260
|
+
return JSON.parse((0, fs.readFileSync)(packageJsonPath, "utf8")).version;
|
|
261
|
+
} catch {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
function compareVersions(a, b) {
|
|
266
|
+
const toParts = (version) => version.split("-")[0].split(".").map((part) => parseInt(part, 10) || 0);
|
|
267
|
+
const left = toParts(a);
|
|
268
|
+
const right = toParts(b);
|
|
269
|
+
for (let i = 0; i < Math.max(left.length, right.length); i++) {
|
|
270
|
+
const diff = (left[i] ?? 0) - (right[i] ?? 0);
|
|
271
|
+
if (diff !== 0) return diff;
|
|
272
|
+
}
|
|
273
|
+
return 0;
|
|
274
|
+
}
|
|
239
275
|
async function saveIconsArrayAsync(projectRoot, icons, dirsToSize, defaultName) {
|
|
240
276
|
for (let i = 0; i < icons.length; i++) {
|
|
241
277
|
const outputName = i === 0 ? defaultName : void 0;
|
|
@@ -281,11 +317,11 @@ const withOneSignalAndroid = (config, props) => {
|
|
|
281
317
|
config = withLargeIcons(config, props);
|
|
282
318
|
config = withSmallIconAccentColor(config, props);
|
|
283
319
|
config = withLocationModuleGradleProperty(config, props);
|
|
320
|
+
config = withFirebaseInstallationIdManifest(config, props);
|
|
284
321
|
config = withSoundFiles$1(config, props);
|
|
285
322
|
return config;
|
|
286
323
|
};
|
|
287
|
-
|
|
288
|
-
//#region src/support/eas/getEasManagedCredentialsConfigExtra.ts
|
|
324
|
+
// src/support/eas/getEasManagedCredentialsConfigExtra.ts
|
|
289
325
|
function getEasManagedCredentialsConfigExtra(config, appGroupName, nseBundleIdentifier, liveActivities, disableNSE) {
|
|
290
326
|
const bundleIdentifier = config?.ios?.bundleIdentifier ?? "";
|
|
291
327
|
const appExtensions = [...config.extra?.eas?.build?.experimental?.ios?.appExtensions ?? []];
|
|
@@ -323,8 +359,7 @@ function getEasManagedCredentialsConfigExtra(config, appGroupName, nseBundleIden
|
|
|
323
359
|
}
|
|
324
360
|
};
|
|
325
361
|
}
|
|
326
|
-
|
|
327
|
-
//#region src/support/FileManager.ts
|
|
362
|
+
// src/support/FileManager.ts
|
|
328
363
|
/**
|
|
329
364
|
* FileManager contains static *awaitable* file-system functions
|
|
330
365
|
*/
|
|
@@ -361,8 +396,7 @@ var FileManager = class FileManager {
|
|
|
361
396
|
return fs.existsSync(path);
|
|
362
397
|
}
|
|
363
398
|
};
|
|
364
|
-
|
|
365
|
-
//#region src/support/NseUpdaterManager.ts
|
|
399
|
+
// src/support/NseUpdaterManager.ts
|
|
366
400
|
const entitlementsFileName = `${NSE_TARGET_NAME}.entitlements`;
|
|
367
401
|
const plistFileName = `${NSE_TARGET_NAME}-Info.plist`;
|
|
368
402
|
var NseUpdaterManager = class {
|
|
@@ -402,8 +436,7 @@ var NseUpdaterManager = class {
|
|
|
402
436
|
await FileManager.writeFile(plistFilePath, plistFile);
|
|
403
437
|
}
|
|
404
438
|
};
|
|
405
|
-
|
|
406
|
-
//#region src/support/updatePodfile.ts
|
|
439
|
+
// src/support/updatePodfile.ts
|
|
407
440
|
const ONESIGNAL_DISABLE_LOCATION_ENV = "ENV['ONESIGNAL_DISABLE_LOCATION']";
|
|
408
441
|
const ONESIGNAL_DISABLE_LOCATION_REGEX = /^(?:ENV\[['"]ONESIGNAL_DISABLE_LOCATION['"]\]\s*=\s*['"](true|false)['"]|\$OneSignalDisableLocation\s*=\s*(true|false))\s*$/m;
|
|
409
442
|
async function updatePodfile(iosPath, disableLocation = false) {
|
|
@@ -424,8 +457,7 @@ async function updatePodfileLocationModule(iosPath, disableLocation) {
|
|
|
424
457
|
}
|
|
425
458
|
await fs_promises.default.writeFile(podfilePath, `${nextValue}\n${podfile}`);
|
|
426
459
|
}
|
|
427
|
-
|
|
428
|
-
//#region src/onesignal/withOneSignalLiveActivity.ts
|
|
460
|
+
// src/onesignal/withOneSignalLiveActivity.ts
|
|
429
461
|
/**
|
|
430
462
|
* Expo config plugin that scaffolds an iOS Widget Extension target for OneSignal Live Activities.
|
|
431
463
|
* @see https://documentation.onesignal.com/docs/cross-platform-live-activity-setup
|
|
@@ -550,8 +582,7 @@ const withOneSignalLiveActivity = (config, props) => {
|
|
|
550
582
|
config = withLiveActivityXcodeProject(config, props);
|
|
551
583
|
return config;
|
|
552
584
|
};
|
|
553
|
-
|
|
554
|
-
//#region src/onesignal/withOneSignalIos.ts
|
|
585
|
+
// src/onesignal/withOneSignalIos.ts
|
|
555
586
|
/**
|
|
556
587
|
* Expo config plugin for One Signal (iOS)
|
|
557
588
|
* @see https://documentation.onesignal.com/docs/react-native-sdk-setup#step-4-install-for-ios-using-cocoapods-for-ios-apps
|
|
@@ -738,8 +769,7 @@ const withOneSignalIos = (config, props) => {
|
|
|
738
769
|
if (!props.disableNSE || props.liveActivities) config = withEasManagedCredentials(config, props);
|
|
739
770
|
return config;
|
|
740
771
|
};
|
|
741
|
-
|
|
742
|
-
//#region src/onesignal/withOneSignal.ts
|
|
772
|
+
// src/onesignal/withOneSignal.ts
|
|
743
773
|
const withOneSignal = (config, props) => {
|
|
744
774
|
if (!props) throw new Error("You are trying to use the OneSignal plugin without any props. Property \"mode\" is required. Please see https://github.com/OneSignal/onesignal-expo-plugin for more info.");
|
|
745
775
|
validatePluginProps(props);
|
|
@@ -747,5 +777,4 @@ const withOneSignal = (config, props) => {
|
|
|
747
777
|
config = withOneSignalAndroid(config, props);
|
|
748
778
|
return config;
|
|
749
779
|
};
|
|
750
|
-
//#endregion
|
|
751
780
|
module.exports = withOneSignal;
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { t as OneSignalPluginProps } from "./types-
|
|
2
|
-
|
|
3
|
-
declare let name: string;
|
|
4
|
-
//#endregion
|
|
5
|
-
//#region src/onesignal/plugin.d.ts
|
|
6
|
-
declare const withOneSignal: (props: OneSignalPluginProps) => [typeof name, OneSignalPluginProps];
|
|
1
|
+
import { t as OneSignalPluginProps } from "./types-DJnWMAKM.js";
|
|
2
|
+
declare const withOneSignal: (props: OneSignalPluginProps) => [string, OneSignalPluginProps];
|
|
7
3
|
export = withOneSignal;
|
package/dist/plugin.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/types.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Configuration for the iOS Widget Extension target that hosts Live Activities.
|
|
4
3
|
*/
|
|
@@ -84,6 +83,13 @@ type OneSignalPluginProps = {
|
|
|
84
83
|
* OneSignal.Location APIs will not collect location and will no-op or return false.
|
|
85
84
|
*/
|
|
86
85
|
disableLocation?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* (optional, Android only) If true, sets `firebase_messaging_installation_id_enabled=true` in the Android manifest so
|
|
88
|
+
* push registration uses the Firebase Installation ID (FID) path instead of the legacy FCM token API.
|
|
89
|
+
* Requires the app's own Firebase project (`android.googleServicesFile`), `firebase-messaging` 25.1.2+
|
|
90
|
+
* and `react-native-onesignal` 5.5.16+ (OneSignal Android SDK 5.11.0+). If unset, the manifest is untouched; if false, the app's own entry is removed.
|
|
91
|
+
*/
|
|
92
|
+
enableFirebaseInstallationId?: boolean;
|
|
87
93
|
/**
|
|
88
94
|
* (optional) An array of local paths to custom notification sound files (.wav only).
|
|
89
95
|
* Files are added to the iOS app bundle and Android res/raw/.
|
|
@@ -97,5 +103,4 @@ type OneSignalPluginProps = {
|
|
|
97
103
|
*/
|
|
98
104
|
liveActivities?: OneSignalLiveActivityProps;
|
|
99
105
|
};
|
|
100
|
-
//#endregion
|
|
101
106
|
export { OneSignalPluginProps as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "onesignal-expo-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"description": "OneSignal Expo config plugin for adding iOS and Android push notification support to managed Expo apps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"EAS",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "vp pack",
|
|
41
41
|
"format:spotless": "./examples/demo/android/gradlew spotlessApply",
|
|
42
|
-
"format": "vp fmt &&
|
|
42
|
+
"format": "vp fmt && vp run format:spotless",
|
|
43
43
|
"format:check:spotless": "./examples/demo/android/gradlew spotlessCheck",
|
|
44
|
-
"format:check": "vp fmt --check &&
|
|
45
|
-
"lint": "vp check src &&
|
|
46
|
-
"lint:fix": "vp check --fix src &&
|
|
44
|
+
"format:check": "vp fmt --check && vp run format:check:spotless",
|
|
45
|
+
"lint": "vp check src && vp run format:check",
|
|
46
|
+
"lint:fix": "vp check --fix src && vp run format",
|
|
47
47
|
"test": "vp test"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
@@ -51,19 +51,23 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^22.19.3",
|
|
54
|
-
"@vitest/coverage-v8": "5.0.
|
|
55
|
-
"typescript": "^
|
|
56
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@1.
|
|
57
|
-
"vite-plus": "1.
|
|
58
|
-
"vitest": "5.0.1"
|
|
54
|
+
"@vitest/coverage-v8": "5.0.5",
|
|
55
|
+
"typescript": "^7.0.2",
|
|
56
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@1.4.0",
|
|
57
|
+
"vite-plus": "1.4.0"
|
|
59
58
|
},
|
|
60
59
|
"peerDependencies": {
|
|
61
60
|
"expo": ">=53.0.0",
|
|
62
61
|
"react-native-onesignal": ">=5.0.0"
|
|
63
62
|
},
|
|
64
63
|
"overrides": {
|
|
65
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@1.
|
|
66
|
-
"vitest": "5.0.1"
|
|
64
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@1.4.0"
|
|
67
65
|
},
|
|
68
|
-
"
|
|
66
|
+
"devEngines": {
|
|
67
|
+
"packageManager": {
|
|
68
|
+
"name": "bun",
|
|
69
|
+
"version": "1.4.4",
|
|
70
|
+
"onFail": "warn"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
69
73
|
}
|