Push Notifications Tutorial: Getting Started

Thanks champ - works perfect!
For future readers:
Just rename ‘Element’ → ‘element’. I changed the few places after declaration manually, now it compiles and works great.

Great tutorial!

A warning re: Silent Push Notifications: there are bugs in iOS 11. For me, this evening, that portion of the example code is never called/activated by iOS. See here for similar tales of woe: push notification - Silent pushes not delivered to the app on iOS 11 - Stack Overflow

For anyone else stumbling into the Element issue on line 457 of the code, refactoring that alone won’t do the trick. First, I refactored from Element to ElementSW at line 457. You’ve also got to rename the .Element in the switch statements scattered throughout the class. I did a find/replace on .Element(, changing it to .ElementSW( and that did the trick.

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]