Display a Notification

Hey all,

Who has a class out there for utilizing Notifications in iOS. I’m particularly interested in being able to display banners and put notifications into the Notification Center.

I am using UIKit, iOSLib and iOSExtensions in my project.

I’m pretty sure there’s nothing built into the extremely lacking iOS Framework in Xojo.

I see things that potentially look like Notification items in UIKit and iOSLib, but I’m not seeing banners and so forth in the examples provided…

So I thought I’d come here and ask.

Thanks!

On iOS there are two types of notifications:
-Local: the app defines a notification in the future and iOS will display a banner if the app isn’t running. Example: a calendar reminder
-Push (remote): a server communicates with Apple Push Notification Service (APNs) to send a notification to a device. Example: Uber notifying a user that the driver is 2 minutes away.

Local notifications are fairly easy with this project from Jason King: https://forum.xojo.com/19335-activate-deactivate-event-doesn-t-fire/p1#p163679

It would be local for sure. Can you still have it appear while in the app?

My app is going to be connected to a device over the network. If specific data comes in from that device, I would like to display it as a banner alert.

If the app is open, it will be up to you to display the notification when the app is active, using the DidReceiveLocalNotification app event from the project linked in my previous post.

Ok. Perfect! Thanks. I will take a look at that!

Unfortunately, the LocaLNotification in the demo app never shows. I was able to get the remote one to show but not the local one.