File tree Expand file tree Collapse file tree 6 files changed +10
-28
lines changed Expand file tree Collapse file tree 6 files changed +10
-28
lines changed Original file line number Diff line number Diff line change 47
47
- (NSDictionary *)toJson ;
48
48
@end
49
49
50
- @interface OSNotificationOpenedResult (Flutter)
50
+ @interface OSInAppMessage (Flutter)
51
51
- (NSDictionary *)toJson ;
52
52
@end
53
53
54
- @interface OSInAppMessageAction (Flutter)
55
- - (NSDictionary *)toJson ;
54
+ @interface NSError (Flutter)
55
+ - (FlutterError *)flutterError ;
56
56
@end
57
57
58
- @interface OSInAppMessage (Flutter)
58
+ @interface OSInAppMessageWillDisplayEvent (Flutter)
59
59
- (NSDictionary *)toJson ;
60
60
@end
61
61
62
- @interface NSError (Flutter)
63
- - (FlutterError *)flutterError ;
62
+ @interface OSInAppMessageDidDisplayEvent (Flutter)
63
+ - (NSDictionary *)toJson ;
64
64
@end
65
65
66
66
@interface OSInAppMessageWillDismissEvent (Flutter)
Original file line number Diff line number Diff line change @@ -73,17 +73,6 @@ - (NSDictionary *)toJson {
73
73
}
74
74
@end
75
75
76
- @implementation OSNotificationOpenedResult (Flutter)
77
- - (NSDictionary *)toJson {
78
- NSMutableDictionary *json = [NSMutableDictionary new ];
79
-
80
- if (self.notification ) json[@" notification" ] = self.notification .toJson ;
81
- if (self.action .actionId ) json[@" action" ] = @{@" type" : @((int )self.action .type ), @" id" : self.action .actionId };
82
-
83
- return json;
84
- }
85
- @end
86
-
87
76
@implementation OSNotificationClickEvent (Flutter)
88
77
- (NSDictionary *)toJson {
89
78
NSMutableDictionary *json = [NSMutableDictionary new ];
Original file line number Diff line number Diff line change 35
35
@property (strong , nonatomic ) FlutterMethodChannel *channel;
36
36
+ (instancetype )sharedInstance ;
37
37
38
- @property (atomic ) BOOL hasSetInAppMessageClickedHandler;
39
- /*
40
- Holds reference to any in app messages received before any click action
41
- occurs on the body, button or image elements of the in app message
42
- */
43
- @property (strong , nonatomic ) OSInAppMessageAction *inAppMessageClickedResult;
44
-
45
38
@end
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ - (void)paused:(FlutterMethodCall *)call withResult:(FlutterResult)result {
101
101
}
102
102
103
103
- (void )lifecycleInit : (FlutterMethodCall *)call withResult : (FlutterResult)result {
104
- [OneSignal.InAppMessages addClickListener: OSFlutterInAppMessages.sharedInstance]
104
+ [OneSignal.InAppMessages addClickListener: OSFlutterInAppMessages.sharedInstance];
105
105
[OneSignal.InAppMessages addLifecycleListener: OSFlutterInAppMessages.sharedInstance];
106
106
}
107
107
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ - (void)enterLiveActivity:(FlutterMethodCall *)call withResult:(FlutterResult)re
53
53
NSString *activityId = call.arguments [@" activityId" ];
54
54
NSString *token = call.arguments [@" token" ];
55
55
56
- [OneSignal enterLiveActivity : activityId withToken: token withSuccess: ^(NSDictionary *results) {
56
+ [OneSignal.LiveActivities enter : activityId withToken: token withSuccess: ^(NSDictionary *results) {
57
57
result (results);
58
58
} withFailure: ^(NSError *error) {
59
59
result (error.flutterError );
@@ -63,7 +63,7 @@ - (void)enterLiveActivity:(FlutterMethodCall *)call withResult:(FlutterResult)re
63
63
- (void )exitLiveActivity : (FlutterMethodCall *)call withResult : (FlutterResult)result {
64
64
NSString *activityId = call.arguments [@" activityId" ];
65
65
66
- [OneSignal exitLiveActivity : activityId withSuccess: ^(NSDictionary *results) {
66
+ [OneSignal.LiveActivities exit : activityId withSuccess: ^(NSDictionary *results) {
67
67
result (results);
68
68
} withFailure: ^(NSError *error) {
69
69
result (error.flutterError );
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ - (void)registerForProvisionalAuthorization:(FlutterMethodCall *)call withResult
99
99
}
100
100
101
101
- (void )lifecycleInit : (FlutterMethodCall *)call withResult : (FlutterResult)result {
102
- [OneSignal.Notifications addLifecycleListener :self ];
102
+ [OneSignal.Notifications addForegroundLifecycleListener :self ];
103
103
[OneSignal.Notifications addClickListener: self ];
104
104
[OneSignal.Notifications addPermissionObserver: self ];
105
105
result (nil );
You can’t perform that action at this time.
0 commit comments