Best Practices

Don’t spam your users. Just because local notifications don’t require opt-in doesn’t mean that you should abuse them for marketing. Here’s a rule of thumb: If a notification doesn’t deliver information that your user specifically requested, don’t send it. (This goes for push notifications as well. When users opt in, they’re not opting in for spam.)

An unsolicited notification is not the user experience you should be aiming for. When your notification arrives in the middle of dinner or at 3 in the morning, you fail to win hearts, reviews, and customers.

Excess notifications are wrong, regardless of whether users can switch on “do not disturb” features. Apple regularly refuses applications that send ads through push notifications; ...

Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.