{"action":"created","issue":{"url":"https://api.github.com/repos/fechanique/cordova-plugin-fcm/issues/169","repository_url":"https://api.github.com/repos/fechanique/cordova-plugin-fcm","labels_url":"https://api.github.com/repos/fechanique/cordova-plugin-fcm/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/fechanique/cordova-plugin-fcm/issues/169/comments","events_url":"https://api.github.com/repos/fechanique/cordova-plugin-fcm/issues/169/events","html_url":"https://github.com/fechanique/cordova-plugin-fcm/issues/169","id":189008699,"number":169,"title":"Please share code of test server","user":{"login":"solucionesmipc","id":10853070,"avatar_url":"https://avatars.githubusercontent.com/u/10853070?v=3","gravatar_id":"","url":"https://api.github.com/users/solucionesmipc","html_url":"https://github.com/solucionesmipc","followers_url":"https://api.github.com/users/solucionesmipc/followers","following_url":"https://api.github.com/users/solucionesmipc/following{/other_user}","gists_url":"https://api.github.com/users/solucionesmipc/gists{/gist_id}","starred_url":"https://api.github.com/users/solucionesmipc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solucionesmipc/subscriptions","organizations_url":"https://api.github.com/users/solucionesmipc/orgs","repos_url":"https://api.github.com/users/solucionesmipc/repos","events_url":"https://api.github.com/users/solucionesmipc/events{/privacy}","received_events_url":"https://api.github.com/users/solucionesmipc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-14T00:57:13Z","updated_at":"2016-11-22T15:07:08Z","closed_at":null,"body":"Hi;\r\n\r\n i can receive notifications when using your test server \"https://cordova-plugin-fcm.appspot.com/\"\r\n\r\nbut when try my own php server, i receive message in android but not in IOS.\r\n\r\nplease share that PHP code. (i guess it is PHP)\r\n\r\nThanks a lot : )\r\n\r\nit is my php code. working in android.\r\n\r\n`<?php\r\n// API access key from Google API's Console\r\ndefine( 'API_ACCESS_KEY', 'AIzaSyA6SJ2Tw29mM09JUW1DKCdfddfdRBoXBo' );\r\n// set only for one for safety\r\n$registrationId = $_GET['id'];\r\n$texto = $_GET['texto'];\r\n// prep the bundle\r\n$msg = array\r\n(\r\n    'title'     => 'Atenciòn.',\r\n    'body'  => $texto,\r\n    'priority'  => 'high',\r\n    'icon'  => 'myicon',\r\n    'sound' => 'default'\r\n    \r\n);\r\n$fields = array\r\n(\r\n    'to'    => $registrationId,\r\n    'notification'          => $msg\r\n);\r\n\r\n$headers = array\r\n(\r\n    'Authorization: key=' . API_ACCESS_KEY,\r\n    'Content-Type: application/json'\r\n);\r\n\r\n$ch = curl_init();\r\ncurl_setopt( $ch,CURLOPT_URL, 'https://fcm.googleapis.com/fcm/send' );\r\ncurl_setopt( $ch,CURLOPT_POST, true );\r\ncurl_setopt( $ch,CURLOPT_HTTPHEADER, $headers );\r\ncurl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );\r\ncurl_setopt( $ch,CURLOPT_SSL_VERIFYPEER, true );\r\ncurl_setopt( $ch,CURLOPT_POSTFIELDS, json_encode( $fields ) );\r\n$result = curl_exec($ch );\r\ncurl_close( $ch );\r\necho $result;\r\n?>`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/fechanique/cordova-plugin-fcm/issues/comments/262264999","html_url":"https://github.com/fechanique/cordova-plugin-fcm/issues/169#issuecomment-262264999","issue_url":"https://api.github.com/repos/fechanique/cordova-plugin-fcm/issues/169","id":262264999,"user":{"login":"aeremin","id":10253195,"avatar_url":"https://avatars.githubusercontent.com/u/10253195?v=3","gravatar_id":"","url":"https://api.github.com/users/aeremin","html_url":"https://github.com/aeremin","followers_url":"https://api.github.com/users/aeremin/followers","following_url":"https://api.github.com/users/aeremin/following{/other_user}","gists_url":"https://api.github.com/users/aeremin/gists{/gist_id}","starred_url":"https://api.github.com/users/aeremin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeremin/subscriptions","organizations_url":"https://api.github.com/users/aeremin/orgs","repos_url":"https://api.github.com/users/aeremin/repos","events_url":"https://api.github.com/users/aeremin/events{/privacy}","received_events_url":"https://api.github.com/users/aeremin/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T15:07:08Z","updated_at":"2016-11-22T15:07:08Z","body":"My guess is that you need to provide some additional data in payload JSON. But I don't have ios device, so can't test it."}}
{"actor":{"display_login":"aeremin"}}