Skip to content

Release v3.3.1 #308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 18, 2025
Merged

Release v3.3.1 #308

merged 9 commits into from
Apr 18, 2025

Conversation

nishant-clevertap
Copy link
Contributor

@nishant-clevertap nishant-clevertap commented Apr 18, 2025

What's new

Bug Fixes

  • [iOS Platform]
    • Fixes app freezing issue when using await with defineVariables().
    • Fixes custom in-app device orientation check.

Summary by CodeRabbit

  • New Features

    • Added support for CleverTap iOS SDK v7.1.1.
    • Introduced a new action to dismiss custom HTML in-app notifications on iOS.
  • Bug Fixes

    • Resolved app freezing issue when using await with variable definitions on iOS.
    • Fixed device orientation check for custom in-app notifications on iOS.
    • Fixed image rendering issue in push templates on Android with custom FCM integration.
  • Improvements

    • Enhanced Android notification rendering to run asynchronously off the main thread, improving performance and stability.
  • Documentation

    • Updated changelog and README to reflect version 3.3.1 and new features.

Copy link

coderabbitai bot commented Apr 18, 2025

Walkthrough

This update increments the CleverTap Flutter plugin version to 3.3.1, reflecting compatibility with CleverTap iOS SDK v7.1.1. The changelog and documentation are updated accordingly. iOS platform-specific bug fixes are applied to the defineVariables and defineFileVariable methods to ensure proper result callback handling. A new action, dismissInAppNotification, is introduced for dismissing custom HTML in-app notifications on iOS. The Android platform fixes an issue with image rendering in push templates using custom FCM integration and refactors notification rendering to improve thread handling by offloading processing from the main thread. The version constants and dependency specifications are updated across relevant configuration files.

Changes

File(s) Change Summary
CHANGELOG.md, pubspec.yaml, ios/clevertap_plugin.podspec, README.md, android/build.gradle Updated plugin version from 3.3.0 to 3.3.1; updated CleverTap iOS SDK dependency to v7.1.1; updated version strings.
lib/clevertap_plugin.dart Incremented CleverTapPlugin.libVersion constant from 30300 to 30301.
ios/Classes/CleverTapPlugin.m Improved result callback handling in defineVariables and defineFileVariable methods; fixed early return logic.
android/src/main/java/com/clevertap/clevertap_plugin/DartToNativePlatformCommunicator.kt Refactored renderNotification to check thread and offload processing to a background executor if on main thread; added private executor for notification processing; improved error handling and concurrency.

Sequence Diagram(s)

sequenceDiagram
    participant App
    participant CleverTapPlugin (Dart)
    participant CleverTapPlugin (iOS)
    participant CleverTap SDK

    App->>CleverTapPlugin (Dart): defineVariables(variables)
    CleverTapPlugin (Dart)->>CleverTapPlugin (iOS): defineVariables(variables)
    alt variables nil or empty
        CleverTapPlugin (iOS)->>CleverTapPlugin (Dart): result(nil)
    else variables present
        CleverTapPlugin (iOS)->>CleverTap SDK: define variable(s)
        CleverTapPlugin (iOS)->>CleverTapPlugin (Dart): result(nil)
    end
Loading
sequenceDiagram
    participant Dart
    participant Native Android
    participant Executor (Background Thread)

    Dart->>Native Android: renderNotification(extras)
    alt cleverTapAPI is null
        Native Android->>Dart: error("CleverTap API is null")
    else cleverTapAPI not null
        alt on main thread
            Native Android->>Executor: execute processNotification(extras)
            Executor->>Native Android: process notification
            Native Android->>Dart: success or error
        else not main thread
            Native Android->>Native Android: processNotification(extras)
            Native Android->>Dart: success or error
        end
    end
Loading

Suggested reviewers

  • nishant-clevertap
  • CTLalit

Poem

Hop, hop, hooray, a new version is here,
Bugs in iOS vanish, the changelog is clear!
With CleverTap's magic, notifications dismiss,
And Android threads dance without a miss.
From 3.3.0 to 3.3.1 we leap,
A hop in the code, a promise we keep!
🐇✨

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
CHANGELOG.md (1)

7-8: Refine wording for clarity
Consider revising the "What's new" entry for consistency:

- * Adds `dismissInAppNotification` action to dismiss custom HTML in-Apps
+ * Adds `dismissInAppNotification` action to dismiss custom HTML in-app notifications
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3dabac5 and ed5c9f8.

