Although I disable notification permission in setting, still receive push notification when app in foreground
AppDelegate::application(_:didReceiveRemoteNotification:fetchCompletionHandler:)[L:------------------didReceiveRemoteNotification [AnyHashable("aps"): {
alert = {
body = "Push payload body";
subtitle = "Test push notification";
title = "Push Hero";
};
}]------------------]
Notifications
RSS for tagLearn about the technical aspects of notification delivery on device, including notification types, priorities, and notification center management.
Post
Replies
Boosts
Views
Activity
Until iOS 17.2, the didreceiveremotenotification function was executed for remote notifications without an alert key in APNs, but this is not the case starting from version 17.3.
I tested it with the same app, different versions.
I'm excited to bring my Live Activity to Apple Watch via the .supplementalActivityFamilies([.small]) modifier.
However, I'm also wondering whether it is possible for my watchOS app, separately, to initiate a Live Activity and receive updates for it via push notification. From my testing it seems like no, but the function call itself can be made, since ActivityKit is available on watchOS.
Are there any other recommendations for how to go about initiating a Live Activity from a watchOS app? Would I have to communicate with a companion iOS app to start the Live Activity on the phone instead?
I've implemented Communication Notifications in my messaging application but am having difficulty with figuring out why notifications aren't being grouped by conversation - instead, they all collapse into a single group. I've verified that the conversationIdentifier of the INSendMessageIntent is being correctly set for my notifications, along with the speakableGroupName. Is there anything else I could be missing to achieve the desired conversation grouping behaviour?
I am getting a lot of messages of the nature that follows;
"RoomPlanExampleApp[606:114689] [ClientDonation] (+[PPSClientDonation sendEventWithIdentifier:payload:]) Invalid inputs: payload={
aneModelPath = "/System/Library/PrivateFrameworks/ObjectUnderstanding.framework/PrecompiledModels/od_af_online.bundle/H14G.bundle/main/main_ane/model.hwx";
bundleIdentfier = "com.example.apple-samplecode.RoomPlanExampleApp9QSS565686";
}"
WHAT is the component origin of the message? What can be done to remedy it?
This is another example of an error message that does not have enough information for the developer to take remedial action.
It is received fine when the watch app is in the foreground.
Code sample:
import Foundation
import PushKit
final class PushNotificationProvider: NSObject {
let registry = PKPushRegistry(queue: nil)
override init() {
super.init()
registry.delegate = self
registry.desiredPushTypes = [.complication]
}
func pushRegistry(_ registry: PKPushRegistry, didUpdate pushCredentials: PKPushCredentials, for type: PKPushType) {
Log("token received")
}
func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType, completion: @escaping () -> Void) {
Log("push received")
completion()
}
}
Watch app:
import SwiftUI
@main
struct XX_Watch_App: App {
@WKApplicationDelegateAdaptor var appDelegate: XXWearableAppDelegate
private let push = PushNotificationProvider()
var body: some Scene {
WindowGroup {
AppView(...)
}
}
}
Hello everyone,
I'm getting desperate... I have built a small chat app and just can't get the other person to receive a push notification outside the app.
Does anyone have a code snippet or an idea how I can solve this? I'm getting desperate!
I have already tried a lot, the best would be a local solution where the message is triggered when the user receives a new message.
I would be happy to receive code snippets or tips. Sending via OneSignal works, but as I said, I just can't get the user to user messages to work!
Hi, I am having trouble with my imessage notification. I use to have the notifications where it would show their name but not the message until you unlocked the phone. Not sure what happened but I cannot figure how to get back to that!
As for the functional adaptation of Priority Notifications and Maybe Important, do we need to adapt as developers? If necessary, can you guide me to adapt, I can't find the relevant API, sorry。
As per subject. Is this possible at all?
The WWDC video only talks about the communication / push notifications. There doesn't seem to be any update to UNNotificationContent to allow setting of attributed strings.
If your app makes use of communication notifications you can even include Genmoji and other image glyphs in your notifications with the new "UNNotificationAttributed MessageContext API". For push notifications, the payload just needs to contain a rich text representation that may contain image glyphs.
We recommend that you use a Notification Service Extension to parse the rich text, download assets, create the attributed body and update the notification content
For a few years now, I have submitted requests for com.apple.developer.usernotifications.filtering entitlement, but never got an approval/denial response from apple. even after contacting them via email, still didn't get a response about the request status.
our app is an emergency alerts app, this entitlement is crucial for our app reliability.
Last request i have sent has Case-ID: 7377207
Hi,
We are trying to implement a system that delivers real time data updates to our apps through the Firebase Cloud Messaging system using the REST API with the relevant payload. We set content-available to 1 so that the payload delivery is silent.
We use the didReceiveRemoteNotification delegate function to receive the push notification. It works seamlessly when the app is built through Xcode but when we tried it on an .ipa, the delegate function is not called.
We have tried setting different parameters in apps-priority and apps-push-type but without much success. Apple documentation points out that there are some restrictions when it comes to receiving silent push notifications in this way. But in our case, it looks like Xcode builds work perfectly while ipa builds are very spotty at best.
Is this not the right method to receive real time data updates? It was our impression that this is how chat apps for example are setup to receive real time text updates.
If this method cannot be used, does anyone have any other suggestion as to how to go about achieving the same behaviour within our apps?
Thank you!
Fardin
Hi Everyone,
I am setting apns expiration in the push payload sending to apple server. push expires in 30 seconds as per the configuration using development certificates.
However the same logic does not work when I use adhoc profile but works in App store .
Any specific reason it does not work using adhoc profile?
About ten minutes ago, a gray notification popup appeared in the upper right corner of my desktop, something about not using my Apple ID. Before I could see what it was, it retracted into the "side" of the desktop again, and I cannot locate it.
In Sonoma, notifications were in the notifications but where do I find messages like that in Sequoia? It's not in the Notification Center, and I can't find a widget to show them, nor is it in the Console.
Thanks for any help.
I work on an App that uses Live Activities and shows a countdown. We want to use it without the seconds. We are currently using Text(getDate(), style: .relative). Is there a new method in Swift to show the countdown on a Live Activity without seconds being displayed.
We recently noticed that our app is receiving duplicate notifications, and this is impacting multiple users, and we verified from our server that we are sending the notifications only once
This is a sample payload of the notifications we are sending
{
"aps": {
"alert": {
"title": "title",
"body": "body"
},
"category": "test",
"mutable-content": 1
},
"navigateTo": "test",
"imageUrl": "test"
}
Also a user with IOS 17.5.1 reported this issue also
The activityStyle documentation incorrectly lists tvOS - https://developer.apple.com/documentation/activitykit/activitystyle
Spoke to someone at WWDC who asked I report this here. Thanks!
I am trying to set up the push notification for iOS for React Native version 0.71.7. I have done all the setup for this push notification which is mentioned in your git repository. Push notification was working fine for my old version of project 0.67.2. But in this new version, it is not working. Please help me out to solve this problem.
Mechine Configaration :- Mac Os Version:- 14.4.1 Xcode Version:- 15.3 Node Version:- v20.12.0 RN Version:- 0.71.7
Git issue link :- https://github.com/react-native-push-notification/ios/issues/443
Please help me to solve this problem i have been suffering from this problem for a long time after upgrading the React native project version.
Hi,
I have a question regarding the badge in push notifications. I am implementing the following code to set the badge to 0 in order to remove it from the app:
swift
if #available(iOS 16, *) {
let center = UNUserNotificationCenter.current()
center.setBadgeCount(0)
} else {
application.applicationIconBadgeNumber = 0
}
When I call setBadgeCount(0), the badge disappears, but the notifications in the Notification Center remain. On the other hand, when I call application.applicationIconBadgeNumber = 0, the badge disappears and all notifications in the Notification Center are cleared. Additionally, if no badge is displayed, calling application.applicationIconBadgeNumber = 0 does not clear the notifications in the Notification Center.
Is this behavior expected?
If it is expected, is there a way to call setBadgeCount(0) and clear all notifications in the Notification Center? Also, is there a way to call application.applicationIconBadgeNumber = 0 without clearing the notifications in the Notification Center?
Setup and status:
The app is under an Enterprise dev account.
The app has Push Notifications, Remote Notifications and Voice over IP entitlements selected, among other, unrelated (I think) items.
On launch, the app successfully registers via PushKit and gets back a valid device token.
This token is copied from the Xcode console, and used to send VOIP pushes via the iCloud push console: https://developer.apple.com/notifications/push-notifications-console/
Results:
For a debug build loaded onto a physical device, the push console reports successful delivery of the VOIP push to the device. However, VOIP pushes are only received by the app when it is in the foreground. If the app is in the background or not running, it is not woken/launched.
The docs mention the need for a special VOIP push certificate, but my understanding is that is required between my server and Apple's servers. Since I am using the push console, I assume that removes the need for the certificate.
So, what am I missing?