CleverTap / CTNotificationContent

A Notification Content Extension class to display custom content interfaces for iOS 10 push notifications
MIT License
14 stars 7 forks source link

carosel rich notification is not working #32

Closed numandev1 closed 1 year ago

numandev1 commented 1 year ago

i am integrating rich push notification into my react native app, single image rich notification is working but carousel rich notification is not working

Carosel Single Image

i am using same swift example code for NotificationService and NotificationContent in my project https://github.com/CleverTap/CTNotificationContent/tree/master/ExampleSwift/NotificationContent, using same info.plist, appDelegate.mm and MainInterface.storyboard

Screenshot 2023-08-01 at 4 48 46 PM

where can be the issue?

numandev1 commented 1 year ago

@Aditi3 @akashvercetti @AishwaryaNanna i need your help?

nishant-clevertap commented 1 year ago

Hi @numandev1 Have you added any category in category section in case of carousel ?

numandev1 commented 1 year ago

@nishant-clevertap which category section? can you explain it?

nishant-clevertap commented 1 year ago

@numandev1 There is category section in dashboard :

Screenshot 2023-08-02 at 6 23 30 PM

Also you can add custom buttons as added in our sample app: https://github.com/CleverTap/CTNotificationContent/blob/master/Example/CTNotificationContentExample/AppDelegate.m#L40

Do let us know if adding category works or not?

numandev1 commented 1 year ago

@nishant-clevertap after adding the category, I am getting buttons but not images

https://github.com/CleverTap/CTNotificationContent/assets/36044436/a0087115-c916-42d4-9b24-c65f25130b68

nishant-clevertap commented 1 year ago

@numandev1 We have tested this in our latest CTNotificationContent SDK version and it is working fine. Which version you are using for CTNotificationContent? Also can you check one target settings in Xcode which might be reason for this. Steps:

  1. Go to NotificationContent target which you are using.
  2. Click on General -> Framework and Libraries and check if UserNotifications and UserNotificationsUI is present or not. If not add them and rebuild. Screenshot 2023-08-02 at 6 57 51 PM
numandev1 commented 1 year ago

@nishant-clevertap I am using the latest versions and seems the correct frameworks and libraries

- CTNotificationContent (0.2.4)
- CTNotificationService (0.1.5)

Screenshot 2023-08-02 at 6 36 39 PM

nishant-clevertap commented 1 year ago

@numandev1 we have to debug this to know the exact reason. Can you share the console enabled logs while running the Notification Content target with log enabled as CleverTap.setDebugLevel(2); in viewDidLoad method?

Meanwhile try running our sample app after updating with your account id and bundle id and see if it is working fine or not.

numandev1 commented 1 year ago

@nishant-clevertap Here are the logs of Notification Content target

