It's also against the App Store rules to make an app which provides an OS limited service such as push notifications as an API.
It would be one abstraction away, but you're right, it would be pretty close.
> It's also against the App Store rules to make an app which provides an OS limited service such as push notifications as an API.
They don't seem to enforce those rules very consistently, given how many "push notification" services exist today.
I can see spammers creating schemes to obtain peoples notification URL/address and bombarding them with multimedia popup ads with no ability for the user to block them.
Tying notifications to apps at least means that there is some audit trail and ability for users to stop receiving notifications and ultimately for the developer/sender to be removed entirely.
For example, when one of my servers reboots, I have this in cron:
@reboot sleep 600 && echo "Server has rebooted" | mail -s "Alert - Reboot notification" 2125551212@smstext.com
curl -d "Server has rebooted" "ntfy.sh/mytopic?email=phil@example.com"SMS isn't secure and I can't send an iMessage from the command line. Push notification is the only way to get a message securely to my phone.
> I can see spammers creating schemes to obtain peoples notification URL/address and bombarding them with multimedia popup ads with no ability for the user to block them.
I addressed this in a sibling comment -- it would still go through Apple's servers and there is a lot they can do to mitigate that.
> Tying notifications to apps at least means that there is some audit trail and ability for users to stop receiving notifications and ultimately for the developer/sender to be removed entirely.
If apple ran the service, they would have all the same paper trails and mitigations.
What kind of use cases do you have in mind?
Since it would still go through apple servers, they could put mitigations in place, such as checking for repeated messages to multiple accounts, one IP pushing to multiple accounts, the actual content of the message, etc. They could also put an interface right on the phone that lets you mark it as spam. They could also give you an easy way to rotate the key.
> What kind of use cases do you have in mind?
- Set up a cron to trigger an push when I know we need to leave the house.
- Set up a cron to trigger a push at 7pm to all the phones in the house to remind the kids to come to dinner (and remind me it is dinner time).
- Use a weather API and the Nest API to determine when it is time to open or close the window and push that.
- Use my cameras to determine when the postman has arrived and then push that the mail has arrived.
- Basically any useful household information that can be gathered via API and pushed without anyone having to ask for it.
You can also send images captured from your camera in addition to just text notifications.
But the point is I want Apple to do it so I don't have to rely on a 3rd party. I already have to trust Apple with my private data and for the most part rely on their servers to be up.
I don't want to add another service to rely on.