File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
iOS_SDK/OneSignalSDK/Source Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -169,10 +169,20 @@ - (void)parseActionButtons:(NSArray<NSDictionary*>*)buttons {
169169 continue ;
170170 }
171171
172- [buttonArray addObject: @{
173- @" text" : button[@" n" ],
174- @" id" : (button[@" i" ] ?: button[@" n" ])
175- }];
172+ NSMutableDictionary *actionDict = [NSMutableDictionary new ];
173+ actionDict[@" text" ] = button[@" n" ];
174+ actionDict[@" id" ] = button[@" i" ] ?: button[@" n" ];
175+
176+ // Parse Action Icon into system or template icon
177+ if (button[@" icon_type" ] && button[@" path" ]) {
178+ if ([button[@" icon_type" ] isEqualToString: @" system" ]) {
179+ actionDict[@" systemIcon" ] = button[@" path" ];
180+ } else if ([button[@" icon_type" ] isEqualToString: @" custom" ]) {
181+ actionDict[@" templateIcon" ] = button[@" path" ];
182+ }
183+ }
184+
185+ [buttonArray addObject: actionDict];
176186 }
177187
178188 _actionButtons = buttonArray;
You can’t perform that action at this time.
0 commit comments