2023-08-03 16:57:01.468847+0500 NotificationContent[53956:6302469] [CleverTap]: Initializing default CleverTap SDK instance. CleverTapAccountID: TEST-KK8-8R7-846Z CleverTapToken: TEST-a2b-b33 CleverTapRegion: default CleverTapProxyDomain:  CleverTapSpikyProxyDomain:
2023-08-03 16:57:01.519169+0500 NotificationContent[53956:6302469] [CleverTap]: CleverTap IDFV usage enabled
test notification content
2023-08-03 16:57:02.195362+0500 NotificationContent[53956:6302843] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: processing response with headers:<CFBasicHash 0x2836f4280 [0x1fc2f3ec8]>{type = immutable dict, count = 15,
entries =>
    0 : Content-Type = <CFString 0x282df9b00 [0x1fc2f3ec8]>{contents = "text/javascript;charset=utf-8"}
    1 : X-Amz-Cf-Id = <CFString 0x2800e8230 [0x1fc2f3ec8]>{contents = "14ocTMfkUhMnswLkb7S4iK8NxYrJ1Ld1qgne_pXV8uWVERLh36I1gg=="}
    2 : Pragma = no-cache
    3 : X-Frame-Options = <CFString 0x2823e8100 [0x1fc2f3ec8]>{contents = "SAMEORIGIN"}
    5 : Content-Encoding = gzip
    6 : Via = <CFString 0x2807f0060 [0x1fc2f3ec8]>{contents = "1.1 eb12003726ff182fd7044ecb6ecd4f06.cloudfront.net (CloudFront)"}
    7 : X-Amz-Cf-Pop = DXB52-P1
    8 : Expires = 0
    9 : Transfer-Encoding = <CFString 0x1fb940b80 [0x1fc2f3ec8]>{contents = "Identity"}
    12 : Cache-Control = <CFString 0x2823f44a0 [0x1fc2f3ec8]>{contents = "no-cache, no-store, no-cache, no-store"}
    13 : Date = <CFString 0x282df9560 [0x1fc2f3ec8]>{contents = "Thu, 03 Aug 2023 11:57:02 GMT"}
    15 : Strict-Transport-Security = <CFString 0x2836e8300 [0x1fc2f3ec8]>{contents = "max-age=31536000;includeSubDomains;preload"}
    17 : Connection = <CFString 0x2823e8200 [0x1fc2f3ec8]>{contents = "keep-alive"}
    21 : Vary = <CFString 0x282df9e30 [0x1fc2f3ec8]>{contents = "Accept-Encoding, User-Agent"}
    22 : X-Cache = <CFString 0x282df9e60 [0x1fc2f3ec8]>{contents = "Miss from cloudfront"}
}
2023-08-03 16:57:02.196491+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: Response: {
    arp =     {
        av = "1.0";
        "d_ts" = 0;
        dh = 0;
        "e_ts" = 0;
        hgt = "5.68";
        "i_n" = "bmpieQU=";
        id = "KK8-8R7-846Z";
        "j_n" = "Y2pieAQ=";
        "j_s" = "{ }";
        "r_ts" = 1691063822;
        sv = 40202;
        v = 1;
        wdt = "2.63";
    };
    imc = 1;
    imp = 10;
}
2023-08-03 16:57:02.197207+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: Getting ARP: {
    av = "1.0";
    "d_e" =     (
    );
    "d_ts" = 0;
    dh = 0;
    "e_ts" = 0;
    hgt = "5.68";
    "i_n" = "bmpieQU=";
    id = "KK8-8R7-846Z";
    "j_n" = "Y2pieAQ=";
    "j_s" = "{ }";
    "r_ts" = 1691049600;
    sv = 40202;
    v = 1;
    wdt = "2.63";
} for key: arp:TEST-KK8-8R7-846Z:-v5236062c6eff454aa756b515ade8ae90
2023-08-03 16:57:02.197610+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: Saving ARP: {
    av = "1.0";
    "d_e" =     (
    );
    "d_ts" = 0;
    dh = 0;
    "e_ts" = 0;
    hgt = "5.68";
    "i_n" = "bmpieQU=";
    id = "KK8-8R7-846Z";
    "j_n" = "Y2pieAQ=";
    "j_s" = "{ }";
    "r_ts" = 1691063822;
    sv = 40202;
    v = 1;
    wdt = "2.63";
} for key: arp:TEST-KK8-8R7-846Z:-v5236062c6eff454aa756b515ade8ae90
2023-08-03 16:57:02.198982+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: parseResponse completed successfully
2023-08-03 16:57:02.200403+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: Successfully sent 1 events
2023-08-03 16:57:02.200545+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: No events in the queue
2023-08-03 16:57:02.201357+0500 NotificationContent[53956:6302822] [CleverTap]: CTPreferences file not found /var/mobile/Containers/Data/PluginKitPlugin/57FFFADF-B164-4002-9E92-F4730F9CD51A/Library/clevertap-TEST-KK8-8R7-846Z--v5236062c6eff454aa756b515ade8ae90-product-config.plist
2023-08-03 16:57:02.201614+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: updating session time: 1691063822
2023-08-03 16:57:02.202664+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: New event processed: {"pai":"com.ananinja.dev.NotificationContent","n":"_bg","evtName":"App Launched","dsync":true,"pg":1,"evtData":{"Make":"Apple","wdt":"2.63","OS Version":"16.6","Version":"1.0","Build":"1","Model":"iPhone14,3","ifv":"5236062c6eff454aa756b515ade8ae90","LIAMC":0,"ifaA":false,"cc":"--","SDK Version":40202,"useIP":false,"OS":"iOS","hgt":"5.68","Carrier":"--"},"ep":1691063822,"type":"event","lsl":0,"s":1691063821,"f":false}
2023-08-03 16:57:02.202762+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: scheduling delayed queue flush
2023-08-03 16:57:03.204223+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: No events in the queue
2023-08-03 16:57:03.205144+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: APNS Push Token not found
2023-08-03 16:57:03.205743+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: Getting ARP: {
    av = "1.0";
    "d_e" =     (
    );
    "d_ts" = 0;
    dh = 0;
    "e_ts" = 0;
    hgt = "5.68";
    "i_n" = "bmpieQU=";
    id = "KK8-8R7-846Z";
    "j_n" = "Y2pieAQ=";
    "j_s" = "{ }";
    "r_ts" = 1691063822;
    sv = 40202;
    v = 1;
    wdt = "2.63";
} for key: arp:TEST-KK8-8R7-846Z:-v5236062c6eff454aa756b515ade8ae90
2023-08-03 16:57:03.206015+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: Pending events to be sent: 1 in 1 batches
2023-08-03 16:57:03.206193+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: Pending events batch contains: 1 items
2023-08-03 16:57:03.206558+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: Sending [{"id":"TEST-KK8-8R7-846Z","imp":0,"tk":"TEST-a2b-b33","frs":false,"tlc":[],"type":"meta","af":{"Make":"Apple","wdt":"2.63","OS Version":"16.6","Version":"1.0","Build":"1","Model":"iPhone14,3","ifv":"5236062c6eff454aa756b515ade8ae90","LIAMC":0,"ifaA":false,"cc":"--","SDK Version":40202,"useIP":false,"OS":"iOS","hgt":"5.68","Carrier":"--"},"ddnd":1,"arp":{"id":"KK8-8R7-846Z","wdt":2.6299999999999999,"i_n":"bmpieQU=","d_ts":0,"d_e":[],"j_s":"{ }","r_ts":1691063822,"j_n":"Y2pieAQ=","dh":0,"sv":40202,"e_ts":0,"hgt":5.6799999999999997,"v":1,"av":"1.0"},"l_ts":0,"f_ts":1690981608,"g":"-v5236062c6eff454aa756b515ade8ae90"},{"pai":"com.ananinja.dev.NotificationContent","n":"_bg","evtName":"App Launched","dsync":true,"pg":1,"evtData":{"Make":"Apple","wdt":"2.63","OS Version":"16.6","Version":"1.0","Build":"1","Model":"iPhone14,3","ifv":"5236062c6eff454aa756b515ade8ae90","LIAMC":0,"ifaA":false,"cc":"--","SDK Version":40202,"useIP":false,"OS":"iOS","hgt":"5.68","Carrier":"--"},"ep":1691063822,"type":"event","lsl":0,"s":1691063821,"f":false}] to servers at https://eu1.clevertap-prod.com/a1?os=iOS&t=40202&z=TEST-KK8-8R7-846Z&ts=1691063823
2023-08-03 16:57:03.387505+0500 NotificationContent[53956:6302828] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: processing response with headers:<CFBasicHash 0x2836e8d00 [0x1fc2f3ec8]>{type = immutable dict, count = 15,
entries =>
    0 : Content-Type = <CFString 0x282df0a50 [0x1fc2f3ec8]>{contents = "text/javascript;charset=utf-8"}
    1 : X-Amz-Cf-Id = <CFString 0x2800d0000 [0x1fc2f3ec8]>{contents = "tmN1VRrQ35bNcnpo4biCtxSw_tgI3-ZuP0YToW5vseSqSBrf9XGMDg=="}
    2 : Pragma = no-cache
    3 : X-Frame-Options = <CFString 0x2823f0420 [0x1fc2f3ec8]>{contents = "SAMEORIGIN"}
    5 : Content-Encoding = gzip
    6 : Via = <CFString 0x2807ec2a0 [0x1fc2f3ec8]>{contents = "1.1 eb12003726ff182fd7044ecb6ecd4f06.cloudfront.net (CloudFront)"}
    7 : X-Amz-Cf-Pop = DXB52-P1
    8 : Expires = 0
    9 : Transfer-Encoding = <CFString 0x1fb940b80 [0x1fc2f3ec8]>{contents = "Identity"}
    12 : Cache-Control = <CFString 0x2823e85e0 [0x1fc2f3ec8]>{contents = "no-cache, no-store, no-cache, no-store"}
    13 : Date = <CFString 0x282df3cc0 [0x1fc2f3ec8]>{contents = "Thu, 03 Aug 2023 11:57:03 GMT"}
    15 : Strict-Transport-Security = <CFString 0x2836fa400 [0x1fc2f3ec8]>{contents = "max-age=31536000;includeSubDomains;preload"}
    17 : Connection = <CFString 0x2823f0400 [0x1fc2f3ec8]>{contents = "keep-alive"}
    21 : Vary = <CFString 0x282df0570 [0x1fc2f3ec8]>{contents = "Accept-Encoding, User-Agent"}
    22 : X-Cache = <CFString 0x282df3b40 [0x1fc2f3ec8]>{contents = "Miss from cloudfront"}
}
2023-08-03 16:57:03.387918+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: Response: {
    arp =     {
        av = "1.0";
        "d_ts" = 0;
        dh = 0;
        "e_ts" = 0;
        hgt = "5.68";
        "i_n" = "bmpieQU=";
        id = "KK8-8R7-846Z";
        "j_n" = "Y2pieAQ=";
        "j_s" = "{ }";
        "r_ts" = 1691063823;
        sv = 40202;
        v = 1;
        wdt = "2.63";
    };
    imc = 1;
    imp = 10;
}
2023-08-03 16:57:03.388238+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: Getting ARP: {
    av = "1.0";
    "d_e" =     (
    );
    "d_ts" = 0;
    dh = 0;
    "e_ts" = 0;
    hgt = "5.68";
    "i_n" = "bmpieQU=";
    id = "KK8-8R7-846Z";
    "j_n" = "Y2pieAQ=";
    "j_s" = "{ }";
    "r_ts" = 1691063822;
    sv = 40202;
    v = 1;
    wdt = "2.63";
} for key: arp:TEST-KK8-8R7-846Z:-v5236062c6eff454aa756b515ade8ae90
2023-08-03 16:57:03.388433+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: Saving ARP: {
    av = "1.0";
    "d_e" =     (
    );
    "d_ts" = 0;
    dh = 0;
    "e_ts" = 0;
    hgt = "5.68";
    "i_n" = "bmpieQU=";
    id = "KK8-8R7-846Z";
    "j_n" = "Y2pieAQ=";
    "j_s" = "{ }";
    "r_ts" = 1691063823;
    sv = 40202;
    v = 1;
    wdt = "2.63";
} for key: arp:TEST-KK8-8R7-846Z:-v5236062c6eff454aa756b515ade8ae90
2023-08-03 16:57:03.389177+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: parseResponse completed successfully
2023-08-03 16:57:03.389731+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: Successfully sent 1 events
2023-08-03 16:57:03.389787+0500 NotificationContent[53956:6302822] [CleverTap]: CleverTap.TEST-KK8-8R7-846Z: No events in the queue
numandev1 commented 1 year ago

