-
Notifications
You must be signed in to change notification settings - Fork 4
Release 5.4.0 #230
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
Release 5.4.0 #230
Conversation
* Unity 2021 - using System.Text; - added
* String Json parsing added in binding.
…Variables Update CleverTapUnityPlugin.java - String Json parsing added in binding.
…y-Integration Update UnityNativeRequest.cs
Version 5.4.0 - Improved JSON Handling: Platform string variables that contain JSON data are now correctly detected and returned as proper JSON objects instead of plain quoted strings. - Unity 2021 Compatibility in UnityNativeRequest: Added support for Unity 2021* by including the required using System.Text; directive. - Updated to [CleverTap Android SDK v7.7.0](https://github.com/CleverTap/clevertap-android-sdk/releases/tag/corev7.7.0) - Updated to [CleverTap iOS SDK v7.4.0](https://github.com/CleverTap/clevertap-ios-sdk/releases/tag/7.4.0)
Release 5.4.0
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
WalkthroughCleverTap Unity SDK updated from version 5.3.7 to 5.4.0 with dependencies bumped to Android SDK 7.7.0 and iOS SDK 7.4.0. Adds JSON string detection in platform variables, conditionally includes System.Text for Unity 2021 compatibility, and updates all version metadata across build configuration and package files. Changes
Sequence DiagramsequenceDiagram
participant Caller as Platform/Caller
participant GetVar as getVariableValue()
participant TryParse as tryParseJson()
participant Return as Return Value
Caller->>GetVar: getVariableValue(stringValue)
alt String Value
GetVar->>TryParse: tryParseJson(stringValue)
alt Valid JSON
TryParse-->>GetVar: Parsed JSON Object
GetVar-->>Return: Return parsed JSON
else Non-JSON String
TryParse-->>GetVar: null
GetVar-->>Return: Return quoted string
end
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this 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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
CHANGELOG.md(1 hunks)CleverTap/Plugins/Android/clevertap-android-wrapper.androidlib/build.gradle(2 hunks)CleverTap/Plugins/Android/clevertap-android-wrapper.androidlib/src/main/java/com/clevertap/unity/CleverTapUnityPlugin.java(2 hunks)CleverTap/Plugins/Editor/CleverTapDependencies.xml(1 hunks)CleverTap/Runtime/Constants/CleverTapVersion.cs(1 hunks)CleverTap/Runtime/Native/UnityNativeWrapper/Models/UnityNativeRequest.cs(1 hunks)CleverTap/package.json(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: nzagorchev
Repo: CleverTap/clevertap-unity-sdk PR: 192
File: CTExample/Assets/Editor/IOSPushNotificationsPostBuildProcessor.cs:147-164
Timestamp: 2025-06-20T15:56:59.454Z
Learning: In CTExample/Assets/Editor/IOSPushNotificationsPostBuildProcessor.cs, the GetCleverTapIOSSDKVersion method needs to handle multiple CocoaPods dependency formats including simple versions ('7.1.1'), local paths (:path => "../clevertap-ios-sdk"), and git repositories (:git => 'url', :branch => 'develop'). The method should extract the entire dependency specification after the pod name, not just assume a simple version format.
Learnt from: nzagorchev
Repo: CleverTap/clevertap-unity-sdk PR: 178
File: CTExample/Assets/AppInbox/Scripts/AppInbox.cs:24-31
Timestamp: 2025-04-24T15:10:39.004Z
Learning: The OnInboxMessageUpdate callback in the CleverTap Unity SDK is triggered specifically when new inbox messages are added, and should refresh the internal message lists to avoid stale data.
📚 Learning: 2025-06-20T15:56:59.454Z
Learnt from: nzagorchev
Repo: CleverTap/clevertap-unity-sdk PR: 192
File: CTExample/Assets/Editor/IOSPushNotificationsPostBuildProcessor.cs:147-164
Timestamp: 2025-06-20T15:56:59.454Z
Learning: In CTExample/Assets/Editor/IOSPushNotificationsPostBuildProcessor.cs, the GetCleverTapIOSSDKVersion method needs to handle multiple CocoaPods dependency formats including simple versions ('7.1.1'), local paths (:path => "../clevertap-ios-sdk"), and git repositories (:git => 'url', :branch => 'develop'). The method should extract the entire dependency specification after the pod name, not just assume a simple version format.
Applied to files:
CleverTap/Runtime/Constants/CleverTapVersion.csCleverTap/Plugins/Editor/CleverTapDependencies.xml
🔇 Additional comments (9)
CleverTap/package.json (1)
3-3: Version bump to 5.4.0 looks consistent.This aligns with the version updates across CleverTapVersion.cs (SDK version and revision), build.gradle (library version), and the CHANGELOG entry.
CleverTap/Runtime/Native/UnityNativeWrapper/Models/UnityNativeRequest.cs (2)
4-6: Unity 2021 compatibility added correctly.The conditional inclusion of
System.Textfor Unity versions older than 2022.1 is appropriate and enables the use ofEncoding.UTF8.GetBytesin the POST request handler below.
92-102: POST request handling properly supports both Unity 2021 and 2022.1+.The conditional compilation correctly uses the newer
UnityWebRequest.Postoverload for Unity 2022.1+ and falls back to manual construction withUploadHandlerRawfor older versions. The manual approach properly sets the Content-Type header and uses UTF8 encoding.CleverTap/Plugins/Android/clevertap-android-wrapper.androidlib/build.gradle (2)
13-13: Library version bump aligns with release.Updated to 5.4.0, consistent with package.json and CleverTapVersion.cs.
58-58: Let me search for more specific changelog information about what changed in version 7.7.0:Let me search more specifically for version 7.7.0 in package repositories:
Let me search specifically in Maven Central to see the full version list and clarify what versions actually exist:
Version 7.7.0 does not exist; the review comment is based on an incorrect premise.
Official CleverTap documentation and GitHub examples show 7.6.0 as the current recommended version, and Maven Repository lists 101 available versions but version 7.7.0 is not among them. The Android Quick Start Guide references version 7.5.2, and the GitHub releases page does not document any 7.7.0 release. No breaking changes documentation exists for this non-existent version. The review comment cannot be verified as written.
Likely an incorrect or invalid review comment.
CHANGELOG.md (1)
3-9: Changelog entry accurately documents the 5.4.0 release.The entry comprehensively covers all major changes: improved JSON handling, Unity 2021 compatibility, and SDK version updates for both Android (7.7.0) and iOS (7.4.0).
CleverTap/Runtime/Constants/CleverTapVersion.cs (1)
3-4: Version constants updated consistently.Both
CLEVERTAP_SDK_VERSIONandCLEVERTAP_SDK_REVISIONare correctly updated to reflect version 5.4.0, maintaining the expected relationship where revision 50400 = 510000 + 4100 + 0.CleverTap/Plugins/Android/clevertap-android-wrapper.androidlib/src/main/java/com/clevertap/unity/CleverTapUnityPlugin.java (2)
682-700: Improved JSON handling for string variables.The updated
getVariableValuemethod now intelligently detects JSON-formatted strings and returns them as proper JSON objects instead of quoted strings. The fallback to quoted strings for non-JSON values preserves backward compatibility for plain string variables.
1254-1267: JSON parsing helper is well-implemented.The
tryParseJsonhelper method correctly:
- Handles null input
- Trims whitespace before detection
- Detects JSON objects/arrays by their opening character
- Gracefully handles malformed JSON by catching exceptions
- Returns normalized JSON via
.toString()or null on failure
| <dependencies> | ||
| <iosPods> | ||
| <iosPod name="CleverTap-iOS-SDK" version="7.3.4" minTargetSdk="9.0" /> | ||
| <iosPod name="CleverTap-iOS-SDK" version="7.4.0" minTargetSdk="9.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify iOS SDK 7.4.0 compatibility.
The iOS SDK version has been updated from 7.3.4 to 7.4.0. Ensure this version exists and review the release notes for any breaking changes or migration requirements.
🌐 Web query:
CleverTap iOS SDK 7.4.0 release notes breaking changes
💡 Result:
I couldn't find any CleverTap iOS SDK v7.4.0 release or release notes. CleverTap's changelog shows iOS v7.2.0 (May 27, 2025) with breaking/behavior notes and Android v7.4.0 listed separately. See CleverTap developer docs for the May 2025 SDK notes and general “What’s New”. (developer.clevertap.com)
If you need, I can:
- search again for a specific GitHub tag or CocoaPods/SwiftPM release, or
- list the breaking changes from iOS v7.2.0 (if that helps).
Citations:
I need to verify the actual availability of CleverTap iOS SDK versions on CocoaPods:
I need to check the CleverTap iOS SDK GitHub releases directly to verify if version 7.4.0 exists:
iOS SDK version 7.4.0 does not exist—specify 7.2.1 instead.
CleverTap iOS SDK's latest version is 7.2.1, not 7.4.0. Version 7.4.x exists only for the Android SDK (v7.4.1), not iOS. Update the dependency to use an available iOS SDK version such as 7.2.1.
🤖 Prompt for AI Agents
In CleverTap/Plugins/Editor/CleverTapDependencies.xml around line 4, the iOS pod
version is set to 7.4.0 which does not exist on CocoaPods; replace the iOS SDK
version with a valid release (e.g., change CleverTap-iOS-SDK version to 7.2.1)
so the Pod specification references an available iOS SDK release, and update any
related comments or lockfiles to reflect the corrected version.
Version 5.4.0
Summary by CodeRabbit
Release Notes – Version 5.4.0
New Features
Updates
✏️ Tip: You can customize this high-level summary in your review settings.