Skip to content

Commit 4d0a1d6

Browse files
Merge branch 'hotfix/1.3.1'
2 parents c6b8a57 + c78d07e commit 4d0a1d6

File tree

6 files changed

+62
-42
lines changed

6 files changed

+62
-42
lines changed

CHANGELOG.md

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,56 @@
11
## CHANGE LOG
22

3+
### Version 1.3.1 (Jan 12, 2024)
4+
5+
- Resolved Android Gradle compatibility issue
6+
- Fixed a bug affecting iOS user attributes
7+
38
### Version 1.3.0 (Dec 19, 2023)
4-
* Viber Channel Support Added
5-
* Version tracking
9+
10+
- Viber Channel Support Added
11+
- Version tracking
612

713
### Version 1.2.4 (April 25, 2023)
8-
* Isolate issue fixed :[#issue-32](https://github.com/WebEngage/webengage-flutter/issues/32), [#issue-24](https://github.com/WebEngage/webengage-flutter/issues/24)
14+
15+
- Isolate issue fixed :[#issue-32](https://github.com/WebEngage/webengage-flutter/issues/32), [#issue-24](https://github.com/WebEngage/webengage-flutter/issues/24)
916

1017
### Version 1.2.3 (March 22, 2023)
11-
* Plugin singleton issue fixed : [#issue-31](https://github.com/WebEngage/webengage-flutter/issues/31)
18+
19+
- Plugin singleton issue fixed : [#issue-31](https://github.com/WebEngage/webengage-flutter/issues/31)
1220

1321
### Version 1.2.2 (March 13, 2023)
14-
* iOS SDK updated to XCFramework
15-
* Plugin has been updated to Singlton Instance
22+
23+
- iOS SDK updated to XCFramework
24+
- Plugin has been updated to Singlton Instance
1625

1726
### Version 1.2.1 (October 31, 2022)
18-
* Push callback in Background state
19-
* jcenter moved to mavencentral
20-
* Supports WebEngage Android SDK v4.+
27+
28+
- Push callback in Background state
29+
- jcenter moved to mavencentral
30+
- Supports WebEngage Android SDK v4.+
2131

2232
### Version 1.2.0 (September 20, 2022)
23-
* iOS XCFramework suppport
24-
* Anonymous id callback
33+
34+
- iOS XCFramework suppport
35+
- Anonymous id callback
2536

2637
### Version 1.0.3 (August 10, 2021)
27-
* Support for Flutter 2.2 (Null Safety)
38+
39+
- Support for Flutter 2.2 (Null Safety)
2840

2941
### Version 1.0.2 (Februrary 11, 2021)
30-
* Improvements for handling Push callbacks in killed state.
31-
* Support for universal link (iOS)
42+
43+
- Improvements for handling Push callbacks in killed state.
44+
- Support for universal link (iOS)
3245

3346
### Version 1.0.1 (November 09, 2020)
34-
* Fixes and README.md updates.
35-
* Supports WebEngage Android SDK v3.18+
36-
* Supports WebEngage iOS SDK v5.0+
47+
48+
- Fixes and README.md updates.
49+
- Supports WebEngage Android SDK v3.18+
50+
- Supports WebEngage iOS SDK v5.0+
3751

3852
### Version 1.0.0 (November 09, 2020)
39-
* Initial Release.
40-
* Supports WebEngage Android SDK v3.18+
41-
* Supports WebEngage iOS SDK v5.0+
53+
54+
- Initial Release.
55+
- Supports WebEngage Android SDK v3.18+
56+
- Supports WebEngage iOS SDK v5.0+

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group 'com.webengage.webengage_plugin'
2-
version '1.3.0'
2+
version '1.3.1'
33

44
buildscript {
55
repositories {
@@ -57,5 +57,5 @@ String readVersion() {
5757
}
5858

5959
dependencies {
60-
implementation 'com.webengage:android-sdk:4.+'
60+
api 'com.webengage:android-sdk:[4,)'
6161
}

android/version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
major=1
22
minor=3
3-
patch=0
3+
patch=1

ios/Classes/WebEngagePlugin.m

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#import "WebEngageConstants.h"
44

55
static FlutterMethodChannel* channel = nil;
6-
NSString * const WEGPluginVersion = @"1.3.0";
6+
NSString * const WEGPluginVersion = @"1.3.1";
77
NSString * const DATE_FORMAT = @"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
88
int const DATE_FORMAT_LENGTH = 24;
99

@@ -211,9 +211,26 @@ - (void) trackScreen:(FlutterMethodCall *)call withResult:(FlutterResult)result
211211
- (void) setUserAttribute:(FlutterMethodCall *)call withResult:(FlutterResult)result {
212212
NSString* attributeName = call.arguments[ATTRIBUTE_NAME];
213213
id value = call.arguments[ATTRIBUTES];
214+
[self setUserAttribute:attributeName withValue:value];
215+
}
216+
217+
- (void) setUserAttributes:(FlutterMethodCall *)call withResult:(FlutterResult)result {
218+
id _dictionary = call.arguments[ATTRIBUTES];
219+
if ([_dictionary isKindOfClass:[NSDictionary class]]) {
220+
NSDictionary *dictionary = (NSDictionary *)_dictionary;
221+
222+
for (NSString *attributeName in dictionary) {
223+
id value = [dictionary objectForKey:attributeName];
224+
[self setUserAttribute:attributeName withValue:value];
225+
}
226+
}
227+
228+
}
229+
230+
- (void)setUserAttribute:(NSString *)attributeName withValue:(id)value {
214231
if ([value isKindOfClass:[NSString class]]) {
215232
if ([value length] == DATE_FORMAT_LENGTH) {
216-
NSDate * date = [self getDate:value];
233+
NSDate *date = [self getDate:value];
217234
if (date != nil) {
218235
[[WebEngage sharedInstance].user setAttribute:attributeName withDateValue:date];
219236
} else {
@@ -222,27 +239,15 @@ - (void) setUserAttribute:(FlutterMethodCall *)call withResult:(FlutterResult)re
222239
} else {
223240
[[WebEngage sharedInstance].user setAttribute:attributeName withStringValue:value];
224241
}
225-
}
226-
else if ([value isKindOfClass:[NSNumber class]]) {
242+
} else if ([value isKindOfClass:[NSNumber class]]) {
227243
[[WebEngage sharedInstance].user setAttribute:attributeName withValue:value];
228-
}
229-
else if ([value isKindOfClass:[NSArray class]]) {
244+
} else if ([value isKindOfClass:[NSArray class]]) {
230245
[[WebEngage sharedInstance].user setAttribute:attributeName withArrayValue:value];
231-
}
232-
else if ([value isKindOfClass:[NSDate class]]) {
246+
} else if ([value isKindOfClass:[NSDate class]]) {
233247
[[WebEngage sharedInstance].user setAttribute:attributeName withDateValue:value];
234248
}
235249
}
236250

237-
- (void) setUserAttributes:(FlutterMethodCall *)call withResult:(FlutterResult)result {
238-
NSString* attributeName = call.arguments[ATTRIBUTE_NAME];
239-
id value = call.arguments[ATTRIBUTES];
240-
if ([value isKindOfClass:[NSDictionary class]]) {
241-
[[WebEngage sharedInstance].user setAttribute:attributeName withDictionaryValue:value];
242-
}
243-
244-
}
245-
246251
- (NSDate *)getDate:(NSString *)strValue {
247252
NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init];
248253
[dateFormatter setDateFormat:DATE_FORMAT];

ios/webengage_flutter.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'webengage_flutter'
3-
s.version = '1.3.0'
3+
s.version = '1.3.1'
44
s.summary = 'WebEngage Flutter iOS SDK.'
55
s.description = <<-DESC
66
WebEngage Flutter iOS SDK.

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: webengage_flutter
22
description: WebEngage Flutter plugin.
3-
version: 1.3.0
3+
version: 1.3.1
44
homepage: https://webengage.com/
55
repository: https://github.com/WebEngage/webengage-flutter
66

0 commit comments

Comments
 (0)