https://github.com/CleverTap/CTNotificationContent/assets/36044436/4f9027a9-540b-4074-b644-9a96ecf2720e

example app is giving same behaviour like my app

numandev1 commented 1 year ago

@nishant-clevertap i just run swiftExample https://github.com/CleverTap/CTNotificationContent/tree/master/ExampleSwift app and getting same behaviour

numandev1 commented 1 year ago

@nishant-clevertap if i upload image from URL then it is working fine but if i upload image from my side in carousel then it is not working, can you check?

numandev1 commented 1 year ago

@nishant-clevertap i am using this in react native, i am getting one issue

how can I fix deep linking when I open a notification when the app is in a kill state?

numandev1 commented 1 year ago

@Aditi3 @akashvercetti @AishwaryaNanna @nishant-clevertap is there any chance to help related notification deep linking while the app is in kill state for react native app

nishant-clevertap commented 1 year ago

Hi @numandev1,

  1. For image not rendering when you do upload please do send us the image which you are trying, we will test this at our end and will let you know.

  2. For React Native deeplink in killed state issue, kindly raise a support ticket on our dashboard or create a new issue in our React Native SDK with the detailed information of type of deeplink, versions of SDKs along with the payload you are testing on.

numandev1 commented 1 year ago

1- for the rendering issue, it is working for a single image but not working for the carousel

png-transparent-js-react-js-logo-react-react-native-logos-icon-thumbnail-removebg-preview rnkeys

2- i will make a ticket on dashboard

nishant-clevertap commented 1 year ago

Hi @numandev1, The 2nd image which you have shared exceeds 40KB so it will not gets uploaded, and with the 1st image it is rendering by upload also. Please do check the supported format of image as mentioned here:

Screenshot 2023-08-21 at 12 43 45 PM

Also you can use image url to render the image successfully.

Closing this ticket since it is resolved now, feel free to reopen if having any issue.