-
Notifications
You must be signed in to change notification settings - Fork 0
/
Untitled Document
57 lines (36 loc) · 1.21 KB
/
Untitled Document
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
$data = [
"aps" => [
"alert" => [
"title" => "Push Remote Rich Notifications",
"subtitle" => "iOS 10 - New API",
"body" => "Media Image Rich notification"
],
"mutable-content" => 1,
"category" => "imageIdentifier"
],
"data" => [
"attachment-url"=> "https://raw.githubusercontent.com/Sweefties/iOS10-NewAPI-UserNotifications-Example/master/source/iOS10-NewAPI-UserNotifications-Example.jpg"
]
];
$message = PushNotification::Message('Hello World, i`m a push message',array(
'badge' => 1,
'sound' => 'example.aiff',
"mutable-content" => 1,
"media-url" => "https://i.imgur.com/t4WGJQx.jpg",
'actionLocKey' => 'Action button title!',
'locKey' => 'localized key',
'locArgs' => array(
'localized args',
'localized args',
),
'launchImage' => 'image.jpg',
'custom' => array('custom data' => array(
"mutable-content" => 1,
"media-url" => "https://i.imgur.com/t4WGJQx.jpg",
'we' => 'want', 'send to app'
))
'custom' => array( "mutable-content" => 1,
"media-url" => "https://i.imgur.com/t4WGJQx.jpg" )
)
);
return json_encode($message);