Skip to content

Commit 1e8a1e0

Browse files
Update SDK to 0.10.6
1 parent 1f559f6 commit 1e8a1e0

File tree

7 files changed

+58
-5
lines changed

7 files changed

+58
-5
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
## 0.10.6 (05/07/2023)
2+
### Features
3+
* Support for multi-select Carousel as a new input type for your customers. Customers will now be able to pick and choose multiple choices that appears as a series of options with a horizontal scroll (carousel) on the screen. The options list can also contain images in iOS.
4+
* Support for Phone number and OTP as a new input type for your customers. Customers will now be able to enter their phone numbers with country code to generate an OTP which is then entered by user and is accepted by the SDK to process user information.
5+
* You will now be able to pass custom user properties related to a user conversation from the mobile app to the bots via the SDK in Android.
6+
* We are adding support for multi-select as a new input type for your customers. Customers will now be able to pick and choose multiple choices that appears as list and dropdown.
7+
* We are adding support for Date and time as a new input type for your customers. Customers will now be able to pick a date and pick a time within the bot flow.
8+
* Update UI for single select button and dropdown options.
9+
* This version will now let you receive feedback from your customers in the form of a text. Customers will be able to type their feedback if configured in the bot flow in Android.
10+
* This version will now let you receive feedback from your customers in the form of a preset choices. Customers will be able to choose their feedback from a maximum 3 choices in Android.
11+
* This version will now let you receive feedback from your customers in the form of a star. Customers will be able to select the rating feedback if configured in the bot flow in Android.
12+
13+
### Bug Fixes :
14+
* Fix for notifications not coming when an old user is restored over existing user in iOS.
15+
116
## 0.10.5 (02/06/2023)
217
### Bug fixes
318
* Fix for app version not updating in device properties section (iOS)

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ android {
3535

3636
dependencies {
3737
implementation 'com.android.support:localbroadcastmanager:28.0.0'
38-
implementation 'com.github.freshworks:freshchat-android:5.5.3'
38+
implementation 'com.github.freshworks:freshchat-android:5.9.0'
3939
}
4040

4141

android/src/main/java/com/freshchat/consumer/sdk/flutter/FreshchatSdkPlugin.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,16 @@ public void setUserProperties(MethodCall call) {
215215
}
216216
}
217217

218+
public void setBotVariables(MethodCall call) {
219+
try {
220+
Map botVariablesMap = call.argument("botVariables");
221+
Map specificVariablesMap = call.argument("specificVariables");
222+
Freshchat.getInstance(context).setBotVariables(botVariablesMap, specificVariablesMap);
223+
} catch (Exception e) {
224+
Log.e(ERROR_TAG, e.toString());
225+
}
226+
}
227+
218228
public String sdkVersion() {
219229
return com.freshchat.consumer.sdk.BuildConfig.VERSION_NAME;
220230
}
@@ -575,6 +585,10 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
575585
setUserProperties(call);
576586
break;
577587

588+
case "setBotVariables":
589+
setBotVariables(call);
590+
break;
591+
578592
case "getSdkVersion":
579593
result.success(sdkVersion());
580594
break;

ios/Classes/FreshchatSdkPlugin.m

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,20 @@ -(void)setUserProperties:(FlutterMethodCall *) call{
104104
}
105105
}
106106

107+
-(void)setBotVariables:(FlutterMethodCall *) call{
108+
@try {
109+
NSDictionary* botVariables = call.arguments[@"botVariables"];
110+
NSDictionary* specificVariables = call.arguments[@"specificVariables"];
111+
if(botVariables.count == 0 && specificVariables.count == 0){
112+
NSLog(@"Please provide valid bot variables");
113+
} else {
114+
[[Freshchat sharedInstance] setBotVariables:botVariables withBotSpecificVariables: specificVariables];
115+
}
116+
} @catch (NSException *exception) {
117+
NSLog(@"Error on setBotVariables: %@ %@", exception.name, exception.reason);
118+
}
119+
}
120+
107121
-(void)setUser:(FlutterMethodCall *) call{
108122
@try {
109123
FreshchatUser *user = [FreshchatUser sharedInstance];
@@ -482,6 +496,8 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
482496
[instance trackEvent:call];
483497
}else if([@"setUserProperties" isEqualToString:call.method]){
484498
[instance setUserProperties:call];
499+
}else if([@"setBotVariables" isEqualToString:call.method]){
500+
[instance setBotVariables:call];
485501
}else if([@"resetUser" isEqualToString:call.method]){
486502
[instance resetUser];
487503
}else if([@"setUser" isEqualToString:call.method]){

ios/freshchat_sdk.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
Pod::Spec.new do |s|
66
s.name = 'freshchat_sdk'
7-
s.version = '0.10.5'
7+
s.version = '0.10.6'
88
s.summary = 'Freshchat Flutter SDK - iOS'
99
s.description = <<-DESC
1010
Freshchat Flutter SDK - iOS.
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
1717
s.public_header_files = 'Classes/**/*.h'
1818
s.dependency 'Flutter'
1919
s.platform = :ios
20-
s.dependency "FreshchatSDK", '5.5.3'
20+
s.dependency "FreshchatSDK", '5.8.0'
2121

2222
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
2323
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }

lib/freshchat_sdk.dart

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,20 @@ class Freshchat {
216216
});
217217
}
218218

219+
/// Set bot variables and bot specific variables with Freshchat
220+
static void setBotVariables(Map botVariables, Map specificVariables) async {
221+
await _channel.invokeMethod('setBotVariables', <String, Map>{
222+
'botVariables': botVariables,
223+
'specificVariables':specificVariables
224+
});
225+
}
226+
219227
/// Get the current Freshchat flutter SDK version as well as the corresponding native SDK version (Android or iOS)
220228
static Future<String> get getSdkVersion async {
221229
final String sdkVersion = await _channel.invokeMethod('getSdkVersion');
222230
final String operatingSystem = Platform.operatingSystem;
223231
// As there is no simple way to get current freshchat flutter sdk version, we are hardcoding here.
224-
final String allSdkVersion = "flutter-0.10.5-$operatingSystem-$sdkVersion ";
232+
final String allSdkVersion = "flutter-0.10.6-$operatingSystem-$sdkVersion ";
225233
return allSdkVersion;
226234
}
227235

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Freshchat is a modern messaging software for sales and customer eng
33
repository: https://github.com/freshworks/freshchat-flutter-sdk
44

55
# Whenever this version is updated, it must also be updated in Freshchat::getSdkVersion()
6-
version: 0.10.5
6+
version: 0.10.6
77
homepage: https://www.freshworks.com/
88

99
environment:

0 commit comments

Comments
 (0)