customerio-expo-plugin 3.1.0 → 3.2.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 +3 -2
- package/plugin/lib/commonjs/android/withCIOAndroid.js +13 -2
- package/plugin/lib/commonjs/android/withCIOAndroid.js.map +1 -1
- package/plugin/lib/commonjs/android/withLocationGradleProperties.js +37 -0
- package/plugin/lib/commonjs/android/withLocationGradleProperties.js.map +1 -0
- package/plugin/lib/commonjs/android/withMainApplicationModifications.js +21 -5
- package/plugin/lib/commonjs/android/withMainApplicationModifications.js.map +1 -1
- package/plugin/lib/commonjs/helpers/native-files/android/CustomerIOSDKInitializer.kt +2 -0
- package/plugin/lib/commonjs/helpers/native-files/ios/CustomerIOSDKInitializer.swift +2 -0
- package/plugin/lib/commonjs/helpers/utils/injectCIOPodfileCode.js +19 -2
- package/plugin/lib/commonjs/helpers/utils/injectCIOPodfileCode.js.map +1 -1
- package/plugin/lib/commonjs/helpers/utils/patchLocationCode.js +50 -0
- package/plugin/lib/commonjs/helpers/utils/patchLocationCode.js.map +1 -0
- package/plugin/lib/commonjs/helpers/utils/patchPluginNativeCode.js +3 -1
- package/plugin/lib/commonjs/helpers/utils/patchPluginNativeCode.js.map +1 -1
- package/plugin/lib/commonjs/index.js +2 -2
- package/plugin/lib/commonjs/index.js.map +1 -1
- package/plugin/lib/commonjs/ios/withCIOIos.js +29 -4
- package/plugin/lib/commonjs/ios/withCIOIos.js.map +1 -1
- package/plugin/lib/commonjs/ios/withCIOIosSwift.js +19 -9
- package/plugin/lib/commonjs/ios/withCIOIosSwift.js.map +1 -1
- package/plugin/lib/commonjs/ios/withXcodeProject.js +4 -1
- package/plugin/lib/commonjs/ios/withXcodeProject.js.map +1 -1
- package/plugin/lib/commonjs/types/cio-types.js.map +1 -1
- package/plugin/lib/module/android/withCIOAndroid.js +13 -2
- package/plugin/lib/module/android/withCIOAndroid.js.map +1 -1
- package/plugin/lib/module/android/withLocationGradleProperties.js +30 -0
- package/plugin/lib/module/android/withLocationGradleProperties.js.map +1 -0
- package/plugin/lib/module/android/withMainApplicationModifications.js +20 -4
- package/plugin/lib/module/android/withMainApplicationModifications.js.map +1 -1
- package/plugin/lib/module/helpers/native-files/android/CustomerIOSDKInitializer.kt +2 -0
- package/plugin/lib/module/helpers/native-files/ios/CustomerIOSDKInitializer.swift +2 -0
- package/plugin/lib/module/helpers/utils/injectCIOPodfileCode.js +18 -2
- package/plugin/lib/module/helpers/utils/injectCIOPodfileCode.js.map +1 -1
- package/plugin/lib/module/helpers/utils/patchLocationCode.js +44 -0
- package/plugin/lib/module/helpers/utils/patchLocationCode.js.map +1 -0
- package/plugin/lib/module/helpers/utils/patchPluginNativeCode.js +3 -2
- package/plugin/lib/module/helpers/utils/patchPluginNativeCode.js.map +1 -1
- package/plugin/lib/module/index.js +2 -2
- package/plugin/lib/module/index.js.map +1 -1
- package/plugin/lib/module/ios/withCIOIos.js +29 -4
- package/plugin/lib/module/ios/withCIOIos.js.map +1 -1
- package/plugin/lib/module/ios/withCIOIosSwift.js +19 -9
- package/plugin/lib/module/ios/withCIOIosSwift.js.map +1 -1
- package/plugin/lib/module/ios/withXcodeProject.js +5 -1
- package/plugin/lib/module/ios/withXcodeProject.js.map +1 -1
- package/plugin/lib/module/types/cio-types.js.map +1 -1
- package/plugin/lib/typescript/android/withCIOAndroid.d.ts +2 -2
- package/plugin/lib/typescript/android/withLocationGradleProperties.d.ts +9 -0
- package/plugin/lib/typescript/android/withMainApplicationModifications.d.ts +7 -2
- package/plugin/lib/typescript/helpers/utils/injectCIOPodfileCode.d.ts +9 -1
- package/plugin/lib/typescript/helpers/utils/patchLocationCode.d.ts +12 -0
- package/plugin/lib/typescript/helpers/utils/patchPluginNativeCode.d.ts +3 -1
- package/plugin/lib/typescript/index.d.ts +2 -1
- package/plugin/lib/typescript/ios/withCIOIos.d.ts +2 -2
- package/plugin/lib/typescript/ios/withCIOIosSwift.d.ts +2 -2
- package/plugin/lib/typescript/ios/withXcodeProject.d.ts +8 -1
- package/plugin/lib/typescript/types/cio-types.d.ts +28 -0
- package/plugin/src/android/withCIOAndroid.ts +13 -2
- package/plugin/src/android/withLocationGradleProperties.ts +41 -0
- package/plugin/src/android/withMainApplicationModifications.ts +26 -4
- package/plugin/src/helpers/native-files/android/CustomerIOSDKInitializer.kt +2 -0
- package/plugin/src/helpers/native-files/ios/CustomerIOSDKInitializer.swift +2 -0
- package/plugin/src/helpers/utils/injectCIOPodfileCode.ts +35 -3
- package/plugin/src/helpers/utils/patchLocationCode.ts +80 -0
- package/plugin/src/helpers/utils/patchPluginNativeCode.ts +10 -1
- package/plugin/src/index.ts +9 -3
- package/plugin/src/ios/withCIOIos.ts +24 -3
- package/plugin/src/ios/withCIOIosSwift.ts +20 -4
- package/plugin/src/ios/withXcodeProject.ts +20 -3
- package/plugin/src/types/cio-types.ts +30 -0
|
@@ -88,6 +88,13 @@ export type CustomerIOPluginOptionsAndroid = {
|
|
|
88
88
|
disableAndroid16Support?: boolean;
|
|
89
89
|
};
|
|
90
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Location tracking mode for the Customer.io SDK location module.
|
|
93
|
+
* Location is off by default. Only used when location is enabled (plugin option location.enabled: true).
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
export type LocationTrackingMode = 'OFF' | 'MANUAL' | 'ON_APP_START';
|
|
97
|
+
|
|
91
98
|
/**
|
|
92
99
|
* SDK configuration options for auto initialization
|
|
93
100
|
* @public
|
|
@@ -101,6 +108,24 @@ export type NativeSDKConfig = {
|
|
|
101
108
|
logLevel?: 'none' | 'error' | 'info' | 'debug'; // Default: 'debug'. Controls SDK logging verbosity
|
|
102
109
|
siteId?: string; // Optional, if only siteId defined, migrationSiteId = siteId
|
|
103
110
|
migrationSiteId?: string; // Optional, if only migrationSiteId defined, siteId should be null
|
|
111
|
+
/**
|
|
112
|
+
* Location module config. Location is off by default; only applied when plugin option location.enabled is true.
|
|
113
|
+
* trackingMode: 'MANUAL' (host app controls when location is captured, default),
|
|
114
|
+
* 'ON_APP_START' (SDK captures once per launch when app becomes active), or 'OFF'.
|
|
115
|
+
*/
|
|
116
|
+
location?: {
|
|
117
|
+
trackingMode?: LocationTrackingMode;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Location is off by default. When true, enables the Customer.io SDK location native module (iOS Podfile location subspec,
|
|
123
|
+
* Android gradle.properties flag). Permissions and privacy keys (Info.plist, AndroidManifest)
|
|
124
|
+
* remain the host app's responsibility.
|
|
125
|
+
* @public
|
|
126
|
+
*/
|
|
127
|
+
export type CustomerIOPluginLocationOptions = {
|
|
128
|
+
enabled?: boolean;
|
|
104
129
|
};
|
|
105
130
|
|
|
106
131
|
/**
|
|
@@ -111,6 +136,11 @@ export type CustomerIOPluginOptions = {
|
|
|
111
136
|
config?: NativeSDKConfig; // If defined, enables auto initialization of native SDK
|
|
112
137
|
android: CustomerIOPluginOptionsAndroid;
|
|
113
138
|
ios: CustomerIOPluginOptionsIOS;
|
|
139
|
+
/**
|
|
140
|
+
* Location is off by default. When location.enabled is true, the plugin adds SDK build-time setup (Podfile location subspec,
|
|
141
|
+
* gradle.properties). Host apps must add their own location permissions and privacy usage strings.
|
|
142
|
+
*/
|
|
143
|
+
location?: CustomerIOPluginLocationOptions;
|
|
114
144
|
};
|
|
115
145
|
|
|
116
146
|
/**
|