From 38e446dd23d7aae33cae2b1333104cda4912223b Mon Sep 17 00:00:00 2001 From: Kale McNaney Date: Mon, 4 Sep 2023 06:43:30 -0700 Subject: [PATCH 01/13] GH-62: adding jwt-enabled API keys --- .gitignore | 5 ++++- android/build.gradle | 5 ++++- .../lahaus/iterable_flutter/IterableFlutterPlugin.kt | 11 +++++------ ios/Classes/SwiftIterableFlutterPlugin.swift | 6 ++++-- lib/iterable_flutter.dart | 10 ++++++++-- test/iterable_flutter_test.dart | 8 ++++++-- 6 files changed, 31 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index e4498c7..282d3e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ example/ios/Podfile.lock -example/pubspec.lock \ No newline at end of file +example/pubspec.lock +.dart_tool/ +build/ +pubspec.lock \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index f16601e..82c592e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -42,7 +42,10 @@ android { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'com.iterable:iterableapi:3.4.9' + implementation 'com.iterable:iterableapi:3.4.15' + implementation 'com.iterable:iterableapi-ui:3.4.0' + // Version 17.4.0+ is required for push notifications and in-app message features: + implementation 'com.google.firebase:firebase-messaging:17.4.0' testImplementation 'junit:junit:4.13.2' testImplementation 'org.json:json:20210307' } diff --git a/android/src/main/kotlin/com/lahaus/iterable_flutter/IterableFlutterPlugin.kt b/android/src/main/kotlin/com/lahaus/iterable_flutter/IterableFlutterPlugin.kt index 5ab42e6..16491ab 100644 --- a/android/src/main/kotlin/com/lahaus/iterable_flutter/IterableFlutterPlugin.kt +++ b/android/src/main/kotlin/com/lahaus/iterable_flutter/IterableFlutterPlugin.kt @@ -52,9 +52,9 @@ class IterableFlutterPlugin : FlutterPlugin, MethodCallHandler { result.success(null) } "setEmail" -> { - val userEmail = call.arguments as String - IterableApi.getInstance().setEmail(userEmail) - IterableApi.getInstance().registerForPush() + val email = call.argument("email") ?: "" + val jwt = call.argument("jwt") ?: "" + IterableApi.getInstance().setEmail(email, jwt) result.success(null) } "setUserId" -> { @@ -107,11 +107,10 @@ class IterableFlutterPlugin : FlutterPlugin, MethodCallHandler { notifyPushNotificationOpened() false } - + if (activeLogDebug) { - configBuilder.setLogLevel(Log.DEBUG) + configBuilder.setLogLevel(Log.VERBOSE) } - IterableApi.initialize(context, apiKey, configBuilder.build()) } diff --git a/ios/Classes/SwiftIterableFlutterPlugin.swift b/ios/Classes/SwiftIterableFlutterPlugin.swift index c08907e..3d6fae6 100644 --- a/ios/Classes/SwiftIterableFlutterPlugin.swift +++ b/ios/Classes/SwiftIterableFlutterPlugin.swift @@ -27,8 +27,10 @@ public class SwiftIterableFlutterPlugin: NSObject, FlutterPlugin, UNUserNotifica result(nil) case "setEmail": - let email = call.arguments as! String - IterableAPI.email = email + let args = getPropertiesFromArguments(call.arguments) + let email = args["email"] as! String + let jwt = args["jwt"] as! String + IterableAPI.setEmail(email, jwt) result(nil) case "setUserId": diff --git a/lib/iterable_flutter.dart b/lib/iterable_flutter.dart index 09d0386..ee1b907 100644 --- a/lib/iterable_flutter.dart +++ b/lib/iterable_flutter.dart @@ -27,8 +27,14 @@ class IterableFlutter { _channel.setMethodCallHandler(nativeMethodCallHandler); } - static Future setEmail(String email) async { - await _channel.invokeMethod('setEmail', email); + static Future setEmail(String email, String jwt) async { + await _channel.invokeMethod( + 'setEmail', + { + 'email': email, + 'jwt': jwt, + }, + ); } static Future setUserId(String userId) async { diff --git a/test/iterable_flutter_test.dart b/test/iterable_flutter_test.dart index 75f4a23..53ae917 100644 --- a/test/iterable_flutter_test.dart +++ b/test/iterable_flutter_test.dart @@ -13,6 +13,7 @@ void main() { const String activeLogDebug = 'activeLogDebug'; const String email = 'my@email.com'; const String userId = '11111'; + const String jwt = ''; const String event = 'my_event'; const Map dataFields = {'data': 'field'}; @@ -71,9 +72,12 @@ void main() { }); test('setEmail', () async { - await IterableFlutter.setEmail(email); + await IterableFlutter.setEmail(email, jwt); expect(calledMethod, [ - isMethodCall('setEmail', arguments: email), + isMethodCall('setEmail', arguments: { + "email": email, + "jwt": jwt + }), ]); }); From 20fcb9a3994d4cc6e3c873b241fff664bcbca987 Mon Sep 17 00:00:00 2001 From: Kale McNaney Date: Mon, 18 Sep 2023 08:25:29 -0700 Subject: [PATCH 02/13] Update android sdk & settings, make jwt token work on iOS --- android/build.gradle | 2 +- android/src/main/AndroidManifest.xml | 1 + example/android/app/build.gradle | 4 +-- ios/Classes/SwiftIterableFlutterPlugin.swift | 31 +++++++++++++++----- ios/iterable_flutter.podspec | 2 +- lib/iterable_flutter.dart | 4 ++- 6 files changed, 32 insertions(+), 12 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 82c592e..d5d7c78 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -25,7 +25,7 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - compileSdkVersion 31 + compileSdkVersion 33 sourceSets { main.java.srcDirs += 'src/main/kotlin' diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 34532b9..29dc62b 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,3 +1,4 @@ + diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 1ecbeb6..ba25d6c 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -29,7 +29,7 @@ apply from: project(':flutter_config').projectDir.getPath() + "/dotenv.gradle" apply plugin: 'com.google.gms.google-services' android { - compileSdkVersion 31 + compileSdkVersion 33 sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -39,7 +39,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.lahaus.iterable_flutter_example" minSdkVersion 16 - targetSdkVersion 31 + targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/ios/Classes/SwiftIterableFlutterPlugin.swift b/ios/Classes/SwiftIterableFlutterPlugin.swift index 3d6fae6..7bb2001 100644 --- a/ios/Classes/SwiftIterableFlutterPlugin.swift +++ b/ios/Classes/SwiftIterableFlutterPlugin.swift @@ -3,9 +3,10 @@ import UIKit import IterableSDK import UserNotifications -public class SwiftIterableFlutterPlugin: NSObject, FlutterPlugin, UNUserNotificationCenterDelegate, IterableCustomActionDelegate, IterableURLDelegate { +public class SwiftIterableFlutterPlugin: NSObject, FlutterPlugin, UNUserNotificationCenterDelegate, IterableCustomActionDelegate, IterableURLDelegate, IterableAuthDelegate { static var channel: FlutterMethodChannel? = nil + var token: String? = nil public static func register(with registrar: FlutterPluginRegistrar) { channel = FlutterMethodChannel(name: "iterable_flutter", binaryMessenger: registrar.messenger()) @@ -14,6 +15,17 @@ public class SwiftIterableFlutterPlugin: NSObject, FlutterPlugin, UNUserNotifica registrar.addApplicationDelegate(instance) } + + public func onAuthTokenRequested(completion: @escaping AuthTokenRetrievalHandler) { + print("calling onAuthTokenRequested") + print(token) + completion(token) + } + + public func onTokenRegistrationFailed(_ reason: String?) { + print("token registration failed") + print(reason) + } public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { switch (call.method) { @@ -22,16 +34,18 @@ public class SwiftIterableFlutterPlugin: NSObject, FlutterPlugin, UNUserNotifica let apiKey = args["apiKey"] as! String let pushIntegrationName = args["pushIntegrationName"] as! String - - initialize(apiKey, pushIntegrationName) + let authToken = args["authToken"] as! String + initialize(apiKey, pushIntegrationName, authToken) result(nil) case "setEmail": let args = getPropertiesFromArguments(call.arguments) let email = args["email"] as! String let jwt = args["jwt"] as! String + print("calling IterableAPI.setEmail") + token = jwt IterableAPI.setEmail(email, jwt) - + print("finished calling IterableAPI.setEmail") result(nil) case "setUserId": let userId = call.arguments as! String @@ -75,13 +89,15 @@ public class SwiftIterableFlutterPlugin: NSObject, FlutterPlugin, UNUserNotifica } } - private func initialize(_ apiKey: String, _ pushIntegrationName: String){ + private func initialize(_ apiKey: String, _ pushIntegrationName: String, _ authToken: String){ + token = authToken let config = IterableConfig() config.pushIntegrationName = pushIntegrationName - config.autoPushRegistration = true + config.autoPushRegistration = false config.customActionDelegate = self config.urlDelegate = self - + config.authDelegate = self + config.logDelegate = AllLogDelegate() IterableAPI.initialize(apiKey: apiKey, config: config) } @@ -103,6 +119,7 @@ public class SwiftIterableFlutterPlugin: NSObject, FlutterPlugin, UNUserNotifica } public func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { + print("~~~~~ calling IterableAPI.register") IterableAPI.register(token: deviceToken) } diff --git a/ios/iterable_flutter.podspec b/ios/iterable_flutter.podspec index 5a559a4..dd820cb 100644 --- a/ios/iterable_flutter.podspec +++ b/ios/iterable_flutter.podspec @@ -15,7 +15,7 @@ Pod::Spec.new do |s| s.source = { :path => '.' } s.source_files = 'Classes/**/*' s.dependency 'Flutter' - s.dependency 'Iterable-iOS-SDK', '6.4.7' + s.dependency 'Iterable-iOS-SDK', '6.4.15' s.platform = :ios, '11.0' # Flutter.framework does not contain a i386 slice. diff --git a/lib/iterable_flutter.dart b/lib/iterable_flutter.dart index ee1b907..06edb47 100644 --- a/lib/iterable_flutter.dart +++ b/lib/iterable_flutter.dart @@ -15,13 +15,15 @@ class IterableFlutter { required String apiKey, required String pushIntegrationName, bool activeLogDebug = false, + String? authToken = null }) async { await _channel.invokeMethod( 'initialize', { 'apiKey': apiKey, 'pushIntegrationName': pushIntegrationName, - 'activeLogDebug': activeLogDebug + 'activeLogDebug': activeLogDebug, + 'authToken': authToken }, ); _channel.setMethodCallHandler(nativeMethodCallHandler); From d8b4de13b246ce0a29a5988a6d426618da3c82b5 Mon Sep 17 00:00:00 2001 From: Kale McNaney Date: Mon, 20 Nov 2023 22:12:04 -0800 Subject: [PATCH 03/13] fixing tests --- test/iterable_flutter_test.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/iterable_flutter_test.dart b/test/iterable_flutter_test.dart index 53ae917..5f22591 100644 --- a/test/iterable_flutter_test.dart +++ b/test/iterable_flutter_test.dart @@ -15,6 +15,7 @@ void main() { const String userId = '11111'; const String jwt = ''; const String event = 'my_event'; + const String authToken = 'authToken'; const Map dataFields = {'data': 'field'}; const contentBody = {'testKey': "Test body push"}; @@ -65,7 +66,8 @@ void main() { arguments: { apiKey: apiKey, pushIntegrationName: pushIntegrationName, - activeLogDebug: false + activeLogDebug: false, + authToken: null }, ), ]); From f3f5bfd73aee607cec324014defd71c9a20f6f9b Mon Sep 17 00:00:00 2001 From: Kale McNaney Date: Sun, 14 Apr 2024 16:31:59 -0700 Subject: [PATCH 04/13] LAM-221: deep link handler iOS --- ios/Classes/SwiftIterableFlutterPlugin.swift | 6 +++++- lib/iterable_flutter.dart | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ios/Classes/SwiftIterableFlutterPlugin.swift b/ios/Classes/SwiftIterableFlutterPlugin.swift index 7bb2001..2d05869 100644 --- a/ios/Classes/SwiftIterableFlutterPlugin.swift +++ b/ios/Classes/SwiftIterableFlutterPlugin.swift @@ -151,7 +151,11 @@ public class SwiftIterableFlutterPlugin: NSObject, FlutterPlugin, UNUserNotifica public func handle(iterableURL url: URL, inContext context: IterableActionContext) -> Bool { - notifyPushNotificationOpened() + let payload = [ + "path": url.path ?? "" + ] as [String : Any] + + SwiftIterableFlutterPlugin.channel?.invokeMethod("deepLinkHandler", arguments: payload) return true } diff --git a/lib/iterable_flutter.dart b/lib/iterable_flutter.dart index 06edb47..3142c07 100644 --- a/lib/iterable_flutter.dart +++ b/lib/iterable_flutter.dart @@ -4,12 +4,14 @@ import 'dart:convert'; import 'package:flutter/services.dart'; typedef OpenedNotificationHandler = void Function(Map openedResult); +typedef OpenedDeepLinkHandler = void Function(Map openedResult); // ignore: avoid_classes_with_only_static_members class IterableFlutter { static const MethodChannel _channel = MethodChannel('iterable_flutter'); static OpenedNotificationHandler? _onOpenedNotification; + static OpenedDeepLinkHandler? _onOpenedDeepLink; static Future initialize({ required String apiKey, @@ -77,6 +79,10 @@ class IterableFlutter { _onOpenedNotification = handler; } + static void setDeepLinkOpenedHandler(OpenedDeepLinkHandler handler) { + _onOpenedDeepLink = handler; + } + static Future nativeMethodCallHandler(MethodCall methodCall) async { final arguments = methodCall.arguments as Map; final argumentsCleaned = sanitizeArguments(arguments); @@ -85,6 +91,9 @@ class IterableFlutter { case "openedNotificationHandler": _onOpenedNotification?.call(argumentsCleaned); return "This data from native....."; + case "deepLinkHandler": + _onOpenedDeepLink?.call(argumentsCleaned); + return "Deep link datta from handler..."; default: return "Nothing"; } From 30538f43de287350a94a536a8c4a7cd33f74e015 Mon Sep 17 00:00:00 2001 From: Kale McNaney Date: Sun, 14 Apr 2024 16:32:53 -0700 Subject: [PATCH 05/13] v0.6.2 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index c086c15..13b0154 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: iterable_flutter description: Flutter implementation for iterable.com Cross Channel Marketing Platform -version: 0.5.8 +version: 0.6.2 homepage: https://lahaus.com repository: https://github.com/la-haus/iterable-flutter issue_tracker: https://github.com/la-haus/iterable-flutter/issues From 45eacc4c90f25d89c773e7cefe46a35972a14d93 Mon Sep 17 00:00:00 2001 From: Kale McNaney Date: Sat, 20 Apr 2024 17:08:50 -0700 Subject: [PATCH 06/13] Adding deeplinking capabilities --- .../iterable_flutter/IterableFlutterPlugin.kt | 10 +++++++ ios/Classes/SwiftIterableFlutterPlugin.swift | 27 ++++++++++++------- lib/iterable_flutter.dart | 18 ++++++++----- 3 files changed, 40 insertions(+), 15 deletions(-) diff --git a/android/src/main/kotlin/com/lahaus/iterable_flutter/IterableFlutterPlugin.kt b/android/src/main/kotlin/com/lahaus/iterable_flutter/IterableFlutterPlugin.kt index 16491ab..0337d2d 100644 --- a/android/src/main/kotlin/com/lahaus/iterable_flutter/IterableFlutterPlugin.kt +++ b/android/src/main/kotlin/com/lahaus/iterable_flutter/IterableFlutterPlugin.kt @@ -15,6 +15,8 @@ import io.flutter.plugin.common.MethodChannel.MethodCallHandler import io.flutter.plugin.common.MethodChannel.Result import org.json.JSONObject import java.util.* +import java.net.URL + /** IterableFlutterPlugin */ @@ -93,6 +95,14 @@ class IterableFlutterPlugin : FlutterPlugin, MethodCallHandler { IterableApi.getInstance().updateUser(JSONObject(userInfo)) result.success(null) } + "handleDeepLink" -> { + val argumentData = call.arguments as? Map<*, *> + val url = argumentData?.get("url") as String + IterableApi.getInstance().getAndTrackDeepLink(url) { result:String? -> + Log.d("HandleDeeplink", "Redirected to: $result") + channel.invokeMethod("deepLinkHandler", mapOf("path" to URL(result).path)) + } + } else -> { result.notImplemented() } diff --git a/ios/Classes/SwiftIterableFlutterPlugin.swift b/ios/Classes/SwiftIterableFlutterPlugin.swift index 2d05869..d1947d5 100644 --- a/ios/Classes/SwiftIterableFlutterPlugin.swift +++ b/ios/Classes/SwiftIterableFlutterPlugin.swift @@ -9,6 +9,7 @@ public class SwiftIterableFlutterPlugin: NSObject, FlutterPlugin, UNUserNotifica var token: String? = nil public static func register(with registrar: FlutterPluginRegistrar) { + NSLog("calling channel register") channel = FlutterMethodChannel(name: "iterable_flutter", binaryMessenger: registrar.messenger()) let instance = SwiftIterableFlutterPlugin() registrar.addMethodCallDelegate(instance, channel: channel!) @@ -34,8 +35,7 @@ public class SwiftIterableFlutterPlugin: NSObject, FlutterPlugin, UNUserNotifica let apiKey = args["apiKey"] as! String let pushIntegrationName = args["pushIntegrationName"] as! String - let authToken = args["authToken"] as! String - initialize(apiKey, pushIntegrationName, authToken) + initialize(apiKey, pushIntegrationName) result(nil) case "setEmail": @@ -83,14 +83,21 @@ public class SwiftIterableFlutterPlugin: NSObject, FlutterPlugin, UNUserNotifica case "signOut": signOut() + result(nil) + case "handleDeepLink": + NSLog("NSLog handleDeepLink") + let args = getPropertiesFromArguments(call.arguments) + let urlStr = args["url"] as! String + NSLog("deeplink \(urlStr)") + let url = URL(string: urlStr) + IterableAPI.handle(universalLink: url!) result(nil) default: result(FlutterMethodNotImplemented) } } - private func initialize(_ apiKey: String, _ pushIntegrationName: String, _ authToken: String){ - token = authToken + private func initialize(_ apiKey: String, _ pushIntegrationName: String){ let config = IterableConfig() config.pushIntegrationName = pushIntegrationName config.autoPushRegistration = false @@ -113,11 +120,12 @@ public class SwiftIterableFlutterPlugin: NSObject, FlutterPlugin, UNUserNotifica } public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [AnyHashable : Any] = [:]) -> Bool { + print("application") UNUserNotificationCenter.current().delegate = self return true } - + public func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { print("~~~~~ calling IterableAPI.register") IterableAPI.register(token: deviceToken) @@ -151,10 +159,13 @@ public class SwiftIterableFlutterPlugin: NSObject, FlutterPlugin, UNUserNotifica public func handle(iterableURL url: URL, inContext context: IterableActionContext) -> Bool { + NSLog("deeplink: handle(iterableURL url: URL,") + NSLog("deeplink \(url.path)") let payload = [ - "path": url.path ?? "" + "path": url.path ?? "", ] as [String : Any] - + NSLog("calling deepLinkHandler up the channel") + NSLog("is there a channel? \(SwiftIterableFlutterPlugin.channel == nil)") SwiftIterableFlutterPlugin.channel?.invokeMethod("deepLinkHandler", arguments: payload) return true } @@ -174,7 +185,5 @@ public class SwiftIterableFlutterPlugin: NSObject, FlutterPlugin, UNUserNotifica ] as [String : Any] SwiftIterableFlutterPlugin.channel?.invokeMethod("openedNotificationHandler", arguments: payload) - } - } diff --git a/lib/iterable_flutter.dart b/lib/iterable_flutter.dart index 3142c07..79a63aa 100644 --- a/lib/iterable_flutter.dart +++ b/lib/iterable_flutter.dart @@ -16,16 +16,14 @@ class IterableFlutter { static Future initialize({ required String apiKey, required String pushIntegrationName, - bool activeLogDebug = false, - String? authToken = null + bool activeLogDebug = false }) async { await _channel.invokeMethod( 'initialize', { 'apiKey': apiKey, 'pushIntegrationName': pushIntegrationName, - 'activeLogDebug': activeLogDebug, - 'authToken': authToken + 'activeLogDebug': activeLogDebug }, ); _channel.setMethodCallHandler(nativeMethodCallHandler); @@ -41,6 +39,12 @@ class IterableFlutter { ); } + static Future handleDeepLink(url) async { + print("handleDeepLink"); + print(url); + await _channel.invokeMethod("handleDeepLink", {'url': url}); + } + static Future setUserId(String userId) async { await _channel.invokeMethod('setUserId', userId); } @@ -80,18 +84,20 @@ class IterableFlutter { } static void setDeepLinkOpenedHandler(OpenedDeepLinkHandler handler) { + print("calling setDeepLinkOpenedHandler "); _onOpenedDeepLink = handler; } static Future nativeMethodCallHandler(MethodCall methodCall) async { + print("nativeMethodCallHandler maybe deep? ${methodCall.method}"); final arguments = methodCall.arguments as Map; final argumentsCleaned = sanitizeArguments(arguments); - switch (methodCall.method) { case "openedNotificationHandler": _onOpenedNotification?.call(argumentsCleaned); return "This data from native....."; case "deepLinkHandler": + print("deepLinkHandler running... "); _onOpenedDeepLink?.call(argumentsCleaned); return "Deep link datta from handler..."; default: @@ -103,7 +109,7 @@ class IterableFlutter { Map arguments) { final result = arguments; - final data = result['additionalData']; + final data = result['additionalData'] ?? {}; data.forEach((key, value) { if (value is String) { if (value[0] == '{' && value[value.length - 1] == '}') { From 027c71502261f76b9ee4582c6c22cfb1687f593c Mon Sep 17 00:00:00 2001 From: Kale McNaney Date: Sat, 20 Apr 2024 17:09:34 -0700 Subject: [PATCH 07/13] v0.7.0 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 13b0154..9c4275e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: iterable_flutter description: Flutter implementation for iterable.com Cross Channel Marketing Platform -version: 0.6.2 +version: 0.7.0 homepage: https://lahaus.com repository: https://github.com/la-haus/iterable-flutter issue_tracker: https://github.com/la-haus/iterable-flutter/issues From a77b3e3f313e5f73ab28a6b06886e3fcf5da0e2f Mon Sep 17 00:00:00 2001 From: Kale McNaney Date: Fri, 10 May 2024 10:21:51 -0700 Subject: [PATCH 08/13] Adding query string to payload --- ios/Classes/SwiftIterableFlutterPlugin.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/ios/Classes/SwiftIterableFlutterPlugin.swift b/ios/Classes/SwiftIterableFlutterPlugin.swift index d1947d5..8f65981 100644 --- a/ios/Classes/SwiftIterableFlutterPlugin.swift +++ b/ios/Classes/SwiftIterableFlutterPlugin.swift @@ -163,6 +163,7 @@ public class SwiftIterableFlutterPlugin: NSObject, FlutterPlugin, UNUserNotifica NSLog("deeplink \(url.path)") let payload = [ "path": url.path ?? "", + "query": url.query ?? "" ] as [String : Any] NSLog("calling deepLinkHandler up the channel") NSLog("is there a channel? \(SwiftIterableFlutterPlugin.channel == nil)") From 73a3139b55b7e0af36318c6799d6e63ba95ae691 Mon Sep 17 00:00:00 2001 From: Kale McNaney Date: Mon, 21 Oct 2024 13:12:25 -0700 Subject: [PATCH 09/13] upgrading Iterable-iOS-SDK --- ios/iterable_flutter.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/iterable_flutter.podspec b/ios/iterable_flutter.podspec index dd820cb..04f4b41 100644 --- a/ios/iterable_flutter.podspec +++ b/ios/iterable_flutter.podspec @@ -15,7 +15,7 @@ Pod::Spec.new do |s| s.source = { :path => '.' } s.source_files = 'Classes/**/*' s.dependency 'Flutter' - s.dependency 'Iterable-iOS-SDK', '6.4.15' + s.dependency 'Iterable-iOS-SDK', '6.5.5' s.platform = :ios, '11.0' # Flutter.framework does not contain a i386 slice. From 08f326b4e7430843aaa99057823e3fbe65c7d51a Mon Sep 17 00:00:00 2001 From: Kale McNaney Date: Mon, 21 Oct 2024 13:14:36 -0700 Subject: [PATCH 10/13] bumping version number --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 9c4275e..862c171 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: iterable_flutter description: Flutter implementation for iterable.com Cross Channel Marketing Platform -version: 0.7.0 +version: 0.9.1 homepage: https://lahaus.com repository: https://github.com/la-haus/iterable-flutter issue_tracker: https://github.com/la-haus/iterable-flutter/issues From 7997a8c47ccd2ed067c1f69d72b2c34492df7e0d Mon Sep 17 00:00:00 2001 From: Kale McNaney Date: Tue, 22 Oct 2024 04:25:50 -0700 Subject: [PATCH 11/13] 6.5.7 bump --- ios/iterable_flutter.podspec | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/iterable_flutter.podspec b/ios/iterable_flutter.podspec index 04f4b41..1f31d1c 100644 --- a/ios/iterable_flutter.podspec +++ b/ios/iterable_flutter.podspec @@ -15,7 +15,7 @@ Pod::Spec.new do |s| s.source = { :path => '.' } s.source_files = 'Classes/**/*' s.dependency 'Flutter' - s.dependency 'Iterable-iOS-SDK', '6.5.5' + s.dependency 'Iterable-iOS-SDK', '6.5.7' s.platform = :ios, '11.0' # Flutter.framework does not contain a i386 slice. diff --git a/pubspec.yaml b/pubspec.yaml index 862c171..ac31444 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: iterable_flutter description: Flutter implementation for iterable.com Cross Channel Marketing Platform -version: 0.9.1 +version: 0.9.2 homepage: https://lahaus.com repository: https://github.com/la-haus/iterable-flutter issue_tracker: https://github.com/la-haus/iterable-flutter/issues From aeb9dd75b9f97cfb71e2eb81c50a5ba65caa216c Mon Sep 17 00:00:00 2001 From: Kale McNaney Date: Tue, 22 Oct 2024 05:12:58 -0700 Subject: [PATCH 12/13] Fixing protocol error --- ios/Classes/SwiftIterableFlutterPlugin.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ios/Classes/SwiftIterableFlutterPlugin.swift b/ios/Classes/SwiftIterableFlutterPlugin.swift index 8f65981..8e3161d 100644 --- a/ios/Classes/SwiftIterableFlutterPlugin.swift +++ b/ios/Classes/SwiftIterableFlutterPlugin.swift @@ -23,6 +23,10 @@ public class SwiftIterableFlutterPlugin: NSObject, FlutterPlugin, UNUserNotifica completion(token) } + public func onAuthFailure(_ authFailure: AuthFailure) { + + } + public func onTokenRegistrationFailed(_ reason: String?) { print("token registration failed") print(reason) From 49c999a525609916c2bf0c1054952808c828d24b Mon Sep 17 00:00:00 2001 From: Kale McNaney Date: Tue, 22 Oct 2024 05:13:31 -0700 Subject: [PATCH 13/13] v0.9.3 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index ac31444..b20252b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: iterable_flutter description: Flutter implementation for iterable.com Cross Channel Marketing Platform -version: 0.9.2 +version: 0.9.3 homepage: https://lahaus.com repository: https://github.com/la-haus/iterable-flutter issue_tracker: https://github.com/la-haus/iterable-flutter/issues