Skip to content

Commit

Permalink
Minor code adjustments and changelog update
Browse files Browse the repository at this point in the history
Minor code adjustments and changelog update
  • Loading branch information
RodrigoSMarques committed Oct 7, 2023
1 parent 98ab0a8 commit c748b8d
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 22 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* Removed Facebook App Install Ads on iOS

### Enhancement
* Issue #244 - Support for setting customer_event_alias for BranchEvent
* Updated compile & target SDK to Android API 33.
* Updated example app Android compileSdkVersion to 33.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,6 @@ BranchEvent convertToEvent(HashMap<String, Object> eventMap) {
} else {
event = new BranchEvent((String) eventMap.get("eventName"));
}
if (eventMap.containsKey("alias")) {
event.setCustomerEventAlias((String) eventMap.get("alias"));
}
if (eventMap.containsKey("transactionID"))
event.setTransactionID((String) eventMap.get("transactionID"));
if (eventMap.containsKey("currency"))
Expand All @@ -204,6 +201,9 @@ BranchEvent convertToEvent(HashMap<String, Object> eventMap) {
event.addCustomDataProperty(customData.getKey(), customData.getValue());
}
}
if (eventMap.containsKey("alias")) {
event.setCustomerEventAlias((String) eventMap.get("alias"));
}
return event;
}

Expand Down
18 changes: 9 additions & 9 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ packages:
dependency: "direct main"
description:
name: cupertino_icons
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
url: "https://pub.dev"
source: hosted
version: "1.0.5"
version: "1.0.6"
fake_async:
dependency: transitive
description:
Expand All @@ -68,15 +68,15 @@ packages:
path: ".."
relative: true
source: path
version: "7.0.0-beta.1"
version: "7.0.0-beta.2"
flutter_lints:
dependency: "direct dev"
description:
name: flutter_lints
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "2.0.3"
flutter_test:
dependency: "direct dev"
description: flutter
Expand All @@ -99,10 +99,10 @@ packages:
dependency: transitive
description:
name: lints
sha256: "5cfd6509652ff5e7fe149b6df4859e687fca9048437857cb2e65c8d780f396e3"
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
version: "2.1.1"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -139,10 +139,10 @@ packages:
dependency: transitive
description:
name: plugin_platform_interface
sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc"
sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d
url: "https://pub.dev"
source: hosted
version: "2.1.4"
version: "2.1.6"
sky_engine:
dependency: transitive
description: flutter
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Demonstrates how to use the flutter_branch_sdk plugin.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

environment:
sdk: ">=2.17.3 <3.0.0"
sdk: ">=2.17.3 <4.0.0"

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
Expand Down
6 changes: 3 additions & 3 deletions ios/Classes/FlutterBranchIoSdkHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,6 @@ func convertToEvent(dict: [String: Any?]) -> BranchEvent? {
} else {
event = BranchEvent.customEvent(withName: eventName)
}
if let alias = dict["alias"] as? String {
event.alias = alias
}
if let transactionID = dict["transactionID"] as? String {
event.transactionID = transactionID
}
Expand Down Expand Up @@ -197,6 +194,9 @@ func convertToEvent(dict: [String: Any?]) -> BranchEvent? {
event.customData[customData.key] = (customData.value as! String)
}
}
if let alias = dict["alias"] as? String {
event.alias = alias
}
return event
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/objects/branch_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ class BranchEvent {
String affiliation = '';
String eventDescription = '';
String searchQuery = '';
String alias = '';
BranchEventAdType? adType;
final Map<String, String> _customData = {};
String alias = '';

BranchEvent.standardEvent(BranchStandardEvent branchStandardEvent) {
_eventName = getBranchStandardEventString(branchStandardEvent);
Expand Down
8 changes: 4 additions & 4 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ packages:
dependency: transitive
description:
name: lints
sha256: "5cfd6509652ff5e7fe149b6df4859e687fca9048437857cb2e65c8d780f396e3"
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
version: "2.1.1"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -124,10 +124,10 @@ packages:
dependency: "direct main"
description:
name: plugin_platform_interface
sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc"
sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d
url: "https://pub.dev"
source: hosted
version: "2.1.4"
version: "2.1.6"
sky_engine:
dependency: transitive
description: flutter
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_branch_sdk
description: Flutter Plugin for create deep link using Brach SDK (https://branch.io). This plugin provides a cross-platform (iOS, Android, Web).
version: 7.0.0-beta.1
version: 7.0.0-beta.2
homepage: https://github.com/RodrigoSMarques/flutter_branch_sdk

environment:
Expand Down

1 comment on commit c748b8d

@github-actions
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.