reactnative-plugin-appice 1.7.36 → 1.7.38
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/android/build.gradle +1 -1
- package/campaign.js +4 -6
- package/example/App.js +5 -1
- package/ios/AppIceReactPlugin.m +3 -1
- package/package.json +1 -1
- package/reactnative-plugin-appice.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -97,7 +97,7 @@ dependencies {
|
|
|
97
97
|
annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.3.1"
|
|
98
98
|
|
|
99
99
|
//appice
|
|
100
|
-
implementation "appice.io.android:sdk:2.6.
|
|
100
|
+
implementation "appice.io.android:sdk:2.6.36"
|
|
101
101
|
|
|
102
102
|
//glide
|
|
103
103
|
implementation "com.github.bumptech.glide:glide:4.11.0"
|
package/campaign.js
CHANGED
|
@@ -15,11 +15,8 @@ const handleClickOnPush = async (campaign) => {
|
|
|
15
15
|
if (httpUrls) {
|
|
16
16
|
try {
|
|
17
17
|
if (Platform.OS === 'ios') {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
console.log('URL not supported on iOS:', url);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
18
|
+
return campaign;
|
|
19
|
+
// iOS handle redirection on native side for landing page.
|
|
23
20
|
}
|
|
24
21
|
|
|
25
22
|
await Linking.openURL(url);
|
|
@@ -31,6 +28,7 @@ const handleClickOnPush = async (campaign) => {
|
|
|
31
28
|
|
|
32
29
|
if (actionType === 'dl' && !httpUrls) {
|
|
33
30
|
// handle custom deeplink
|
|
31
|
+
return campaign;
|
|
34
32
|
}
|
|
35
33
|
};
|
|
36
34
|
|
|
@@ -110,4 +108,4 @@ class Campaign {
|
|
|
110
108
|
}
|
|
111
109
|
}
|
|
112
110
|
|
|
113
|
-
export { Campaign, handleClickOnPush };
|
|
111
|
+
export { Campaign, handleClickOnPush };
|
package/example/App.js
CHANGED
|
@@ -98,7 +98,11 @@ function addAppICEAPIListeners() {
|
|
|
98
98
|
|
|
99
99
|
try {
|
|
100
100
|
const campaign = new Campaign(event.AppICEPushNotificationClicked);
|
|
101
|
-
await handleClickOnPush(campaign);
|
|
101
|
+
const result = await handleClickOnPush(campaign);
|
|
102
|
+
if (result) {
|
|
103
|
+
console.log("Returned campaign:", result);
|
|
104
|
+
// Use result here (e.g., for DL handling)
|
|
105
|
+
}
|
|
102
106
|
} catch (error) {
|
|
103
107
|
console.error('Error handling app link:', error);
|
|
104
108
|
}
|
package/ios/AppIceReactPlugin.m
CHANGED
|
@@ -185,7 +185,9 @@ RCT_EXPORT_METHOD(getUserId:(RCTResponseSenderBlock)callback)
|
|
|
185
185
|
|
|
186
186
|
RCT_EXPORT_METHOD(pushNotificationClicked:(NSDictionary*)userInfo)
|
|
187
187
|
{
|
|
188
|
-
|
|
188
|
+
/**Removed this as PushClicked Event is getting triggred twice**/
|
|
189
|
+
//[[appICE sharedInstance] pushNotificationClickedEvent:userInfo];
|
|
190
|
+
|
|
189
191
|
}
|
|
190
192
|
|
|
191
193
|
RCT_EXPORT_METHOD(setUser:(NSDictionary*)userProfile)
|
package/package.json
CHANGED