Skip to content

Commit

Permalink
Release Cordova SDK version 9.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jerielng committed May 15, 2024
1 parent 71710c2 commit b80b151
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
⚠️ In version 2.33.0, we changed the iOS bridge from AppboyKit, which is written in Objective-C, to the new [Swift SDK](https://github.com/braze-inc/braze-swift-sdk). If you are upgrading from a version below 2.33.0 to a version above 2.33.0, please read [the instructions](https://github.com/braze-inc/braze-cordova-sdk/blob/master/CHANGELOG.md#2330) to ensure a smooth transition and backward compatibility.

## 9.1.0

##### Added
- Added the following properties to the Content Card model:
- `isTest`
- `isControl` (Note: If you're implementing your own UI, Control Cards should not be rendered, but you should manually log analytics for them.)
- - Updated the native iOS bridge [from Braze Swift SDK 9.0.0 to 9.1.0](https://github.com/braze-inc/braze-swift-sdk/compare/9.0.0...9.1.0#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed).

## 9.0.0

##### Breaking
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "braze-cordova-sdk",
"version": "9.0.0",
"version": "9.1.0",
"main": "www/BrazePlugin.js"
}
8 changes: 4 additions & 4 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-braze" version="9.0.0">
id="cordova-plugin-braze" version="9.1.0">
<name>Braze</name>
<description>Braze Cordova SDK</description>
<license>MIT</license>
Expand Down Expand Up @@ -54,9 +54,9 @@
<source url="https://cdn.cocoapods.org/"/>
</config>
<pods use-frameworks="true">
<pod name="BrazeKit" spec="~> 9.0.0" />
<pod name="BrazeUI" spec="~> 9.0.0" />
<pod name="BrazeLocation" spec="~> 9.0.0" />
<pod name="BrazeKit" spec="~> 9.1.0" />
<pod name="BrazeUI" spec="~> 9.1.0" />
<pod name="BrazeLocation" spec="~> 9.1.0" />
</pods>
</podspec>
</platform>
Expand Down
2 changes: 2 additions & 0 deletions src/android/ContentCardUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ object ContentCardUtils {
put("url", card.url)
put("openURLInWebView", card.openUriInWebView)
put("extras", JSONObject(card.extras))
put("isTest", card.isTest)
put("isControl", card.isControl)
}
when (card.cardType) {
IMAGE -> mapImageOnlyCardFields(mappedCardJson, card as ImageOnlyCard)
Expand Down
6 changes: 5 additions & 1 deletion src/ios/BrazePlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,11 @@ + (NSDictionary *)formattedContentCard:(BRZContentCardRaw *)card {
formattedContentCardData[@"dismissible"] = @(card.dismissible);
formattedContentCardData[@"url"] = [card.url absoluteString] ?: [NSNull null];
formattedContentCardData[@"openURLInWebView"] = @(card.useWebView);

formattedContentCardData[@"isTest"] = @(card.test);

BOOL isControl = card.type == BRZContentCardRawTypeControl;
formattedContentCardData[@"isControl"] = @(isControl);

if (card.extras != nil) {
formattedContentCardData[@"extras"] = [BrazePlugin getJsonFromExtras:card.extras];
}
Expand Down

0 comments on commit b80b151

Please sign in to comment.