diff --git a/CHANGELOG.md b/CHANGELOG.md index a6d5747..8a9554d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ -## 1.6.40 +## 1.6.41 -- update: version upgrade in class \ No newline at end of file +- update: added updatePostbackConversion function in iOS \ No newline at end of file diff --git a/README.md b/README.md index 744baec..503d311 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ You can add the flutter sdk in two ways:- ``` dependencies: - trackier_sdk_flutter: ^1.6.40 + trackier_sdk_flutter: ^1.6.41 ``` 2. By using cli command. you need to run the below command in `terminal/cmd`. diff --git a/android/src/main/kotlin/com/example/trackierfluttersdk/TrackierfluttersdkPlugin.kt b/android/src/main/kotlin/com/example/trackierfluttersdk/TrackierfluttersdkPlugin.kt index fd6631b..33a6450 100644 --- a/android/src/main/kotlin/com/example/trackierfluttersdk/TrackierfluttersdkPlugin.kt +++ b/android/src/main/kotlin/com/example/trackierfluttersdk/TrackierfluttersdkPlugin.kt @@ -89,7 +89,7 @@ class TrackierfluttersdkPlugin : FlutterPlugin, MethodCallHandler { environment = configMap.get("environment") as String } trackierSDKConfig = TrackierSDKConfig(context, appToken, environment) - trackierSDKConfig.setSDKVersion("1.6.40") + trackierSDKConfig.setSDKVersion("1.6.41") trackierSDKConfig.setSDKType("flutter_sdk") trackierSDKConfig.setAppSecret(secretId, secretKey) diff --git a/example/lib/main.dart b/example/lib/main.dart index 18f8e21..7c31a44 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -33,6 +33,7 @@ class _MyAppState extends State { trackerSDKConfig.deferredDeeplinkCallback = (uri){ print('The value of deeplinkUrl is: $uri'); }; + Trackierfluttersdk.updatePostbackConversion(0); Trackierfluttersdk.setUserId("737263"); //Pass your userid Trackierfluttersdk.setUserEmail("userEmail@gmail.com"); diff --git a/ios/Classes/SwiftTrackierfluttersdkPlugin.swift b/ios/Classes/SwiftTrackierfluttersdkPlugin.swift index d098956..694fca3 100644 --- a/ios/Classes/SwiftTrackierfluttersdkPlugin.swift +++ b/ios/Classes/SwiftTrackierfluttersdkPlugin.swift @@ -39,6 +39,9 @@ public class SwiftTrackierfluttersdkPlugin: NSObject, FlutterPlugin, DeepLinkLis } else if (call.method == "setUserAdditonalDetail") { let dict = call.arguments as? [String:Any] if (dict != nil) { setUserAdditionalDetails(dict: dict!) } + } else if (call.method == "updatePostbackConversion") { + let dict = call.arguments as? Int + if (dict != nil) { updatePostbackConversion(dict: dict!) } } else if (call.method == "initializeSDK") { let dict = call.arguments as? [String:Any] if (dict != nil) { initializeSDK(dict: dict) } @@ -73,6 +76,11 @@ public class SwiftTrackierfluttersdkPlugin: NSObject, FlutterPlugin, DeepLinkLis TrackierSDK.setUserAdditionalDetails(userAdditionalDetails: userAdditionalDetails); } + func updatePostbackConversion(dict: Int) -> Void { + let postbackConversion = dict + TrackierSDK.updatePostbackConversion(conversionValue: postbackConversion) + } + func initializeSDK(dict: Optional>) -> Void { let appToken = "\(dict?["appToken"] as? String ?? "")" let environment = "\(dict?["environment"] as? String ?? "")" @@ -81,7 +89,7 @@ public class SwiftTrackierfluttersdkPlugin: NSObject, FlutterPlugin, DeepLinkLis let deeplinkKey = "\(dict?["deeplinkCallback"] as? String ?? "")" let config = TrackierSDKConfig(appToken: appToken , env: environment) config.setAppSecret(secretId: secretId, secretKey: secretKey) - config.setSDKVersion(sdkVersion: "1.6.40") + config.setSDKVersion(sdkVersion: "1.6.41") if (!deeplinkKey.isEmpty) { config.setDeeplinkListerner(listener: self) } diff --git a/lib/trackierfluttersdk.dart b/lib/trackierfluttersdk.dart index 5e5023c..d5d9ec5 100644 --- a/lib/trackierfluttersdk.dart +++ b/lib/trackierfluttersdk.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:ffi'; import 'package:flutter/services.dart'; import 'package:trackier_sdk_flutter/trackierevent.dart'; import 'trackierconfig.dart'; @@ -40,6 +41,10 @@ class Trackierfluttersdk { _channel.invokeMethod('setUserName', userName); } + static void updatePostbackConversion(int conversion) { + _channel.invokeMethod('updatePostbackConversion', conversion); + } + static void setUserAdditonalDetail(Map userAdditonalDetail) { _channel.invokeMethod('setUserAdditonalDetail', userAdditonalDetail); } diff --git a/pubspec.yaml b/pubspec.yaml index ea2c6cb..af0d10a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: trackier_sdk_flutter description: This is trackier flutter SDK -version: 1.6.40 +version: 1.6.41 homepage: https://github.com/trackier/flutter-sdk environment: