diff --git a/CleverTapSDK/CleverTapJSInterface.m b/CleverTapSDK/CleverTapJSInterface.m index 4609998e..47aa13b0 100644 --- a/CleverTapSDK/CleverTapJSInterface.m +++ b/CleverTapSDK/CleverTapJSInterface.m @@ -9,6 +9,7 @@ #import "CTInAppDisplayViewController.h" #import "CleverTapBuildInfo.h" +#import "CleverTap+PushPermission.h" @interface CleverTapJSInterface (){} @@ -87,6 +88,11 @@ - (void)handleMessageFromWebview:(NSDictionary *)message forInsta [cleverTap profileDecrementValueBy: message[@"value"] forKey: message[@"key"]]; } else if ([action isEqual: @"triggerInAppAction"]) { [self triggerInAppAction:message[@"actionJson"] callToAction:message[@"callToAction"] buttonId:message[@"buttonId"]]; + } else if ([action isEqual: @"promptForPushPermission"]) { + if (self.controller) { + [self.controller hide:NO]; + } + [cleverTap promptForPushPermission:message[@"showFallbackSettings"]]; } } diff --git a/ObjCStarter/ObjCStarter/sampleHTMLCode.html b/ObjCStarter/ObjCStarter/sampleHTMLCode.html index 906d9f27..9bf98cd9 100755 --- a/ObjCStarter/ObjCStarter/sampleHTMLCode.html +++ b/ObjCStarter/ObjCStarter/sampleHTMLCode.html @@ -24,6 +24,8 @@

CleverTap Webview



+ +

diff --git a/SwiftStarter/SwiftStarter/Supporting Files/sampleHTMLCode.html b/SwiftStarter/SwiftStarter/Supporting Files/sampleHTMLCode.html index 935a0b1f..a4839ae1 100644 --- a/SwiftStarter/SwiftStarter/Supporting Files/sampleHTMLCode.html +++ b/SwiftStarter/SwiftStarter/Supporting Files/sampleHTMLCode.html @@ -24,6 +24,8 @@

CleverTap Webview



+ +