customerio-expo-plugin 2.9.1 → 2.10.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "customerio-expo-plugin",
3
- "version": "2.9.1",
3
+ "version": "2.10.0",
4
4
  "description": "Expo config plugin for the Customer IO React Native SDK",
5
5
  "main": "plugin/lib/commonjs/index",
6
6
  "module": "plugin/lib/module/index",
@@ -55,7 +55,7 @@
55
55
  "registry": "https://registry.npmjs.org/"
56
56
  },
57
57
  "peerDependencies": {
58
- "customerio-reactnative": "5.0.0"
58
+ "customerio-reactnative": "5.1.0"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@eslint/js": "^9.33.0",
@@ -9,6 +9,7 @@ var _withAppGoogleServices = require("./withAppGoogleServices");
9
9
  var _withGoogleServicesJSON = require("./withGoogleServicesJSON");
10
10
  var _withMainApplicationModifications = require("./withMainApplicationModifications");
11
11
  var _withNotificationChannelMetadata = require("./withNotificationChannelMetadata");
12
+ var _withProjectBuildGradle = require("./withProjectBuildGradle");
12
13
  var _withProjectGoogleServices = require("./withProjectGoogleServices");
13
14
  var _withProjectStrings = require("./withProjectStrings");
14
15
  function withCIOAndroid(config, sdkConfig, props) {
@@ -33,6 +34,10 @@ function withCIOAndroid(config, sdkConfig, props) {
33
34
 
34
35
  // Update project strings for user agent metadata
35
36
  config = (0, _withProjectStrings.withProjectStrings)(config);
37
+
38
+ // Add dependency resolution strategy for Expo SDK 53 compatibility
39
+ // This prevents androidx versions that require API 36 from being pulled in
40
+ config = (0, _withProjectBuildGradle.withProjectBuildGradle)(config, props);
36
41
  return config;
37
42
  }
38
43
  //# sourceMappingURL=withCIOAndroid.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_withAndroidManifestUpdates","require","_withAppGoogleServices","_withGoogleServicesJSON","_withMainApplicationModifications","_withNotificationChannelMetadata","_withProjectGoogleServices","_withProjectStrings","withCIOAndroid","config","sdkConfig","props","_props$pushNotificati","withProjectGoogleServices","withAppGoogleServices","withGoogleServicesJSON","setHighPriorityPushHandler","undefined","withAndroidManifestUpdates","pushNotification","channel","withNotificationChannelMetadata","withMainApplicationModifications","withProjectStrings"],"sources":["withCIOAndroid.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\n\nimport type { CustomerIOPluginOptionsAndroid, NativeSDKConfig } from '../types/cio-types';\nimport { withAndroidManifestUpdates } from './withAndroidManifestUpdates';\nimport { withAppGoogleServices } from './withAppGoogleServices';\nimport { withGoogleServicesJSON } from './withGoogleServicesJSON';\nimport { withMainApplicationModifications } from './withMainApplicationModifications';\nimport { withNotificationChannelMetadata } from './withNotificationChannelMetadata';\nimport { withProjectGoogleServices } from './withProjectGoogleServices';\nimport { withProjectStrings } from './withProjectStrings';\n\nexport function withCIOAndroid(\n config: ExpoConfig,\n sdkConfig?: NativeSDKConfig,\n props?: CustomerIOPluginOptionsAndroid,\n): ExpoConfig {\n // Only run notification setup if props are provided\n if (props) {\n config = withProjectGoogleServices(config, props);\n config = withAppGoogleServices(config, props);\n config = withGoogleServicesJSON(config, props);\n if (props.setHighPriorityPushHandler !== undefined) {\n config = withAndroidManifestUpdates(config, props);\n }\n if (props.pushNotification?.channel) {\n config = withNotificationChannelMetadata(config, props);\n }\n }\n\n // Add auto initialization if sdkConfig is provided\n if (sdkConfig) {\n config = withMainApplicationModifications(config, sdkConfig);\n }\n\n // Update project strings for user agent metadata\n config = withProjectStrings(config);\n\n return config;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,2BAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,iCAAA,GAAAH,OAAA;AACA,IAAAI,gCAAA,GAAAJ,OAAA;AACA,IAAAK,0BAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AAEO,SAASO,cAAcA,CAC5BC,MAAkB,EAClBC,SAA2B,EAC3BC,KAAsC,EAC1B;EACZ;EACA,IAAIA,KAAK,EAAE;IAAA,IAAAC,qBAAA;IACTH,MAAM,GAAG,IAAAI,oDAAyB,EAACJ,MAAM,EAAEE,KAAK,CAAC;IACjDF,MAAM,GAAG,IAAAK,4CAAqB,EAACL,MAAM,EAAEE,KAAK,CAAC;IAC7CF,MAAM,GAAG,IAAAM,8CAAsB,EAACN,MAAM,EAAEE,KAAK,CAAC;IAC9C,IAAIA,KAAK,CAACK,0BAA0B,KAAKC,SAAS,EAAE;MAClDR,MAAM,GAAG,IAAAS,sDAA0B,EAACT,MAAM,EAAEE,KAAK,CAAC;IACpD;IACA,KAAAC,qBAAA,GAAID,KAAK,CAACQ,gBAAgB,cAAAP,qBAAA,eAAtBA,qBAAA,CAAwBQ,OAAO,EAAE;MACnCX,MAAM,GAAG,IAAAY,gEAA+B,EAACZ,MAAM,EAAEE,KAAK,CAAC;IACzD;EACF;;EAEA;EACA,IAAID,SAAS,EAAE;IACbD,MAAM,GAAG,IAAAa,kEAAgC,EAACb,MAAM,EAAEC,SAAS,CAAC;EAC9D;;EAEA;EACAD,MAAM,GAAG,IAAAc,sCAAkB,EAACd,MAAM,CAAC;EAEnC,OAAOA,MAAM;AACf","ignoreList":[]}
1
+ {"version":3,"names":["_withAndroidManifestUpdates","require","_withAppGoogleServices","_withGoogleServicesJSON","_withMainApplicationModifications","_withNotificationChannelMetadata","_withProjectBuildGradle","_withProjectGoogleServices","_withProjectStrings","withCIOAndroid","config","sdkConfig","props","_props$pushNotificati","withProjectGoogleServices","withAppGoogleServices","withGoogleServicesJSON","setHighPriorityPushHandler","undefined","withAndroidManifestUpdates","pushNotification","channel","withNotificationChannelMetadata","withMainApplicationModifications","withProjectStrings","withProjectBuildGradle"],"sources":["withCIOAndroid.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\n\nimport type { CustomerIOPluginOptionsAndroid, NativeSDKConfig } from '../types/cio-types';\nimport { withAndroidManifestUpdates } from './withAndroidManifestUpdates';\nimport { withAppGoogleServices } from './withAppGoogleServices';\nimport { withGoogleServicesJSON } from './withGoogleServicesJSON';\nimport { withMainApplicationModifications } from './withMainApplicationModifications';\nimport { withNotificationChannelMetadata } from './withNotificationChannelMetadata';\nimport { withProjectBuildGradle } from './withProjectBuildGradle';\nimport { withProjectGoogleServices } from './withProjectGoogleServices';\nimport { withProjectStrings } from './withProjectStrings';\n\nexport function withCIOAndroid(\n config: ExpoConfig,\n sdkConfig?: NativeSDKConfig,\n props?: CustomerIOPluginOptionsAndroid,\n): ExpoConfig {\n // Only run notification setup if props are provided\n if (props) {\n config = withProjectGoogleServices(config, props);\n config = withAppGoogleServices(config, props);\n config = withGoogleServicesJSON(config, props);\n if (props.setHighPriorityPushHandler !== undefined) {\n config = withAndroidManifestUpdates(config, props);\n }\n if (props.pushNotification?.channel) {\n config = withNotificationChannelMetadata(config, props);\n }\n }\n\n // Add auto initialization if sdkConfig is provided\n if (sdkConfig) {\n config = withMainApplicationModifications(config, sdkConfig);\n }\n\n // Update project strings for user agent metadata\n config = withProjectStrings(config);\n\n // Add dependency resolution strategy for Expo SDK 53 compatibility\n // This prevents androidx versions that require API 36 from being pulled in\n config = withProjectBuildGradle(config, props);\n\n return config;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,2BAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,iCAAA,GAAAH,OAAA;AACA,IAAAI,gCAAA,GAAAJ,OAAA;AACA,IAAAK,uBAAA,GAAAL,OAAA;AACA,IAAAM,0BAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AAEO,SAASQ,cAAcA,CAC5BC,MAAkB,EAClBC,SAA2B,EAC3BC,KAAsC,EAC1B;EACZ;EACA,IAAIA,KAAK,EAAE;IAAA,IAAAC,qBAAA;IACTH,MAAM,GAAG,IAAAI,oDAAyB,EAACJ,MAAM,EAAEE,KAAK,CAAC;IACjDF,MAAM,GAAG,IAAAK,4CAAqB,EAACL,MAAM,EAAEE,KAAK,CAAC;IAC7CF,MAAM,GAAG,IAAAM,8CAAsB,EAACN,MAAM,EAAEE,KAAK,CAAC;IAC9C,IAAIA,KAAK,CAACK,0BAA0B,KAAKC,SAAS,EAAE;MAClDR,MAAM,GAAG,IAAAS,sDAA0B,EAACT,MAAM,EAAEE,KAAK,CAAC;IACpD;IACA,KAAAC,qBAAA,GAAID,KAAK,CAACQ,gBAAgB,cAAAP,qBAAA,eAAtBA,qBAAA,CAAwBQ,OAAO,EAAE;MACnCX,MAAM,GAAG,IAAAY,gEAA+B,EAACZ,MAAM,EAAEE,KAAK,CAAC;IACzD;EACF;;EAEA;EACA,IAAID,SAAS,EAAE;IACbD,MAAM,GAAG,IAAAa,kEAAgC,EAACb,MAAM,EAAEC,SAAS,CAAC;EAC9D;;EAEA;EACAD,MAAM,GAAG,IAAAc,sCAAkB,EAACd,MAAM,CAAC;;EAEnC;EACA;EACAA,MAAM,GAAG,IAAAe,8CAAsB,EAACf,MAAM,EAAEE,KAAK,CAAC;EAE9C,OAAOF,MAAM;AACf","ignoreList":[]}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.withProjectBuildGradle = withProjectBuildGradle;
7
+ var _configPlugins = require("@expo/config-plugins");
8
+ var _utils = require("../ios/utils");
9
+ /**
10
+ * Determines if the androidx dependency fix should be applied based on config and Expo version.
11
+ * The fix disables Android 16 support by downgrading androidx dependencies.
12
+ * @param config The Expo config
13
+ * @param androidOptions The Android plugin options
14
+ * @returns true if the fix should be applied (Android 16 disabled)
15
+ */
16
+ function shouldDisableAndroid16Support(config, androidOptions) {
17
+ // If user explicitly sets the option, respect their choice
18
+ if ((androidOptions === null || androidOptions === void 0 ? void 0 : androidOptions.disableAndroid16Support) !== undefined) {
19
+ return androidOptions.disableAndroid16Support;
20
+ }
21
+
22
+ // Auto-detect: Disable Android 16 for Expo SDK 53 or lower, enable for 54+
23
+ return (0, _utils.isExpoVersion53OrLower)(config);
24
+ }
25
+
26
+ /**
27
+ * Adds dependency resolution strategy to force specific androidx versions.
28
+ * This disables Android 16 support for apps using Expo SDK 53 or older gradle versions.
29
+ *
30
+ * The fix prevents newer androidx versions that require Android API 36 and AGP 8.9.1+
31
+ * from being pulled in. Expo SDK 53 uses Android API 35 and AGP 8.8.2, so we force
32
+ * compatible versions.
33
+ *
34
+ * Expo SDK 54+ should support newer gradle versions and won't need this fix.
35
+ */
36
+ function withProjectBuildGradle(config, androidOptions) {
37
+ return (0, _configPlugins.withProjectBuildGradle)(config, config => {
38
+ const {
39
+ modResults
40
+ } = config;
41
+
42
+ // Check if Android 16 support should be disabled
43
+ if (!shouldDisableAndroid16Support(config, androidOptions)) {
44
+ return config;
45
+ }
46
+
47
+ // Skip if already applied
48
+ if (modResults.contents.includes('androidx.core:core-ktx:1.13.1')) {
49
+ return config;
50
+ }
51
+ const resolutionStrategy = `
52
+ configurations.all {
53
+ resolutionStrategy {
54
+ // Disable Android 16 support by forcing older androidx versions
55
+ // Compatible with API 35 and AGP 8.8.2 (prevents API 36/AGP 8.9.1+ requirement)
56
+ force 'androidx.core:core-ktx:1.13.1'
57
+ force 'androidx.lifecycle:lifecycle-process:2.8.7'
58
+ }
59
+ }`;
60
+
61
+ // Add resolution strategy inside allprojects block
62
+ modResults.contents = modResults.contents.replace(/allprojects\s*\{/, `allprojects {${resolutionStrategy}`);
63
+ return config;
64
+ });
65
+ }
66
+ //# sourceMappingURL=withProjectBuildGradle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_configPlugins","require","_utils","shouldDisableAndroid16Support","config","androidOptions","disableAndroid16Support","undefined","isExpoVersion53OrLower","withProjectBuildGradle","withExpoProjectBuildGradle","modResults","contents","includes","resolutionStrategy","replace"],"sources":["withProjectBuildGradle.ts"],"sourcesContent":["import { withProjectBuildGradle as withExpoProjectBuildGradle } from '@expo/config-plugins';\nimport type { ExpoConfig } from '@expo/config-types';\nimport { isExpoVersion53OrLower } from '../ios/utils';\nimport type { CustomerIOPluginOptionsAndroid } from '../types/cio-types';\n\n/**\n * Determines if the androidx dependency fix should be applied based on config and Expo version.\n * The fix disables Android 16 support by downgrading androidx dependencies.\n * @param config The Expo config\n * @param androidOptions The Android plugin options\n * @returns true if the fix should be applied (Android 16 disabled)\n */\nfunction shouldDisableAndroid16Support(\n config: ExpoConfig,\n androidOptions?: CustomerIOPluginOptionsAndroid\n): boolean {\n // If user explicitly sets the option, respect their choice\n if (androidOptions?.disableAndroid16Support !== undefined) {\n return androidOptions.disableAndroid16Support;\n }\n\n // Auto-detect: Disable Android 16 for Expo SDK 53 or lower, enable for 54+\n return isExpoVersion53OrLower(config);\n}\n\n/**\n * Adds dependency resolution strategy to force specific androidx versions.\n * This disables Android 16 support for apps using Expo SDK 53 or older gradle versions.\n *\n * The fix prevents newer androidx versions that require Android API 36 and AGP 8.9.1+\n * from being pulled in. Expo SDK 53 uses Android API 35 and AGP 8.8.2, so we force\n * compatible versions.\n *\n * Expo SDK 54+ should support newer gradle versions and won't need this fix.\n */\nexport function withProjectBuildGradle(\n config: ExpoConfig,\n androidOptions?: CustomerIOPluginOptionsAndroid\n): ExpoConfig {\n return withExpoProjectBuildGradle(config, (config) => {\n const { modResults } = config;\n\n // Check if Android 16 support should be disabled\n if (!shouldDisableAndroid16Support(config, androidOptions)) {\n return config;\n }\n\n // Skip if already applied\n if (modResults.contents.includes('androidx.core:core-ktx:1.13.1')) {\n return config;\n }\n\n const resolutionStrategy = `\n configurations.all {\n resolutionStrategy {\n // Disable Android 16 support by forcing older androidx versions\n // Compatible with API 35 and AGP 8.8.2 (prevents API 36/AGP 8.9.1+ requirement)\n force 'androidx.core:core-ktx:1.13.1'\n force 'androidx.lifecycle:lifecycle-process:2.8.7'\n }\n }`;\n\n // Add resolution strategy inside allprojects block\n modResults.contents = modResults.contents.replace(\n /allprojects\\s*\\{/,\n `allprojects {${resolutionStrategy}`\n );\n\n return config;\n });\n}\n"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASE,6BAA6BA,CACpCC,MAAkB,EAClBC,cAA+C,EACtC;EACT;EACA,IAAI,CAAAA,cAAc,aAAdA,cAAc,uBAAdA,cAAc,CAAEC,uBAAuB,MAAKC,SAAS,EAAE;IACzD,OAAOF,cAAc,CAACC,uBAAuB;EAC/C;;EAEA;EACA,OAAO,IAAAE,6BAAsB,EAACJ,MAAM,CAAC;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASK,sBAAsBA,CACpCL,MAAkB,EAClBC,cAA+C,EACnC;EACZ,OAAO,IAAAK,qCAA0B,EAACN,MAAM,EAAGA,MAAM,IAAK;IACpD,MAAM;MAAEO;IAAW,CAAC,GAAGP,MAAM;;IAE7B;IACA,IAAI,CAACD,6BAA6B,CAACC,MAAM,EAAEC,cAAc,CAAC,EAAE;MAC1D,OAAOD,MAAM;IACf;;IAEA;IACA,IAAIO,UAAU,CAACC,QAAQ,CAACC,QAAQ,CAAC,+BAA+B,CAAC,EAAE;MACjE,OAAOT,MAAM;IACf;IAEA,MAAMU,kBAAkB,GAAG;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;IAEF;IACAH,UAAU,CAACC,QAAQ,GAAGD,UAAU,CAACC,QAAQ,CAACG,OAAO,CAC/C,kBAAkB,EAClB,gBAAgBD,kBAAkB,EACpC,CAAC;IAED,OAAOV,MAAM;EACf,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.isFcmPushProvider = exports.isExpoVersion53OrHigher = void 0;
6
+ exports.isFcmPushProvider = exports.isExpoVersion53OrLower = exports.isExpoVersion53OrHigher = void 0;
7
7
  var semver = _interopRequireWildcard(require("semver"));
8
8
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
9
9
  /**
@@ -15,18 +15,25 @@ const isFcmPushProvider = iosOptions => {
15
15
  var _iosOptions$pushNotif;
16
16
  return (iosOptions === null || iosOptions === void 0 || (_iosOptions$pushNotif = iosOptions.pushNotification) === null || _iosOptions$pushNotif === void 0 ? void 0 : _iosOptions$pushNotif.provider) === 'fcm';
17
17
  };
18
+
19
+ /** Checks if Expo SDK version meets minimum version requirement */
18
20
  exports.isFcmPushProvider = isFcmPushProvider;
19
- const isExpoVersion53OrHigher = config => {
21
+ function isExpoVersionOrHigher(config, minVersion) {
20
22
  const sdkVersion = config.sdkVersion || '';
21
-
22
- // If sdkVersion is not a valid semver, coerce it to a valid one if possible
23
23
  const validVersion = semver.valid(sdkVersion) || semver.coerce(sdkVersion);
24
-
25
- // If we couldn't get a valid version, return false
26
24
  if (!validVersion) return false;
25
+ return semver.gte(validVersion, minVersion);
26
+ }
27
27
 
28
- // Check if the version is greater than or equal to 53.0.0
29
- return semver.gte(validVersion, '53.0.0');
28
+ /** Returns true if Expo SDK version is >= 53.0.0 */
29
+ const isExpoVersion53OrHigher = config => {
30
+ return isExpoVersionOrHigher(config, '53.0.0');
30
31
  };
32
+
33
+ /** Returns true if Expo SDK version is <= 53.x.x (used for Android 16 compat detection) */
31
34
  exports.isExpoVersion53OrHigher = isExpoVersion53OrHigher;
35
+ const isExpoVersion53OrLower = config => {
36
+ return !isExpoVersionOrHigher(config, '54.0.0');
37
+ };
38
+ exports.isExpoVersion53OrLower = isExpoVersion53OrLower;
32
39
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["semver","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","isFcmPushProvider","iosOptions","_iosOptions$pushNotif","pushNotification","provider","exports","isExpoVersion53OrHigher","config","sdkVersion","validVersion","valid","coerce","gte"],"sources":["utils.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\nimport * as semver from 'semver';\nimport type { CustomerIOPluginOptionsIOS } from '../types/cio-types';\n\n/**\n * Returns true if FCM is configured to be used as push provider\n * @param iosOptions The plugin iOS configuration options\n * @returns true if FCM is configured to be used as push provider\n */\nexport const isFcmPushProvider = (\n iosOptions?: CustomerIOPluginOptionsIOS\n): boolean => {\n return iosOptions?.pushNotification?.provider === 'fcm';\n};\n\nexport const isExpoVersion53OrHigher = (config: ExpoConfig): boolean => {\n const sdkVersion = config.sdkVersion || '';\n\n // If sdkVersion is not a valid semver, coerce it to a valid one if possible\n const validVersion = semver.valid(sdkVersion) || semver.coerce(sdkVersion);\n\n // If we couldn't get a valid version, return false\n if (!validVersion) return false;\n\n // Check if the version is greater than or equal to 53.0.0\n return semver.gte(validVersion, '53.0.0');\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAiC,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAGjC;AACA;AACA;AACA;AACA;AACO,MAAMkB,iBAAiB,GAC5BC,UAAuC,IAC3B;EAAA,IAAAC,qBAAA;EACZ,OAAO,CAAAD,UAAU,aAAVA,UAAU,gBAAAC,qBAAA,GAAVD,UAAU,CAAEE,gBAAgB,cAAAD,qBAAA,uBAA5BA,qBAAA,CAA8BE,QAAQ,MAAK,KAAK;AACzD,CAAC;AAACC,OAAA,CAAAL,iBAAA,GAAAA,iBAAA;AAEK,MAAMM,uBAAuB,GAAIC,MAAkB,IAAc;EACtE,MAAMC,UAAU,GAAGD,MAAM,CAACC,UAAU,IAAI,EAAE;;EAE1C;EACA,MAAMC,YAAY,GAAG/B,MAAM,CAACgC,KAAK,CAACF,UAAU,CAAC,IAAI9B,MAAM,CAACiC,MAAM,CAACH,UAAU,CAAC;;EAE1E;EACA,IAAI,CAACC,YAAY,EAAE,OAAO,KAAK;;EAE/B;EACA,OAAO/B,MAAM,CAACkC,GAAG,CAACH,YAAY,EAAE,QAAQ,CAAC;AAC3C,CAAC;AAACJ,OAAA,CAAAC,uBAAA,GAAAA,uBAAA","ignoreList":[]}
1
+ {"version":3,"names":["semver","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","isFcmPushProvider","iosOptions","_iosOptions$pushNotif","pushNotification","provider","exports","isExpoVersionOrHigher","config","minVersion","sdkVersion","validVersion","valid","coerce","gte","isExpoVersion53OrHigher","isExpoVersion53OrLower"],"sources":["utils.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\nimport * as semver from 'semver';\nimport type { CustomerIOPluginOptionsIOS } from '../types/cio-types';\n\n/**\n * Returns true if FCM is configured to be used as push provider\n * @param iosOptions The plugin iOS configuration options\n * @returns true if FCM is configured to be used as push provider\n */\nexport const isFcmPushProvider = (\n iosOptions?: CustomerIOPluginOptionsIOS\n): boolean => {\n return iosOptions?.pushNotification?.provider === 'fcm';\n};\n\n/** Checks if Expo SDK version meets minimum version requirement */\nfunction isExpoVersionOrHigher(config: ExpoConfig, minVersion: string): boolean {\n const sdkVersion = config.sdkVersion || '';\n const validVersion = semver.valid(sdkVersion) || semver.coerce(sdkVersion);\n if (!validVersion) return false;\n return semver.gte(validVersion, minVersion);\n}\n\n/** Returns true if Expo SDK version is >= 53.0.0 */\nexport const isExpoVersion53OrHigher = (config: ExpoConfig): boolean => {\n return isExpoVersionOrHigher(config, '53.0.0');\n};\n\n/** Returns true if Expo SDK version is <= 53.x.x (used for Android 16 compat detection) */\nexport const isExpoVersion53OrLower = (config: ExpoConfig): boolean => {\n return !isExpoVersionOrHigher(config, '54.0.0');\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAiC,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAGjC;AACA;AACA;AACA;AACA;AACO,MAAMkB,iBAAiB,GAC5BC,UAAuC,IAC3B;EAAA,IAAAC,qBAAA;EACZ,OAAO,CAAAD,UAAU,aAAVA,UAAU,gBAAAC,qBAAA,GAAVD,UAAU,CAAEE,gBAAgB,cAAAD,qBAAA,uBAA5BA,qBAAA,CAA8BE,QAAQ,MAAK,KAAK;AACzD,CAAC;;AAED;AAAAC,OAAA,CAAAL,iBAAA,GAAAA,iBAAA;AACA,SAASM,qBAAqBA,CAACC,MAAkB,EAAEC,UAAkB,EAAW;EAC9E,MAAMC,UAAU,GAAGF,MAAM,CAACE,UAAU,IAAI,EAAE;EAC1C,MAAMC,YAAY,GAAGhC,MAAM,CAACiC,KAAK,CAACF,UAAU,CAAC,IAAI/B,MAAM,CAACkC,MAAM,CAACH,UAAU,CAAC;EAC1E,IAAI,CAACC,YAAY,EAAE,OAAO,KAAK;EAC/B,OAAOhC,MAAM,CAACmC,GAAG,CAACH,YAAY,EAAEF,UAAU,CAAC;AAC7C;;AAEA;AACO,MAAMM,uBAAuB,GAAIP,MAAkB,IAAc;EACtE,OAAOD,qBAAqB,CAACC,MAAM,EAAE,QAAQ,CAAC;AAChD,CAAC;;AAED;AAAAF,OAAA,CAAAS,uBAAA,GAAAA,uBAAA;AACO,MAAMC,sBAAsB,GAAIR,MAAkB,IAAc;EACrE,OAAO,CAACD,qBAAqB,CAACC,MAAM,EAAE,QAAQ,CAAC;AACjD,CAAC;AAACF,OAAA,CAAAU,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["cio-types.ts"],"sourcesContent":["/**\n * Properties set by the user in their app config file (e.g: app.json or app.plugin.js)\n * @public\n */\nexport type CustomerIOPluginProperties = {\n // (iOS only) Environment name and bundle identifier\n devTeam: string;\n iosDeploymentTarget: string;\n};\n\n/**\n * Plugin options for iOS platform configuration\n * @public\n */\nexport type CustomerIOPluginOptionsIOS = {\n iosPath: string;\n devTeam?: string;\n bundleVersion?: string;\n bundleShortVersion?: string;\n bundleIdentifier?: string;\n iosDeploymentTarget?: string;\n appleTeamId?: string;\n appName?: string;\n\n useFrameworks?: 'static' | 'dynamic';\n\n pushNotification?: CustomerIOPluginPushNotificationOptions;\n\n /**\n * @deprecated No longer has any effect. Use autoTrackPushEvents to control if push metrics should be automatically tracked by SDK.\n */\n handleNotificationClick?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.autoFetchDeviceToken instead\n */\n autoFetchDeviceToken?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.showPushAppInForeground instead\n */\n showPushAppInForeground?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.autoTrackPushEvents instead\n */\n autoTrackPushEvents?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.handleDeeplinkInKilledState instead\n */\n handleDeeplinkInKilledState?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.disableNotificationRegistration instead\n */\n disableNotificationRegistration?: boolean;\n};\n\n/**\n * Plugin options for Android platform configuration\n * @public\n */\nexport type CustomerIOPluginOptionsAndroid = {\n androidPath: string;\n googleServicesFile?: string;\n setHighPriorityPushHandler?: boolean;\n pushNotification?: {\n channel?: {\n id?: string;\n name?: string;\n importance?: number;\n };\n };\n};\n\n/**\n * SDK configuration options for auto initialization\n * @public\n */\nexport type NativeSDKConfig = {\n cdpApiKey: string; // Required\n region?: 'US' | 'EU'; // Default: 'US'. The workspace region set for your workspace on the Customer.io dashboard\n autoTrackDeviceAttributes?: boolean; // Default: true\n trackApplicationLifecycleEvents?: boolean; // Default: true\n screenViewUse?: 'all' | 'inapp'; // Default: 'all'. 'all': sent to server + in-app messages, 'inapp': in-app messages only\n logLevel?: 'none' | 'error' | 'info' | 'debug'; // Default: 'debug'. Controls SDK logging verbosity\n siteId?: string; // Optional, if only siteId defined, migrationSiteId = siteId\n migrationSiteId?: string; // Optional, if only migrationSiteId defined, siteId should be null\n};\n\n/**\n * Combined plugin options for both iOS and Android platforms\n * @public\n */\nexport type CustomerIOPluginOptions = {\n config?: NativeSDKConfig; // If defined, enables auto initialization of native SDK\n android: CustomerIOPluginOptionsAndroid;\n ios: CustomerIOPluginOptionsIOS;\n};\n\n/**\n * Rich push configuration used to initialize Notification Service Extension (NSE) on the native side\n * @public\n */\nexport type RichPushConfig = {\n cdpApiKey: string;\n region?: string;\n};\n\n/**\n * Push notification configuration options\n * @public\n */\nexport type CustomerIOPluginPushNotificationOptions = {\n provider?: 'apn' | 'fcm';\n googleServicesFile?: string;\n useRichPush?: boolean;\n autoFetchDeviceToken?: boolean;\n autoTrackPushEvents?: boolean;\n showPushAppInForeground?: boolean;\n disableNotificationRegistration?: boolean;\n handleDeeplinkInKilledState?: boolean;\n\n /**\n * Rich push config should match the values used to initialize SDK in the app.\n * Optional if `config` is provided at the top level.\n */\n env?: RichPushConfig;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["cio-types.ts"],"sourcesContent":["/**\n * Properties set by the user in their app config file (e.g: app.json or app.plugin.js)\n * @public\n */\nexport type CustomerIOPluginProperties = {\n // (iOS only) Environment name and bundle identifier\n devTeam: string;\n iosDeploymentTarget: string;\n};\n\n/**\n * Plugin options for iOS platform configuration\n * @public\n */\nexport type CustomerIOPluginOptionsIOS = {\n iosPath: string;\n devTeam?: string;\n bundleVersion?: string;\n bundleShortVersion?: string;\n bundleIdentifier?: string;\n iosDeploymentTarget?: string;\n appleTeamId?: string;\n appName?: string;\n\n useFrameworks?: 'static' | 'dynamic';\n\n pushNotification?: CustomerIOPluginPushNotificationOptions;\n\n /**\n * @deprecated No longer has any effect. Use autoTrackPushEvents to control if push metrics should be automatically tracked by SDK.\n */\n handleNotificationClick?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.autoFetchDeviceToken instead\n */\n autoFetchDeviceToken?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.showPushAppInForeground instead\n */\n showPushAppInForeground?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.autoTrackPushEvents instead\n */\n autoTrackPushEvents?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.handleDeeplinkInKilledState instead\n */\n handleDeeplinkInKilledState?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.disableNotificationRegistration instead\n */\n disableNotificationRegistration?: boolean;\n};\n\n/**\n * Plugin options for Android platform configuration\n * @public\n */\nexport type CustomerIOPluginOptionsAndroid = {\n androidPath: string;\n googleServicesFile?: string;\n setHighPriorityPushHandler?: boolean;\n pushNotification?: {\n channel?: {\n id?: string;\n name?: string;\n importance?: number;\n };\n };\n /**\n * Controls whether to disable Android 16 support by downgrading androidx dependencies.\n *\n * When true (default for Expo SDK 53), forces older androidx versions compatible with\n * Android API 35 and AGP 8.8.2, preventing Android 16 incompatibility errors.\n *\n * When false (default for Expo SDK 54+), allows newer androidx versions that support Android 16\n * but require Android API 36 and AGP 8.9.1+.\n *\n * If not specified, the plugin auto-detects based on Expo SDK version:\n * - Expo SDK ≤53: true (disables Android 16)\n * - Expo SDK ≥54: false (enables Android 16)\n */\n disableAndroid16Support?: boolean;\n};\n\n/**\n * SDK configuration options for auto initialization\n * @public\n */\nexport type NativeSDKConfig = {\n cdpApiKey: string; // Required\n region?: 'US' | 'EU'; // Default: 'US'. The workspace region set for your workspace on the Customer.io dashboard\n autoTrackDeviceAttributes?: boolean; // Default: true\n trackApplicationLifecycleEvents?: boolean; // Default: true\n screenViewUse?: 'all' | 'inapp'; // Default: 'all'. 'all': sent to server + in-app messages, 'inapp': in-app messages only\n logLevel?: 'none' | 'error' | 'info' | 'debug'; // Default: 'debug'. Controls SDK logging verbosity\n siteId?: string; // Optional, if only siteId defined, migrationSiteId = siteId\n migrationSiteId?: string; // Optional, if only migrationSiteId defined, siteId should be null\n};\n\n/**\n * Combined plugin options for both iOS and Android platforms\n * @public\n */\nexport type CustomerIOPluginOptions = {\n config?: NativeSDKConfig; // If defined, enables auto initialization of native SDK\n android: CustomerIOPluginOptionsAndroid;\n ios: CustomerIOPluginOptionsIOS;\n};\n\n/**\n * Rich push configuration used to initialize Notification Service Extension (NSE) on the native side\n * @public\n */\nexport type RichPushConfig = {\n cdpApiKey: string;\n region?: string;\n};\n\n/**\n * Push notification configuration options\n * @public\n */\nexport type CustomerIOPluginPushNotificationOptions = {\n provider?: 'apn' | 'fcm';\n googleServicesFile?: string;\n useRichPush?: boolean;\n autoFetchDeviceToken?: boolean;\n autoTrackPushEvents?: boolean;\n showPushAppInForeground?: boolean;\n disableNotificationRegistration?: boolean;\n handleDeeplinkInKilledState?: boolean;\n\n /**\n * Rich push config should match the values used to initialize SDK in the app.\n * Optional if `config` is provided at the top level.\n */\n env?: RichPushConfig;\n};\n"],"mappings":"","ignoreList":[]}
@@ -3,6 +3,7 @@ import { withAppGoogleServices } from './withAppGoogleServices';
3
3
  import { withGoogleServicesJSON } from './withGoogleServicesJSON';
4
4
  import { withMainApplicationModifications } from './withMainApplicationModifications';
5
5
  import { withNotificationChannelMetadata } from './withNotificationChannelMetadata';
6
+ import { withProjectBuildGradle } from './withProjectBuildGradle';
6
7
  import { withProjectGoogleServices } from './withProjectGoogleServices';
7
8
  import { withProjectStrings } from './withProjectStrings';
8
9
  export function withCIOAndroid(config, sdkConfig, props) {
@@ -27,6 +28,10 @@ export function withCIOAndroid(config, sdkConfig, props) {
27
28
 
28
29
  // Update project strings for user agent metadata
29
30
  config = withProjectStrings(config);
31
+
32
+ // Add dependency resolution strategy for Expo SDK 53 compatibility
33
+ // This prevents androidx versions that require API 36 from being pulled in
34
+ config = withProjectBuildGradle(config, props);
30
35
  return config;
31
36
  }
32
37
  //# sourceMappingURL=withCIOAndroid.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["withAndroidManifestUpdates","withAppGoogleServices","withGoogleServicesJSON","withMainApplicationModifications","withNotificationChannelMetadata","withProjectGoogleServices","withProjectStrings","withCIOAndroid","config","sdkConfig","props","_props$pushNotificati","setHighPriorityPushHandler","undefined","pushNotification","channel"],"sources":["withCIOAndroid.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\n\nimport type { CustomerIOPluginOptionsAndroid, NativeSDKConfig } from '../types/cio-types';\nimport { withAndroidManifestUpdates } from './withAndroidManifestUpdates';\nimport { withAppGoogleServices } from './withAppGoogleServices';\nimport { withGoogleServicesJSON } from './withGoogleServicesJSON';\nimport { withMainApplicationModifications } from './withMainApplicationModifications';\nimport { withNotificationChannelMetadata } from './withNotificationChannelMetadata';\nimport { withProjectGoogleServices } from './withProjectGoogleServices';\nimport { withProjectStrings } from './withProjectStrings';\n\nexport function withCIOAndroid(\n config: ExpoConfig,\n sdkConfig?: NativeSDKConfig,\n props?: CustomerIOPluginOptionsAndroid,\n): ExpoConfig {\n // Only run notification setup if props are provided\n if (props) {\n config = withProjectGoogleServices(config, props);\n config = withAppGoogleServices(config, props);\n config = withGoogleServicesJSON(config, props);\n if (props.setHighPriorityPushHandler !== undefined) {\n config = withAndroidManifestUpdates(config, props);\n }\n if (props.pushNotification?.channel) {\n config = withNotificationChannelMetadata(config, props);\n }\n }\n\n // Add auto initialization if sdkConfig is provided\n if (sdkConfig) {\n config = withMainApplicationModifications(config, sdkConfig);\n }\n\n // Update project strings for user agent metadata\n config = withProjectStrings(config);\n\n return config;\n}\n"],"mappings":"AAGA,SAASA,0BAA0B,QAAQ,8BAA8B;AACzE,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,sBAAsB,QAAQ,0BAA0B;AACjE,SAASC,gCAAgC,QAAQ,oCAAoC;AACrF,SAASC,+BAA+B,QAAQ,mCAAmC;AACnF,SAASC,yBAAyB,QAAQ,6BAA6B;AACvE,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,OAAO,SAASC,cAAcA,CAC5BC,MAAkB,EAClBC,SAA2B,EAC3BC,KAAsC,EAC1B;EACZ;EACA,IAAIA,KAAK,EAAE;IAAA,IAAAC,qBAAA;IACTH,MAAM,GAAGH,yBAAyB,CAACG,MAAM,EAAEE,KAAK,CAAC;IACjDF,MAAM,GAAGP,qBAAqB,CAACO,MAAM,EAAEE,KAAK,CAAC;IAC7CF,MAAM,GAAGN,sBAAsB,CAACM,MAAM,EAAEE,KAAK,CAAC;IAC9C,IAAIA,KAAK,CAACE,0BAA0B,KAAKC,SAAS,EAAE;MAClDL,MAAM,GAAGR,0BAA0B,CAACQ,MAAM,EAAEE,KAAK,CAAC;IACpD;IACA,KAAAC,qBAAA,GAAID,KAAK,CAACI,gBAAgB,cAAAH,qBAAA,eAAtBA,qBAAA,CAAwBI,OAAO,EAAE;MACnCP,MAAM,GAAGJ,+BAA+B,CAACI,MAAM,EAAEE,KAAK,CAAC;IACzD;EACF;;EAEA;EACA,IAAID,SAAS,EAAE;IACbD,MAAM,GAAGL,gCAAgC,CAACK,MAAM,EAAEC,SAAS,CAAC;EAC9D;;EAEA;EACAD,MAAM,GAAGF,kBAAkB,CAACE,MAAM,CAAC;EAEnC,OAAOA,MAAM;AACf","ignoreList":[]}
1
+ {"version":3,"names":["withAndroidManifestUpdates","withAppGoogleServices","withGoogleServicesJSON","withMainApplicationModifications","withNotificationChannelMetadata","withProjectBuildGradle","withProjectGoogleServices","withProjectStrings","withCIOAndroid","config","sdkConfig","props","_props$pushNotificati","setHighPriorityPushHandler","undefined","pushNotification","channel"],"sources":["withCIOAndroid.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\n\nimport type { CustomerIOPluginOptionsAndroid, NativeSDKConfig } from '../types/cio-types';\nimport { withAndroidManifestUpdates } from './withAndroidManifestUpdates';\nimport { withAppGoogleServices } from './withAppGoogleServices';\nimport { withGoogleServicesJSON } from './withGoogleServicesJSON';\nimport { withMainApplicationModifications } from './withMainApplicationModifications';\nimport { withNotificationChannelMetadata } from './withNotificationChannelMetadata';\nimport { withProjectBuildGradle } from './withProjectBuildGradle';\nimport { withProjectGoogleServices } from './withProjectGoogleServices';\nimport { withProjectStrings } from './withProjectStrings';\n\nexport function withCIOAndroid(\n config: ExpoConfig,\n sdkConfig?: NativeSDKConfig,\n props?: CustomerIOPluginOptionsAndroid,\n): ExpoConfig {\n // Only run notification setup if props are provided\n if (props) {\n config = withProjectGoogleServices(config, props);\n config = withAppGoogleServices(config, props);\n config = withGoogleServicesJSON(config, props);\n if (props.setHighPriorityPushHandler !== undefined) {\n config = withAndroidManifestUpdates(config, props);\n }\n if (props.pushNotification?.channel) {\n config = withNotificationChannelMetadata(config, props);\n }\n }\n\n // Add auto initialization if sdkConfig is provided\n if (sdkConfig) {\n config = withMainApplicationModifications(config, sdkConfig);\n }\n\n // Update project strings for user agent metadata\n config = withProjectStrings(config);\n\n // Add dependency resolution strategy for Expo SDK 53 compatibility\n // This prevents androidx versions that require API 36 from being pulled in\n config = withProjectBuildGradle(config, props);\n\n return config;\n}\n"],"mappings":"AAGA,SAASA,0BAA0B,QAAQ,8BAA8B;AACzE,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,sBAAsB,QAAQ,0BAA0B;AACjE,SAASC,gCAAgC,QAAQ,oCAAoC;AACrF,SAASC,+BAA+B,QAAQ,mCAAmC;AACnF,SAASC,sBAAsB,QAAQ,0BAA0B;AACjE,SAASC,yBAAyB,QAAQ,6BAA6B;AACvE,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,OAAO,SAASC,cAAcA,CAC5BC,MAAkB,EAClBC,SAA2B,EAC3BC,KAAsC,EAC1B;EACZ;EACA,IAAIA,KAAK,EAAE;IAAA,IAAAC,qBAAA;IACTH,MAAM,GAAGH,yBAAyB,CAACG,MAAM,EAAEE,KAAK,CAAC;IACjDF,MAAM,GAAGR,qBAAqB,CAACQ,MAAM,EAAEE,KAAK,CAAC;IAC7CF,MAAM,GAAGP,sBAAsB,CAACO,MAAM,EAAEE,KAAK,CAAC;IAC9C,IAAIA,KAAK,CAACE,0BAA0B,KAAKC,SAAS,EAAE;MAClDL,MAAM,GAAGT,0BAA0B,CAACS,MAAM,EAAEE,KAAK,CAAC;IACpD;IACA,KAAAC,qBAAA,GAAID,KAAK,CAACI,gBAAgB,cAAAH,qBAAA,eAAtBA,qBAAA,CAAwBI,OAAO,EAAE;MACnCP,MAAM,GAAGL,+BAA+B,CAACK,MAAM,EAAEE,KAAK,CAAC;IACzD;EACF;;EAEA;EACA,IAAID,SAAS,EAAE;IACbD,MAAM,GAAGN,gCAAgC,CAACM,MAAM,EAAEC,SAAS,CAAC;EAC9D;;EAEA;EACAD,MAAM,GAAGF,kBAAkB,CAACE,MAAM,CAAC;;EAEnC;EACA;EACAA,MAAM,GAAGJ,sBAAsB,CAACI,MAAM,EAAEE,KAAK,CAAC;EAE9C,OAAOF,MAAM;AACf","ignoreList":[]}
@@ -0,0 +1,60 @@
1
+ import { withProjectBuildGradle as withExpoProjectBuildGradle } from '@expo/config-plugins';
2
+ import { isExpoVersion53OrLower } from '../ios/utils';
3
+ /**
4
+ * Determines if the androidx dependency fix should be applied based on config and Expo version.
5
+ * The fix disables Android 16 support by downgrading androidx dependencies.
6
+ * @param config The Expo config
7
+ * @param androidOptions The Android plugin options
8
+ * @returns true if the fix should be applied (Android 16 disabled)
9
+ */
10
+ function shouldDisableAndroid16Support(config, androidOptions) {
11
+ // If user explicitly sets the option, respect their choice
12
+ if ((androidOptions === null || androidOptions === void 0 ? void 0 : androidOptions.disableAndroid16Support) !== undefined) {
13
+ return androidOptions.disableAndroid16Support;
14
+ }
15
+
16
+ // Auto-detect: Disable Android 16 for Expo SDK 53 or lower, enable for 54+
17
+ return isExpoVersion53OrLower(config);
18
+ }
19
+
20
+ /**
21
+ * Adds dependency resolution strategy to force specific androidx versions.
22
+ * This disables Android 16 support for apps using Expo SDK 53 or older gradle versions.
23
+ *
24
+ * The fix prevents newer androidx versions that require Android API 36 and AGP 8.9.1+
25
+ * from being pulled in. Expo SDK 53 uses Android API 35 and AGP 8.8.2, so we force
26
+ * compatible versions.
27
+ *
28
+ * Expo SDK 54+ should support newer gradle versions and won't need this fix.
29
+ */
30
+ export function withProjectBuildGradle(config, androidOptions) {
31
+ return withExpoProjectBuildGradle(config, config => {
32
+ const {
33
+ modResults
34
+ } = config;
35
+
36
+ // Check if Android 16 support should be disabled
37
+ if (!shouldDisableAndroid16Support(config, androidOptions)) {
38
+ return config;
39
+ }
40
+
41
+ // Skip if already applied
42
+ if (modResults.contents.includes('androidx.core:core-ktx:1.13.1')) {
43
+ return config;
44
+ }
45
+ const resolutionStrategy = `
46
+ configurations.all {
47
+ resolutionStrategy {
48
+ // Disable Android 16 support by forcing older androidx versions
49
+ // Compatible with API 35 and AGP 8.8.2 (prevents API 36/AGP 8.9.1+ requirement)
50
+ force 'androidx.core:core-ktx:1.13.1'
51
+ force 'androidx.lifecycle:lifecycle-process:2.8.7'
52
+ }
53
+ }`;
54
+
55
+ // Add resolution strategy inside allprojects block
56
+ modResults.contents = modResults.contents.replace(/allprojects\s*\{/, `allprojects {${resolutionStrategy}`);
57
+ return config;
58
+ });
59
+ }
60
+ //# sourceMappingURL=withProjectBuildGradle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["withProjectBuildGradle","withExpoProjectBuildGradle","isExpoVersion53OrLower","shouldDisableAndroid16Support","config","androidOptions","disableAndroid16Support","undefined","modResults","contents","includes","resolutionStrategy","replace"],"sources":["withProjectBuildGradle.ts"],"sourcesContent":["import { withProjectBuildGradle as withExpoProjectBuildGradle } from '@expo/config-plugins';\nimport type { ExpoConfig } from '@expo/config-types';\nimport { isExpoVersion53OrLower } from '../ios/utils';\nimport type { CustomerIOPluginOptionsAndroid } from '../types/cio-types';\n\n/**\n * Determines if the androidx dependency fix should be applied based on config and Expo version.\n * The fix disables Android 16 support by downgrading androidx dependencies.\n * @param config The Expo config\n * @param androidOptions The Android plugin options\n * @returns true if the fix should be applied (Android 16 disabled)\n */\nfunction shouldDisableAndroid16Support(\n config: ExpoConfig,\n androidOptions?: CustomerIOPluginOptionsAndroid\n): boolean {\n // If user explicitly sets the option, respect their choice\n if (androidOptions?.disableAndroid16Support !== undefined) {\n return androidOptions.disableAndroid16Support;\n }\n\n // Auto-detect: Disable Android 16 for Expo SDK 53 or lower, enable for 54+\n return isExpoVersion53OrLower(config);\n}\n\n/**\n * Adds dependency resolution strategy to force specific androidx versions.\n * This disables Android 16 support for apps using Expo SDK 53 or older gradle versions.\n *\n * The fix prevents newer androidx versions that require Android API 36 and AGP 8.9.1+\n * from being pulled in. Expo SDK 53 uses Android API 35 and AGP 8.8.2, so we force\n * compatible versions.\n *\n * Expo SDK 54+ should support newer gradle versions and won't need this fix.\n */\nexport function withProjectBuildGradle(\n config: ExpoConfig,\n androidOptions?: CustomerIOPluginOptionsAndroid\n): ExpoConfig {\n return withExpoProjectBuildGradle(config, (config) => {\n const { modResults } = config;\n\n // Check if Android 16 support should be disabled\n if (!shouldDisableAndroid16Support(config, androidOptions)) {\n return config;\n }\n\n // Skip if already applied\n if (modResults.contents.includes('androidx.core:core-ktx:1.13.1')) {\n return config;\n }\n\n const resolutionStrategy = `\n configurations.all {\n resolutionStrategy {\n // Disable Android 16 support by forcing older androidx versions\n // Compatible with API 35 and AGP 8.8.2 (prevents API 36/AGP 8.9.1+ requirement)\n force 'androidx.core:core-ktx:1.13.1'\n force 'androidx.lifecycle:lifecycle-process:2.8.7'\n }\n }`;\n\n // Add resolution strategy inside allprojects block\n modResults.contents = modResults.contents.replace(\n /allprojects\\s*\\{/,\n `allprojects {${resolutionStrategy}`\n );\n\n return config;\n });\n}\n"],"mappings":"AAAA,SAASA,sBAAsB,IAAIC,0BAA0B,QAAQ,sBAAsB;AAE3F,SAASC,sBAAsB,QAAQ,cAAc;AAGrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,6BAA6BA,CACpCC,MAAkB,EAClBC,cAA+C,EACtC;EACT;EACA,IAAI,CAAAA,cAAc,aAAdA,cAAc,uBAAdA,cAAc,CAAEC,uBAAuB,MAAKC,SAAS,EAAE;IACzD,OAAOF,cAAc,CAACC,uBAAuB;EAC/C;;EAEA;EACA,OAAOJ,sBAAsB,CAACE,MAAM,CAAC;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASJ,sBAAsBA,CACpCI,MAAkB,EAClBC,cAA+C,EACnC;EACZ,OAAOJ,0BAA0B,CAACG,MAAM,EAAGA,MAAM,IAAK;IACpD,MAAM;MAAEI;IAAW,CAAC,GAAGJ,MAAM;;IAE7B;IACA,IAAI,CAACD,6BAA6B,CAACC,MAAM,EAAEC,cAAc,CAAC,EAAE;MAC1D,OAAOD,MAAM;IACf;;IAEA;IACA,IAAII,UAAU,CAACC,QAAQ,CAACC,QAAQ,CAAC,+BAA+B,CAAC,EAAE;MACjE,OAAON,MAAM;IACf;IAEA,MAAMO,kBAAkB,GAAG;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;IAEF;IACAH,UAAU,CAACC,QAAQ,GAAGD,UAAU,CAACC,QAAQ,CAACG,OAAO,CAC/C,kBAAkB,EAClB,gBAAgBD,kBAAkB,EACpC,CAAC;IAED,OAAOP,MAAM;EACf,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -8,16 +8,22 @@ export const isFcmPushProvider = iosOptions => {
8
8
  var _iosOptions$pushNotif;
9
9
  return (iosOptions === null || iosOptions === void 0 || (_iosOptions$pushNotif = iosOptions.pushNotification) === null || _iosOptions$pushNotif === void 0 ? void 0 : _iosOptions$pushNotif.provider) === 'fcm';
10
10
  };
11
- export const isExpoVersion53OrHigher = config => {
12
- const sdkVersion = config.sdkVersion || '';
13
11
 
14
- // If sdkVersion is not a valid semver, coerce it to a valid one if possible
12
+ /** Checks if Expo SDK version meets minimum version requirement */
13
+ function isExpoVersionOrHigher(config, minVersion) {
14
+ const sdkVersion = config.sdkVersion || '';
15
15
  const validVersion = semver.valid(sdkVersion) || semver.coerce(sdkVersion);
16
-
17
- // If we couldn't get a valid version, return false
18
16
  if (!validVersion) return false;
17
+ return semver.gte(validVersion, minVersion);
18
+ }
19
+
20
+ /** Returns true if Expo SDK version is >= 53.0.0 */
21
+ export const isExpoVersion53OrHigher = config => {
22
+ return isExpoVersionOrHigher(config, '53.0.0');
23
+ };
19
24
 
20
- // Check if the version is greater than or equal to 53.0.0
21
- return semver.gte(validVersion, '53.0.0');
25
+ /** Returns true if Expo SDK version is <= 53.x.x (used for Android 16 compat detection) */
26
+ export const isExpoVersion53OrLower = config => {
27
+ return !isExpoVersionOrHigher(config, '54.0.0');
22
28
  };
23
29
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["semver","isFcmPushProvider","iosOptions","_iosOptions$pushNotif","pushNotification","provider","isExpoVersion53OrHigher","config","sdkVersion","validVersion","valid","coerce","gte"],"sources":["utils.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\nimport * as semver from 'semver';\nimport type { CustomerIOPluginOptionsIOS } from '../types/cio-types';\n\n/**\n * Returns true if FCM is configured to be used as push provider\n * @param iosOptions The plugin iOS configuration options\n * @returns true if FCM is configured to be used as push provider\n */\nexport const isFcmPushProvider = (\n iosOptions?: CustomerIOPluginOptionsIOS\n): boolean => {\n return iosOptions?.pushNotification?.provider === 'fcm';\n};\n\nexport const isExpoVersion53OrHigher = (config: ExpoConfig): boolean => {\n const sdkVersion = config.sdkVersion || '';\n\n // If sdkVersion is not a valid semver, coerce it to a valid one if possible\n const validVersion = semver.valid(sdkVersion) || semver.coerce(sdkVersion);\n\n // If we couldn't get a valid version, return false\n if (!validVersion) return false;\n\n // Check if the version is greater than or equal to 53.0.0\n return semver.gte(validVersion, '53.0.0');\n};\n"],"mappings":"AACA,OAAO,KAAKA,MAAM,MAAM,QAAQ;AAGhC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAC5BC,UAAuC,IAC3B;EAAA,IAAAC,qBAAA;EACZ,OAAO,CAAAD,UAAU,aAAVA,UAAU,gBAAAC,qBAAA,GAAVD,UAAU,CAAEE,gBAAgB,cAAAD,qBAAA,uBAA5BA,qBAAA,CAA8BE,QAAQ,MAAK,KAAK;AACzD,CAAC;AAED,OAAO,MAAMC,uBAAuB,GAAIC,MAAkB,IAAc;EACtE,MAAMC,UAAU,GAAGD,MAAM,CAACC,UAAU,IAAI,EAAE;;EAE1C;EACA,MAAMC,YAAY,GAAGT,MAAM,CAACU,KAAK,CAACF,UAAU,CAAC,IAAIR,MAAM,CAACW,MAAM,CAACH,UAAU,CAAC;;EAE1E;EACA,IAAI,CAACC,YAAY,EAAE,OAAO,KAAK;;EAE/B;EACA,OAAOT,MAAM,CAACY,GAAG,CAACH,YAAY,EAAE,QAAQ,CAAC;AAC3C,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["semver","isFcmPushProvider","iosOptions","_iosOptions$pushNotif","pushNotification","provider","isExpoVersionOrHigher","config","minVersion","sdkVersion","validVersion","valid","coerce","gte","isExpoVersion53OrHigher","isExpoVersion53OrLower"],"sources":["utils.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\nimport * as semver from 'semver';\nimport type { CustomerIOPluginOptionsIOS } from '../types/cio-types';\n\n/**\n * Returns true if FCM is configured to be used as push provider\n * @param iosOptions The plugin iOS configuration options\n * @returns true if FCM is configured to be used as push provider\n */\nexport const isFcmPushProvider = (\n iosOptions?: CustomerIOPluginOptionsIOS\n): boolean => {\n return iosOptions?.pushNotification?.provider === 'fcm';\n};\n\n/** Checks if Expo SDK version meets minimum version requirement */\nfunction isExpoVersionOrHigher(config: ExpoConfig, minVersion: string): boolean {\n const sdkVersion = config.sdkVersion || '';\n const validVersion = semver.valid(sdkVersion) || semver.coerce(sdkVersion);\n if (!validVersion) return false;\n return semver.gte(validVersion, minVersion);\n}\n\n/** Returns true if Expo SDK version is >= 53.0.0 */\nexport const isExpoVersion53OrHigher = (config: ExpoConfig): boolean => {\n return isExpoVersionOrHigher(config, '53.0.0');\n};\n\n/** Returns true if Expo SDK version is <= 53.x.x (used for Android 16 compat detection) */\nexport const isExpoVersion53OrLower = (config: ExpoConfig): boolean => {\n return !isExpoVersionOrHigher(config, '54.0.0');\n};\n"],"mappings":"AACA,OAAO,KAAKA,MAAM,MAAM,QAAQ;AAGhC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAC5BC,UAAuC,IAC3B;EAAA,IAAAC,qBAAA;EACZ,OAAO,CAAAD,UAAU,aAAVA,UAAU,gBAAAC,qBAAA,GAAVD,UAAU,CAAEE,gBAAgB,cAAAD,qBAAA,uBAA5BA,qBAAA,CAA8BE,QAAQ,MAAK,KAAK;AACzD,CAAC;;AAED;AACA,SAASC,qBAAqBA,CAACC,MAAkB,EAAEC,UAAkB,EAAW;EAC9E,MAAMC,UAAU,GAAGF,MAAM,CAACE,UAAU,IAAI,EAAE;EAC1C,MAAMC,YAAY,GAAGV,MAAM,CAACW,KAAK,CAACF,UAAU,CAAC,IAAIT,MAAM,CAACY,MAAM,CAACH,UAAU,CAAC;EAC1E,IAAI,CAACC,YAAY,EAAE,OAAO,KAAK;EAC/B,OAAOV,MAAM,CAACa,GAAG,CAACH,YAAY,EAAEF,UAAU,CAAC;AAC7C;;AAEA;AACA,OAAO,MAAMM,uBAAuB,GAAIP,MAAkB,IAAc;EACtE,OAAOD,qBAAqB,CAACC,MAAM,EAAE,QAAQ,CAAC;AAChD,CAAC;;AAED;AACA,OAAO,MAAMQ,sBAAsB,GAAIR,MAAkB,IAAc;EACrE,OAAO,CAACD,qBAAqB,CAACC,MAAM,EAAE,QAAQ,CAAC;AACjD,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["cio-types.ts"],"sourcesContent":["/**\n * Properties set by the user in their app config file (e.g: app.json or app.plugin.js)\n * @public\n */\nexport type CustomerIOPluginProperties = {\n // (iOS only) Environment name and bundle identifier\n devTeam: string;\n iosDeploymentTarget: string;\n};\n\n/**\n * Plugin options for iOS platform configuration\n * @public\n */\nexport type CustomerIOPluginOptionsIOS = {\n iosPath: string;\n devTeam?: string;\n bundleVersion?: string;\n bundleShortVersion?: string;\n bundleIdentifier?: string;\n iosDeploymentTarget?: string;\n appleTeamId?: string;\n appName?: string;\n\n useFrameworks?: 'static' | 'dynamic';\n\n pushNotification?: CustomerIOPluginPushNotificationOptions;\n\n /**\n * @deprecated No longer has any effect. Use autoTrackPushEvents to control if push metrics should be automatically tracked by SDK.\n */\n handleNotificationClick?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.autoFetchDeviceToken instead\n */\n autoFetchDeviceToken?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.showPushAppInForeground instead\n */\n showPushAppInForeground?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.autoTrackPushEvents instead\n */\n autoTrackPushEvents?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.handleDeeplinkInKilledState instead\n */\n handleDeeplinkInKilledState?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.disableNotificationRegistration instead\n */\n disableNotificationRegistration?: boolean;\n};\n\n/**\n * Plugin options for Android platform configuration\n * @public\n */\nexport type CustomerIOPluginOptionsAndroid = {\n androidPath: string;\n googleServicesFile?: string;\n setHighPriorityPushHandler?: boolean;\n pushNotification?: {\n channel?: {\n id?: string;\n name?: string;\n importance?: number;\n };\n };\n};\n\n/**\n * SDK configuration options for auto initialization\n * @public\n */\nexport type NativeSDKConfig = {\n cdpApiKey: string; // Required\n region?: 'US' | 'EU'; // Default: 'US'. The workspace region set for your workspace on the Customer.io dashboard\n autoTrackDeviceAttributes?: boolean; // Default: true\n trackApplicationLifecycleEvents?: boolean; // Default: true\n screenViewUse?: 'all' | 'inapp'; // Default: 'all'. 'all': sent to server + in-app messages, 'inapp': in-app messages only\n logLevel?: 'none' | 'error' | 'info' | 'debug'; // Default: 'debug'. Controls SDK logging verbosity\n siteId?: string; // Optional, if only siteId defined, migrationSiteId = siteId\n migrationSiteId?: string; // Optional, if only migrationSiteId defined, siteId should be null\n};\n\n/**\n * Combined plugin options for both iOS and Android platforms\n * @public\n */\nexport type CustomerIOPluginOptions = {\n config?: NativeSDKConfig; // If defined, enables auto initialization of native SDK\n android: CustomerIOPluginOptionsAndroid;\n ios: CustomerIOPluginOptionsIOS;\n};\n\n/**\n * Rich push configuration used to initialize Notification Service Extension (NSE) on the native side\n * @public\n */\nexport type RichPushConfig = {\n cdpApiKey: string;\n region?: string;\n};\n\n/**\n * Push notification configuration options\n * @public\n */\nexport type CustomerIOPluginPushNotificationOptions = {\n provider?: 'apn' | 'fcm';\n googleServicesFile?: string;\n useRichPush?: boolean;\n autoFetchDeviceToken?: boolean;\n autoTrackPushEvents?: boolean;\n showPushAppInForeground?: boolean;\n disableNotificationRegistration?: boolean;\n handleDeeplinkInKilledState?: boolean;\n\n /**\n * Rich push config should match the values used to initialize SDK in the app.\n * Optional if `config` is provided at the top level.\n */\n env?: RichPushConfig;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["cio-types.ts"],"sourcesContent":["/**\n * Properties set by the user in their app config file (e.g: app.json or app.plugin.js)\n * @public\n */\nexport type CustomerIOPluginProperties = {\n // (iOS only) Environment name and bundle identifier\n devTeam: string;\n iosDeploymentTarget: string;\n};\n\n/**\n * Plugin options for iOS platform configuration\n * @public\n */\nexport type CustomerIOPluginOptionsIOS = {\n iosPath: string;\n devTeam?: string;\n bundleVersion?: string;\n bundleShortVersion?: string;\n bundleIdentifier?: string;\n iosDeploymentTarget?: string;\n appleTeamId?: string;\n appName?: string;\n\n useFrameworks?: 'static' | 'dynamic';\n\n pushNotification?: CustomerIOPluginPushNotificationOptions;\n\n /**\n * @deprecated No longer has any effect. Use autoTrackPushEvents to control if push metrics should be automatically tracked by SDK.\n */\n handleNotificationClick?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.autoFetchDeviceToken instead\n */\n autoFetchDeviceToken?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.showPushAppInForeground instead\n */\n showPushAppInForeground?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.autoTrackPushEvents instead\n */\n autoTrackPushEvents?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.handleDeeplinkInKilledState instead\n */\n handleDeeplinkInKilledState?: boolean;\n\n /**\n * @deprecated Property will be removed in the future. Use ios.pushNotification.disableNotificationRegistration instead\n */\n disableNotificationRegistration?: boolean;\n};\n\n/**\n * Plugin options for Android platform configuration\n * @public\n */\nexport type CustomerIOPluginOptionsAndroid = {\n androidPath: string;\n googleServicesFile?: string;\n setHighPriorityPushHandler?: boolean;\n pushNotification?: {\n channel?: {\n id?: string;\n name?: string;\n importance?: number;\n };\n };\n /**\n * Controls whether to disable Android 16 support by downgrading androidx dependencies.\n *\n * When true (default for Expo SDK 53), forces older androidx versions compatible with\n * Android API 35 and AGP 8.8.2, preventing Android 16 incompatibility errors.\n *\n * When false (default for Expo SDK 54+), allows newer androidx versions that support Android 16\n * but require Android API 36 and AGP 8.9.1+.\n *\n * If not specified, the plugin auto-detects based on Expo SDK version:\n * - Expo SDK ≤53: true (disables Android 16)\n * - Expo SDK ≥54: false (enables Android 16)\n */\n disableAndroid16Support?: boolean;\n};\n\n/**\n * SDK configuration options for auto initialization\n * @public\n */\nexport type NativeSDKConfig = {\n cdpApiKey: string; // Required\n region?: 'US' | 'EU'; // Default: 'US'. The workspace region set for your workspace on the Customer.io dashboard\n autoTrackDeviceAttributes?: boolean; // Default: true\n trackApplicationLifecycleEvents?: boolean; // Default: true\n screenViewUse?: 'all' | 'inapp'; // Default: 'all'. 'all': sent to server + in-app messages, 'inapp': in-app messages only\n logLevel?: 'none' | 'error' | 'info' | 'debug'; // Default: 'debug'. Controls SDK logging verbosity\n siteId?: string; // Optional, if only siteId defined, migrationSiteId = siteId\n migrationSiteId?: string; // Optional, if only migrationSiteId defined, siteId should be null\n};\n\n/**\n * Combined plugin options for both iOS and Android platforms\n * @public\n */\nexport type CustomerIOPluginOptions = {\n config?: NativeSDKConfig; // If defined, enables auto initialization of native SDK\n android: CustomerIOPluginOptionsAndroid;\n ios: CustomerIOPluginOptionsIOS;\n};\n\n/**\n * Rich push configuration used to initialize Notification Service Extension (NSE) on the native side\n * @public\n */\nexport type RichPushConfig = {\n cdpApiKey: string;\n region?: string;\n};\n\n/**\n * Push notification configuration options\n * @public\n */\nexport type CustomerIOPluginPushNotificationOptions = {\n provider?: 'apn' | 'fcm';\n googleServicesFile?: string;\n useRichPush?: boolean;\n autoFetchDeviceToken?: boolean;\n autoTrackPushEvents?: boolean;\n showPushAppInForeground?: boolean;\n disableNotificationRegistration?: boolean;\n handleDeeplinkInKilledState?: boolean;\n\n /**\n * Rich push config should match the values used to initialize SDK in the app.\n * Optional if `config` is provided at the top level.\n */\n env?: RichPushConfig;\n};\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ import type { ExpoConfig } from '@expo/config-types';
2
+ import type { CustomerIOPluginOptionsAndroid } from '../types/cio-types';
3
+ /**
4
+ * Adds dependency resolution strategy to force specific androidx versions.
5
+ * This disables Android 16 support for apps using Expo SDK 53 or older gradle versions.
6
+ *
7
+ * The fix prevents newer androidx versions that require Android API 36 and AGP 8.9.1+
8
+ * from being pulled in. Expo SDK 53 uses Android API 35 and AGP 8.8.2, so we force
9
+ * compatible versions.
10
+ *
11
+ * Expo SDK 54+ should support newer gradle versions and won't need this fix.
12
+ */
13
+ export declare function withProjectBuildGradle(config: ExpoConfig, androidOptions?: CustomerIOPluginOptionsAndroid): ExpoConfig;
@@ -6,4 +6,7 @@ import type { CustomerIOPluginOptionsIOS } from '../types/cio-types';
6
6
  * @returns true if FCM is configured to be used as push provider
7
7
  */
8
8
  export declare const isFcmPushProvider: (iosOptions?: CustomerIOPluginOptionsIOS) => boolean;
9
+ /** Returns true if Expo SDK version is >= 53.0.0 */
9
10
  export declare const isExpoVersion53OrHigher: (config: ExpoConfig) => boolean;
11
+ /** Returns true if Expo SDK version is <= 53.x.x (used for Android 16 compat detection) */
12
+ export declare const isExpoVersion53OrLower: (config: ExpoConfig) => boolean;
@@ -61,6 +61,20 @@ export type CustomerIOPluginOptionsAndroid = {
61
61
  importance?: number;
62
62
  };
63
63
  };
64
+ /**
65
+ * Controls whether to disable Android 16 support by downgrading androidx dependencies.
66
+ *
67
+ * When true (default for Expo SDK 53), forces older androidx versions compatible with
68
+ * Android API 35 and AGP 8.8.2, preventing Android 16 incompatibility errors.
69
+ *
70
+ * When false (default for Expo SDK 54+), allows newer androidx versions that support Android 16
71
+ * but require Android API 36 and AGP 8.9.1+.
72
+ *
73
+ * If not specified, the plugin auto-detects based on Expo SDK version:
74
+ * - Expo SDK ≤53: true (disables Android 16)
75
+ * - Expo SDK ≥54: false (enables Android 16)
76
+ */
77
+ disableAndroid16Support?: boolean;
64
78
  };
65
79
  /**
66
80
  * SDK configuration options for auto initialization
@@ -6,6 +6,7 @@ import { withAppGoogleServices } from './withAppGoogleServices';
6
6
  import { withGoogleServicesJSON } from './withGoogleServicesJSON';
7
7
  import { withMainApplicationModifications } from './withMainApplicationModifications';
8
8
  import { withNotificationChannelMetadata } from './withNotificationChannelMetadata';
9
+ import { withProjectBuildGradle } from './withProjectBuildGradle';
9
10
  import { withProjectGoogleServices } from './withProjectGoogleServices';
10
11
  import { withProjectStrings } from './withProjectStrings';
11
12
 
@@ -35,5 +36,9 @@ export function withCIOAndroid(
35
36
  // Update project strings for user agent metadata
36
37
  config = withProjectStrings(config);
37
38
 
39
+ // Add dependency resolution strategy for Expo SDK 53 compatibility
40
+ // This prevents androidx versions that require API 36 from being pulled in
41
+ config = withProjectBuildGradle(config, props);
42
+
38
43
  return config;
39
44
  }
@@ -0,0 +1,71 @@
1
+ import { withProjectBuildGradle as withExpoProjectBuildGradle } from '@expo/config-plugins';
2
+ import type { ExpoConfig } from '@expo/config-types';
3
+ import { isExpoVersion53OrLower } from '../ios/utils';
4
+ import type { CustomerIOPluginOptionsAndroid } from '../types/cio-types';
5
+
6
+ /**
7
+ * Determines if the androidx dependency fix should be applied based on config and Expo version.
8
+ * The fix disables Android 16 support by downgrading androidx dependencies.
9
+ * @param config The Expo config
10
+ * @param androidOptions The Android plugin options
11
+ * @returns true if the fix should be applied (Android 16 disabled)
12
+ */
13
+ function shouldDisableAndroid16Support(
14
+ config: ExpoConfig,
15
+ androidOptions?: CustomerIOPluginOptionsAndroid
16
+ ): boolean {
17
+ // If user explicitly sets the option, respect their choice
18
+ if (androidOptions?.disableAndroid16Support !== undefined) {
19
+ return androidOptions.disableAndroid16Support;
20
+ }
21
+
22
+ // Auto-detect: Disable Android 16 for Expo SDK 53 or lower, enable for 54+
23
+ return isExpoVersion53OrLower(config);
24
+ }
25
+
26
+ /**
27
+ * Adds dependency resolution strategy to force specific androidx versions.
28
+ * This disables Android 16 support for apps using Expo SDK 53 or older gradle versions.
29
+ *
30
+ * The fix prevents newer androidx versions that require Android API 36 and AGP 8.9.1+
31
+ * from being pulled in. Expo SDK 53 uses Android API 35 and AGP 8.8.2, so we force
32
+ * compatible versions.
33
+ *
34
+ * Expo SDK 54+ should support newer gradle versions and won't need this fix.
35
+ */
36
+ export function withProjectBuildGradle(
37
+ config: ExpoConfig,
38
+ androidOptions?: CustomerIOPluginOptionsAndroid
39
+ ): ExpoConfig {
40
+ return withExpoProjectBuildGradle(config, (config) => {
41
+ const { modResults } = config;
42
+
43
+ // Check if Android 16 support should be disabled
44
+ if (!shouldDisableAndroid16Support(config, androidOptions)) {
45
+ return config;
46
+ }
47
+
48
+ // Skip if already applied
49
+ if (modResults.contents.includes('androidx.core:core-ktx:1.13.1')) {
50
+ return config;
51
+ }
52
+
53
+ const resolutionStrategy = `
54
+ configurations.all {
55
+ resolutionStrategy {
56
+ // Disable Android 16 support by forcing older androidx versions
57
+ // Compatible with API 35 and AGP 8.8.2 (prevents API 36/AGP 8.9.1+ requirement)
58
+ force 'androidx.core:core-ktx:1.13.1'
59
+ force 'androidx.lifecycle:lifecycle-process:2.8.7'
60
+ }
61
+ }`;
62
+
63
+ // Add resolution strategy inside allprojects block
64
+ modResults.contents = modResults.contents.replace(
65
+ /allprojects\s*\{/,
66
+ `allprojects {${resolutionStrategy}`
67
+ );
68
+
69
+ return config;
70
+ });
71
+ }
@@ -13,15 +13,20 @@ export const isFcmPushProvider = (
13
13
  return iosOptions?.pushNotification?.provider === 'fcm';
14
14
  };
15
15
 
16
- export const isExpoVersion53OrHigher = (config: ExpoConfig): boolean => {
16
+ /** Checks if Expo SDK version meets minimum version requirement */
17
+ function isExpoVersionOrHigher(config: ExpoConfig, minVersion: string): boolean {
17
18
  const sdkVersion = config.sdkVersion || '';
18
-
19
- // If sdkVersion is not a valid semver, coerce it to a valid one if possible
20
19
  const validVersion = semver.valid(sdkVersion) || semver.coerce(sdkVersion);
21
-
22
- // If we couldn't get a valid version, return false
23
20
  if (!validVersion) return false;
21
+ return semver.gte(validVersion, minVersion);
22
+ }
23
+
24
+ /** Returns true if Expo SDK version is >= 53.0.0 */
25
+ export const isExpoVersion53OrHigher = (config: ExpoConfig): boolean => {
26
+ return isExpoVersionOrHigher(config, '53.0.0');
27
+ };
24
28
 
25
- // Check if the version is greater than or equal to 53.0.0
26
- return semver.gte(validVersion, '53.0.0');
29
+ /** Returns true if Expo SDK version is <= 53.x.x (used for Android 16 compat detection) */
30
+ export const isExpoVersion53OrLower = (config: ExpoConfig): boolean => {
31
+ return !isExpoVersionOrHigher(config, '54.0.0');
27
32
  };
@@ -72,6 +72,20 @@ export type CustomerIOPluginOptionsAndroid = {
72
72
  importance?: number;
73
73
  };
74
74
  };
75
+ /**
76
+ * Controls whether to disable Android 16 support by downgrading androidx dependencies.
77
+ *
78
+ * When true (default for Expo SDK 53), forces older androidx versions compatible with
79
+ * Android API 35 and AGP 8.8.2, preventing Android 16 incompatibility errors.
80
+ *
81
+ * When false (default for Expo SDK 54+), allows newer androidx versions that support Android 16
82
+ * but require Android API 36 and AGP 8.9.1+.
83
+ *
84
+ * If not specified, the plugin auto-detects based on Expo SDK version:
85
+ * - Expo SDK ≤53: true (disables Android 16)
86
+ * - Expo SDK ≥54: false (enables Android 16)
87
+ */
88
+ disableAndroid16Support?: boolean;
75
89
  };
76
90
 
77
91
  /**