Skip to content

Commit 735becb

Browse files
committed
Add OSInAppMessage
* Add OSInAppMessage to OSFlutterCategories
1 parent ba9eca1 commit 735becb

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

ios/Classes/OSFlutterCategories.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
- (NSDictionary *)toJson;
4444
@end
4545

46+
@interface OSInAppMessage (Flutter)
47+
- (NSDictionary *)toJson;
48+
@end
49+
4650
@interface NSError (Flutter)
4751
- (FlutterError *)flutterError;
4852
@end

ios/Classes/OSFlutterCategories.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,16 @@ - (NSDictionary *)toJson {
9797
}
9898
@end
9999

100+
@implementation OSInAppMessage (Flutter)
101+
- (NSDictionary *)toJson {
102+
NSMutableDictionary *json = [NSMutableDictionary new];
103+
104+
json[@"message_id"] = self.messageId;
105+
106+
return json;
107+
}
108+
@end
109+
100110
@implementation NSError (Flutter)
101111
- (FlutterError *)flutterError {
102112
return [FlutterError errorWithCode:[NSString stringWithFormat:@"%i", (int)self.code] message:self.localizedDescription details:nil];

0 commit comments

Comments
 (0)