Skip to content

Conversation

@nishant-clevertap
Copy link
Contributor

@nishant-clevertap nishant-clevertap commented Oct 31, 2025

  • Adds support for Gif in Basic, Timer, Rating and Zero Bezel template

Note

Adds GIF rendering to notification templates using SDWebImage, introducing new pt_gif (and pt_gif_alt) fields with graceful fallback to static images.

  • GIF Support (SDWebImage):
    • Integrate SDWebImage (podspec dependency) and vendor framework; switch image views to SDAnimatedImageView where needed.
    • CTCaptionedImageView: new isGifSupported flag; uses sd_setImage for GIFs, existing loader for static images.
  • Templates Updated:
    • Carousel (Basic): load pt_gif when available; fallback to pt_big_img/product images; keep manual/auto carousel static images as before.
    • Timer: pre-expiry load pt_gif; post-expiry supports pt_gif_alt; fallbacks to image variants; accessibility labels maintained.
    • Rating: load pt_gif or fallback to pt_big_img.
    • Zero Bezel: load pt_gif or fallback to pt_big_img.
    • Content Slider/Single Media: instantiate captioned views with isGifSupported: false (no change in behavior).
  • Models:
    • Add pt_gif to CarouselProperties, RatingProperties, ZeroBezelProperties.
    • Add pt_gif, pt_gif_alt (and related alt-text fields) to TimerTemplateProperties.
  • Misc:
    • Add example Xcode scheme (CTNotificationContentExample.xcscheme).

Written by Cursor Bugbot for commit ecc47f2. This will update automatically on new commits. Configure here.

@francispereira
Copy link

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

}
}
} else {
self.showAltImageView()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Bug

The alternative GIF loading path inconsistently pre-validates GIF URLs using CTUtiltiy.checkImageUrlValid before sd_setImage. This utility may not correctly handle GIFs, potentially rejecting valid URLs and causing unnecessary fallback to regular images. This pre-validation is also redundant, as sd_setImage includes its own error handling.

Fix in Cursor Fix in Web

Copy link
Contributor

@akashvercetti akashvercetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The xcodeproj isnt building cuz SDWebImage isn't included in the libraries section with the "do not embed" flag. Manual integration and xcframework generation will fail

@akashvercetti
Copy link
Contributor

@nishant-clevertap I think the command pod lib lint would fail since it would build the xcodeproj first and that doesn't build since SDWebImage isn't included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants