Skip to content

Commit 60ff363

Browse files
author
Joseph Kalash
committed
Added subtitle to prepareUNNotificationRequest
1 parent 147a3ac commit 60ff363

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed
0 Bytes
Binary file not shown.
9.7 KB
Binary file not shown.

iOS_SDK/OneSignal/OneSignalHelper.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,8 @@ + (id)prepareUNNotificationRequest:(NSDictionary *)data :(NSDictionary *)userInf
488488
[content setValue:data[@"m"][@"title"] forKey:@"title"];
489489
if(data[@"m"][@"body"])
490490
[content setValue:data[@"m"][@"body"] forKey:@"body"];
491+
if(data[@"m"][@"subtitle"])
492+
[content setValue:data[@"m"][@"subtitle"] forKey:@"subtitle"];
491493
}
492494
else [content setValue:data[@"m"] forKey:@"body"];
493495
}
@@ -496,6 +498,7 @@ + (id)prepareUNNotificationRequest:(NSDictionary *)data :(NSDictionary *)userInf
496498
if([data[@"aps"][@"alert"] isKindOfClass:[NSDictionary class]]) {
497499
[content setValue:data[@"aps"][@"alert"][@"title"] forKey:@"title"];
498500
[content setValue:data[@"aps"][@"alert"][@"body"] forKey:@"body"];
501+
[content setValue:data[@"aps"][@"alert"][@"subtitle"] forKey:@"subtitle"];
499502
}
500503
else [content setValue:data[@"aps"][@"alert"] forKey:@"body"];
501504
}

0 commit comments

Comments
 (0)