📒 Files selected for processing (6)
  • CHANGELOG.md (1 hunks)
  • README.md (1 hunks)
  • ios/Classes/CleverTapPlugin.m (1 hunks)
  • ios/clevertap_plugin.podspec (2 hunks)
  • lib/clevertap_plugin.dart (1 hunks)
  • pubspec.yaml (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
CHANGELOG.md

3-3: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)


5-5: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


10-10: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)

🔇 Additional comments (9)
README.md (1)

24-24: Version bump in README
The version snippet in the quick start section has been correctly updated to 3.3.1, matching the release.

pubspec.yaml (1)

3-3: Package version updated
The pubspec.yaml version has been bumped to 3.3.1 in line with the new release.

ios/clevertap_plugin.podspec (2)

6-6: Podspec version bumped
The podspec version is correctly updated to 3.3.1.


16-16: iOS SDK dependency updated
The CleverTap-iOS-SDK dependency is correctly set to version 7.1.1.

lib/clevertap_plugin.dart (2)

76-78: Library version constant updated
The libVersion constant has been incremented from 30300 to 30301, aligning with the 3.3.1 release.


76-140: Inconsistent summary: missing API for dismissInAppNotification
The PR summary mentions a new action dismissInAppNotification, but I don't see a corresponding Dart wrapper method in this file. Please verify whether the Dart API for dismissing custom HTML in-app notifications has been implemented or if it needs to be added.

Likely an incorrect or invalid review comment.

CHANGELOG.md (1)

10-13: Bug fixes description is accurate
The fixes for the freezing issue with defineVariables() and the custom in-app orientation check are clearly described and match the PR objectives.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

10-10: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)

ios/Classes/CleverTapPlugin.m (2)

1475-1478: Proper nil check and result callback for empty variables

This is a good fix for preventing app freezing when passing nil or empty variables. It ensures that the result callback is properly called before returning from the method when there's nothing to process.


1493-1499: Proper result callback handling for file variables

This change ensures that the result callback is always called, even when the fileVariable is nil or when processing is complete. This properly fixes the freezing issue when using await with this method.

* task(SDK-4506) - Moves renderNotification to an executor thread
- The core SDK API expected to be called only on a worker thread
- This ensures the images are downloaded correctly

* task(SDK-4506) - Resolves PR comments

* task(SDK-4506) - Adds changelog and bumps versions
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
CHANGELOG.md (4)

3-4: Consider using ATX-style headings for version entries
The current setext-style underline for version headings triggers markdownlint (MD003). For consistency and better readability, you could rewrite this as:

- Version 3.3.1 *(18 April 2025)*
- -------------------------------------------
+ ### Version 3.3.1 (18 April 2025)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

3-3: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)


5-5: Use heading syntax instead of emphasis for section titles
Markdownlint flags (MD036) on using emphasis (**What's new**) as a heading. Consider converting to a heading, e.g.:

- **What's new**
+ #### What's new
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

5-5: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


6-8: Verify in-app casing consistency
The entry mentions “custom HTML in‑Apps” (line 8) with mixed casing. To maintain consistency with other changelog entries (e.g., “in-apps” or “InApps”), choose one style, for example:

- * Adds `dismissInAppNotification` action to dismiss custom HTML in‑Apps
+ * Adds `dismissInAppNotification` action to dismiss custom HTML in‑apps

10-11: Use heading syntax instead of emphasis for section titles
Similarly to the “What’s new” section, the “Bug Fixes” title is marked as emphasis. Using a proper heading (e.g., #### Bug Fixes) will improve consistency and satisfy markdownlint (MD036).

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

10-10: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 739c475 and 796683a.

📒 Files selected for processing (1)
  • CHANGELOG.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
CHANGELOG.md

3-3: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)


5-5: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


10-10: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)

🔇 Additional comments (2)
CHANGELOG.md (2)

11-12: [Android] Bug fix description matches PR objectives
The Android bug fix correctly documents the rendering issue in push templates when using a custom FCM integration.


14-16: [iOS] Bug fix entries accurately reflect fixes
The two iOS fixes (app freezing with defineVariables() and custom in‑app orientation check) match the PR description.

@nishant-clevertap nishant-clevertap merged commit 121d702 into master Apr 18, 2025
1 check passed
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