Skip to content

Commit 9598a6f

Browse files
committed
🚀 3.1.2
1 parent cb22e33 commit 9598a6f

File tree

7 files changed

+26
-10
lines changed

7 files changed

+26
-10
lines changed

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ packages:
6363
path: ".."
6464
relative: true
6565
source: path
66-
version: "3.1.0"
66+
version: "3.1.1"
6767
crypto:
6868
dependency: transitive
6969
description:

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Demonstrates how to use the courier_flutter plugin.
55
# pub.dev using `flutter pub publish`. This is preferred for private packages.
66
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
77

8-
version: 1.0.0+11
8+
version: 1.0.0+12
99

1010
environment:
1111
sdk: '>=2.18.1 <3.0.0'

ios/Classes/CourierClientMethodHandler.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99
import Courier_iOS
1010

11-
internal class CourierClientMethodHandler: NSObject, FlutterPlugin {
11+
internal class CourierClientMethodHandler: CourierFlutterMethodHandler, FlutterPlugin {
1212

1313
static func getChannel(with registrar: FlutterPluginRegistrar) -> FlutterMethodChannel {
1414
return FlutterMethodChannel(name: CourierFlutterChannel.client.rawValue, binaryMessenger: registrar.messenger())
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// CourierFlutterMethodHandler.swift
3+
// courier_flutter
4+
//
5+
// Created by Michael Miller on 8/16/24.
6+
//
7+
8+
import Courier_iOS
9+
10+
public class CourierFlutterMethodHandler: NSObject {
11+
12+
override init() {
13+
super.init()
14+
15+
// Set the flutter ios user agent
16+
// This ensures all the requests are tagged with this agent
17+
Courier.agent = CourierAgent.flutter_ios
18+
19+
}
20+
21+
}

ios/Classes/CourierPlugin.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ import Courier_iOS
44

55
public class CourierPlugin: NSObject, FlutterPlugin {
66

7-
public override init() {
8-
super.init()
9-
Courier.agent = CourierAgent.flutter_ios
10-
}
11-
127
public static func register(with registrar: FlutterPluginRegistrar) {
138
CourierSharedMethodHandler.register(with: registrar)
149
CourierClientMethodHandler.register(with: registrar)

ios/Classes/CourierSharedMethodHandler.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Courier_iOS
99

10-
internal class CourierSharedMethodHandler: NSObject, FlutterPlugin {
10+
internal class CourierSharedMethodHandler: CourierFlutterMethodHandler, FlutterPlugin {
1111

1212
static func getChannel(with registrar: FlutterPluginRegistrar) -> FlutterMethodChannel {
1313
return FlutterMethodChannel(name: CourierFlutterChannel.shared.rawValue, binaryMessenger: registrar.messenger())

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: courier_flutter
22
description: Inbox, Push Notifications and Preferences for Flutter
3-
version: 3.1.1
3+
version: 3.1.2
44
homepage: https://courier.com
55

66
environment:

0 commit comments

Comments
 (0)