user6520705
user6520705

Reputation: 705

Swift Phone Call like ring / alarm / vibrating notifications without Pushkit / Callkit

I am building an app using Firebase server for push notifications. I want to build a feature where a user can ping another user, kind of like a beeper.

I would like to have the incoming notification be more powerful than a single vibration like you are getting a text message, something more similar to a phone call or an alarm app.

My app does not use VOIP so callkit, and pushkit are not an option.

Possible solutions Ive thought of 1. Sending multiple push notifications and then grouping them to make it feel like a call 2. Using a voip service, but when a call is made just mute both ends and end the call as soon as the user picks up.

Upvotes: 0

Views: 899

Answers (2)

xinkecf35
xinkecf35

Reputation: 387

So even with the introduction of Core Haptics, sadly it looks like this is still not possible. Refer to this SO answer here for that conclusion and UNMutableNotificationContent for a list of properties you can modify for a push notification. As you can see, there is no field for you to be able to specify a custom vibration pattern.

Addendum: Depending on the user experience you have in mind, you can still do what you want probably with Core Haptics and UNUserNotificationCenterDelegate, specifically this method call. Caveat is that you will only be able to do custom haptic feedback while the app is in the foreground and the user receives the ping during that time.

Upvotes: 1

user13176175
user13176175

Reputation:

You must give more/spesific information about your question.I think you are new at development.The most usefull advice is official swift resources.Follow this articles, it will create concepts about development in your mind.Then, when you want ask about these concepts, we will here to help you.Good Works!

https://developer.apple.com/swift/

Upvotes: 0

Related Questions