{"action":"created","issue":{"url":"https://api.github.com/repos/ostinelli/apnotic/issues/54","repository_url":"https://api.github.com/repos/ostinelli/apnotic","labels_url":"https://api.github.com/repos/ostinelli/apnotic/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/ostinelli/apnotic/issues/54/comments","events_url":"https://api.github.com/repos/ostinelli/apnotic/issues/54/events","html_url":"https://github.com/ostinelli/apnotic/pull/54","id":260247025,"number":54,"title":"Add mdm notifications support","user":{"login":"bankair","id":365999,"avatar_url":"https://avatars0.githubusercontent.com/u/365999?v=4","gravatar_id":"","url":"https://api.github.com/users/bankair","html_url":"https://github.com/bankair","followers_url":"https://api.github.com/users/bankair/followers","following_url":"https://api.github.com/users/bankair/following{/other_user}","gists_url":"https://api.github.com/users/bankair/gists{/gist_id}","starred_url":"https://api.github.com/users/bankair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bankair/subscriptions","organizations_url":"https://api.github.com/users/bankair/orgs","repos_url":"https://api.github.com/users/bankair/repos","events_url":"https://api.github.com/users/bankair/events{/privacy}","received_events_url":"https://api.github.com/users/bankair/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-09-25T11:48:05Z","updated_at":"2017-10-05T06:27:55Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/ostinelli/apnotic/pulls/54","html_url":"https://github.com/ostinelli/apnotic/pull/54","diff_url":"https://github.com/ostinelli/apnotic/pull/54.diff","patch_url":"https://github.com/ostinelli/apnotic/pull/54.patch"},"body":"Hi all,\r\n\r\nThis branch adds support for MDM notifications.\r\n\r\nA MDM notification is a nude notification with only the following payload (replace the PushMagicValue string by the correct push magic value sent by the iOS device during the register process):\r\n\r\n```json\r\n{ \"mdm\": \"PushMagicValue\" }\r\n```\r\n\r\n(see https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/MobileDeviceManagementProtocolRef/3-MDM_Protocol/MDM_Protocol.html#//apple_ref/doc/uid/TP40017387-CH3-SW3 for more details)\r\n\r\nFor the sake of simplicity (and to avoid mixing up token and magic push), I choose to use two mandatory keywords parameter to build the notification:\r\n\r\n```ruby\r\nconnection = Apnotic::Connection.new(cert_path: \"apns_certificate.pem\", cert_pass: \"pass\")\r\nnotification = Apnotic::MdmNotification.new(token: '0LIZNDLZI34023I', push_magic: '09908NINZD09898')\r\nresponse = connection.push(notification)\r\n```\r\n\r\nThose notifications serve not other purpose than notifying the device that it's MDM server has pending commands waiting for him to check. The reste of the process (commands check in, and execution) is taken care of by the iOS device and the MDM server."},"comment":{"url":"https://api.github.com/repos/ostinelli/apnotic/issues/comments/334370925","html_url":"https://github.com/ostinelli/apnotic/pull/54#issuecomment-334370925","issue_url":"https://api.github.com/repos/ostinelli/apnotic/issues/54","id":334370925,"user":{"login":"ostinelli","id":110142,"avatar_url":"https://avatars0.githubusercontent.com/u/110142?v=4","gravatar_id":"","url":"https://api.github.com/users/ostinelli","html_url":"https://github.com/ostinelli","followers_url":"https://api.github.com/users/ostinelli/followers","following_url":"https://api.github.com/users/ostinelli/following{/other_user}","gists_url":"https://api.github.com/users/ostinelli/gists{/gist_id}","starred_url":"https://api.github.com/users/ostinelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ostinelli/subscriptions","organizations_url":"https://api.github.com/users/ostinelli/orgs","repos_url":"https://api.github.com/users/ostinelli/repos","events_url":"https://api.github.com/users/ostinelli/events{/privacy}","received_events_url":"https://api.github.com/users/ostinelli/received_events","type":"User","site_admin":false},"created_at":"2017-10-05T06:27:55Z","updated_at":"2017-10-05T06:27:55Z","author_association":"OWNER","body":"Can you please squash these commit into a single one, will review when done, thanks."}}
{"actor":{"display_login":"ostinelli"}}