|
Good morning Haven't found any reference here to an example how to extend an existing iOS app to be able to receive push notifications... Just now that an AppDelegate.swift file is involved (o; Interesting that push notifications is not handled in any of the four iOS books...or I am totally blind this morning (o; thanks in advance richard |
|
|
|
Read through the Ray Wenderlich intro as well...and still wondering where AppDelegate.swift is coming from:
From the description it isn't just an empty file to be created but needs to be already there... |
|
Looks this one is the best documentation for erceiving push notifications as it explains how to use the AppDelegate adapter: |
|
Recently completed a SwiftUI based iOS application (now in TestFlight) using Firebase realtime database including push notifications. The code indeed looks very similar to that of the above mentioned examples, however, the most difficult part was to implement Firebase push notifications on database updates. Happy to share some details if you wish. |
|
Thanks for the generous offer....just great community here :-) But...it already works with my Debian Server...yessss :-) Trick was to get the deviceToken Hex String from my iPhone..... Now how do I get rid of the icon badge now (o; Sure a function is missing in my AppDelegate..... |
|
Ah simple...just don't send a badge...:
But still would be good to know how to jump into a specific view and clear the icon badge.... Like to open the right tab view and jump into the detail view of the order.... |
|
My guess is it is in the downloaded materials for this tutorial. The tutorial was created for Xcode 12 and iOS 14. Also, this was updated from an even older iOS version. Just for information. There is a complete book about Push Notifications: https://www.raywenderlich.com/books/push-notifications-by-tutorials But it's not free and not yet updated for iOS 15, unfortunately. |
|
Clearing the badge icon is best done when the user activates the main application view.
|
|
What pops into my mind... I use the AppDelegate adaptor to register the device token on my server for delivering the notifications... But how do people handle:
Can those two cases also be handled somehow so that the registred tokens are removed as well? thanks in advance richard |
SAVE 50% All our books and bundles are half price for Black Friday, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.