Closed idyll closed 8 years ago
@ostinelli is there a specific change you'd like to this PR in order to accept it?
Yes, this is hacking Apnotic::Notification
. It should be a complete new class. If an attribute (payload
) "Replaces ALL subsiquent values with the payload specified" (cit) then there's probably a design issue.
Let me know if you want to change this, or I can help.
The MDM notification documentation isn't public AFAIK - or I'd just share it - but really my goal here was to allow a simple way to just override what the notification does.
If that makes sense in a new class I can pull it out. What would you call it? GenericNotification?
In this case I'd wait for documentation to become public and official. Closing for now, we can reopen and reconsider as soon as it becomes official.
It's been "official" since iOS 4. It's just private for whatever reason.
And unfortunately having an aps
key is invalid in an MDM notification so using custom_payload
to try to get around the limitations of the current model isn't sufficient.
The only thing I need is a public statement that this is a public feature supported and here to stay (at least for a while). Documentation is obviously a powerful statement, but a talk / apple article would do too. I basically want to ensure that what we implement cannot break without notice.
This isn't the same documentation that I am using, but here's more info:
That at least shows the structure of the push.
Hello, @ostinelli have you considered reopening the issue? MDM Push notification is the only way to get a device to checkin with your server when you use MDM, it's been like this since iOS 4 and it seems that it's going nowhere :)
I would love to be able to use your gem for MDM.
This PR addresses #32.
Unfortunately the Apple documentation for this is private. I have tried to make this generic to support arbitrary payloads as I think there are some other types.