Skip to content

Commit d773ca1

Browse files
authored
Web SDK Release v2.2.2 (#473)
2 parents 6d8ab39 + ea85722 commit d773ca1

File tree

6 files changed

+13
-8
lines changed

6 files changed

+13
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## [2.2.2] 9th Sept 2025
5+
- Fixed handling of safari web push notifications in iPhone.
6+
47
## [2.2.1] 1st Sept 2025
58
- Added handling for close icon in web popup image only template.
69

clevertap.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11866,7 +11866,8 @@
1186611866
} else {
1186711867
if (isSafari()) {
1186811868
// This is for migration case for safari from apns to vapid, show popup even when timer is not expired.
11869-
if (vapidSupportedAndMigrated || fcmPublicKey === null) {
11869+
// If PushManager is not available then return
11870+
if (vapidSupportedAndMigrated || fcmPublicKey === null || !('PushManager' in window)) {
1187011871
return;
1187111872
}
1187211873

@@ -13848,7 +13849,7 @@
1384813849
case WVE_QUERY_PARAMS.SDK_CHECK:
1384913850
if (parentWindow) {
1385013851
logger.debug('SDK version check');
13851-
const sdkVersion = '2.2.1';
13852+
const sdkVersion = '2.2.2';
1385213853
parentWindow.postMessage({
1385313854
message: 'SDKVersion',
1385413855
accountId,
@@ -16327,7 +16328,7 @@
1632716328
let proto = document.location.protocol;
1632816329
proto = proto.replace(':', '');
1632916330
dataObject.af = { ...dataObject.af,
16330-
lib: 'web-sdk-v2.2.1',
16331+
lib: 'web-sdk-v2.2.2',
1633116332
protocol: proto,
1633216333
...$ct.flutterVersion
1633316334
}; // app fields
@@ -18249,7 +18250,7 @@
1824918250
}
1825018251

1825118252
getSDKVersion() {
18252-
return 'web-sdk-v2.2.1';
18253+
return 'web-sdk-v2.2.2';
1825318254
}
1825418255

1825518256
defineVariable(name, defaultValue) {

clevertap.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clevertap.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "clevertap-web-sdk",
3-
"version": "2.2.1",
3+
"version": "2.2.2",
44
"description": "",
55
"main": "clevertap.js",
66
"scripts": {

src/modules/webPushPrompt/prompt.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ export const createNotificationBox = (configData, fcmPublicKey, okCallback, subs
237237
} else {
238238
if (isSafari()) {
239239
// This is for migration case for safari from apns to vapid, show popup even when timer is not expired.
240-
if (vapidSupportedAndMigrated || fcmPublicKey === null) {
240+
// If PushManager is not available then return
241+
if (vapidSupportedAndMigrated || fcmPublicKey === null || !('PushManager' in window)) {
241242
return
242243
}
243244
if (!configData.isPreview) {

0 commit comments

Comments
 (0)