Saturday, October 3, 2026
HomeiOS Developmentios - Tips on how to ship native push notifications in a...

ios – Tips on how to ship native push notifications in a time interval

[ad_1]

Lately, I began working with iOS improvement, and I am at present engaged on including new performance to an current app. For the present function, I have to schedule push notifications in a pre-defined time interval, for a selected variety of occasions; as an example between 8:00 and 20:00, each ~2 hours. As well as, I would prefer to outline customized behaviour when the notification is tapped (open a selected view).

I am at present in a position to make use of the prevailing notification service to ship textual content based mostly push notifications on demand, however I am not but in a position to outline this practice interval/behaviour

What’s the easiest way to deal with this situation?

non-public func sendLocalNotification() {

    let content material = UNMutableNotificationContent()
    content material.title = "Title"
    content material.physique  = "Physique"
    
    // defining a set off for customized behaviour
    // var set off: UNNotificationTrigger?
        
    let request = UNNotificationRequest(identifier: TestNotification.identifier, content material: content material, set off: .none)
    userNotificationCenter.add(request, withCompletionHandler: nil)
    }

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments