File tree Expand file tree Collapse file tree 6 files changed +14
-27
lines changed
Expand file tree Collapse file tree 6 files changed +14
-27
lines changed Original file line number Diff line number Diff line change 11group ' com.onesignal.flutter'
2- version ' 2.3.0 '
2+ version ' 2.3.1 '
33
44buildscript {
55 repositories {
Original file line number Diff line number Diff line change 4747- (NSDictionary *)toJson ;
4848@end
4949
50- // TODO: Will reference the OSOutcomeEvent in OneSignal.h
51- // @interface OSOutcomeEvent (Flutter)
52- // - (NSDictionary *)toJson;
53- // @end
54-
5550@interface NSError (Flutter)
5651- (FlutterError *)flutterError ;
5752@end
Original file line number Diff line number Diff line change @@ -112,21 +112,6 @@ - (NSDictionary *)toJson {
112112}
113113@end
114114
115- // TODO: Will reference the OSOutcomeEvent in OneSignal.h
116- // @implementation OSOutcomeEvent (Flutter)
117- // - (NSDictionary *)toJson {
118- // NSMutableDictionary *json = [NSMutableDictionary new];
119- //
120- // json[@"session"] = self.session;
121- // json[@"notification_ids"] = self.notificationIds;
122- // json[@"name"] = self.name;
123- // json[@"timestamp"] = self.timestamp;
124- // json[@"weight"] = self.weight;
125- //
126- // return json;
127- // }
128- // @end
129-
130115@implementation NSError (Flutter)
131116- (FlutterError *)flutterError {
132117 return [FlutterError errorWithCode: [NSString stringWithFormat: @" %i " , (int )self .code] message: self .localizedDescription details: nil ];
Original file line number Diff line number Diff line change 33#
44Pod ::Spec . new do |s |
55 s . name = 'onesignal_flutter'
6- s . version = '2.3.0 '
6+ s . version = '2.3.1 '
77 s . summary = 'The OneSignal Flutter SDK'
88 s . description = 'Allows you to easily add OneSignal to your flutter projects, to make sending and handling push notifications easy'
99 s . homepage = 'https://www.onesignal.com'
@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
1313 s . source_files = 'Classes/**/*'
1414 s . public_header_files = 'Classes/**/*.h'
1515 s . dependency 'Flutter'
16- s . dependency 'OneSignal' , '2.12.1 '
16+ s . dependency 'OneSignal' , '2.12.2 '
1717 s . ios . deployment_target = '8.0'
1818 s . static_framework = true
1919end
Original file line number Diff line number Diff line change @@ -46,9 +46,16 @@ class OSOutcomeEvent extends JSONStringRepresentable {
4646 OSSession .DISABLED ;
4747
4848 // Make sure notification_ids exists
49- this .notificationIds = outcome.containsKey ("notification_ids" ) && outcome["notification_ids" ] != null ?
50- new List <String >.from (json.decode (outcome["notification_ids" ])) :
51- [];
49+ if (outcome.containsKey ("notification_ids" ) && outcome["notification_ids" ] != null ) {
50+ if (outcome["notification_ids" ] is List ) {
51+ // Handle if type comes in as a List
52+ this .notificationIds = (outcome["notification_ids" ] as List ).map <String >((s) => s).toList ();
53+ }
54+ else if (outcome["notification_ids" ] is String ) {
55+ // Handle if type comes in as a String
56+ this .notificationIds = new List <String >.from (json.decode (outcome["notification_ids" ]));
57+ }
58+ }
5259
5360 // Make sure name exists
5461 this .name = outcome.containsKey ("id" ) && outcome["id" ] != null ?
Original file line number Diff line number Diff line change 11name : onesignal_flutter
22description : OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your flutter app with OneSignal
3- version : 2.3.0
3+ version : 2.3.1
44author : Brad Hesse <brad@onesignal.com>, Josh Kasten <josh@onesignal.com>
55homepage : https://github.com/OneSignal/OneSignal-Flutter-SDK
66
You can’t perform that action at this time.
0 commit comments