Post

Replies

Boosts

Views

Activity

Push Notifications are not delivered to a good percentage of users
Hi all, In the app I developed for iOS I am using Firebase SDK (cloud messaging FCM) to provide the topic feature to deliver notification to thousands subscribed iOS users. I know FCM does not directly deliver the notifications to the final users and this is just an intermediary that formats the notification in way the APNs can understand client by client (using the APN device tokens) and this service (APNs) is in charge of delivering the notifications to the final users. The notifications are sent from a linux server through a cURL request to FCM. One example of silent notification that is like a heartbeat is below: !/bin/sh notifID=`date +"%Y%j"` value=`date -u "+%s.%N"` curl -H "Content-type: application/json" \ -H "Authorization:key=XXXXXXSECRETXXXXXX" \ -X POST -d '{ "to": "/topics/ioschannel","content_available":true,"data":{"notificationType":"silentNotification","silentNotificationId":"'$notifID'","senttime":'$value'},"priority":"high","headers":{"apns-priority":"10"},"time_to_live":60}' \ https://fcm.googleapis.com/fcm/send In the below image you can see some statistics provided by the metrics in the Apple Push Notification Console. We currently have almost 5.5k users who have mainly installed the app on their iPhones. As you can notice the APNs received a bit more than 5k notifications but what it is remarkable is the fact that only about 70% of the users receive the notification on their devices. Few notifications are on the APNs storage and delivered later on. Some devices can be offline and others are can be on power save mode but I don't understand why so many users are not receiving the notification (this particular notification is sent at 5 pm local time). Aside from the example silent notification I send other notifications to be processed in the background in the app in order to evaluate and decide to present or not a notification on the notification bar with a sound. The situation is the same, almost the same percentage don't receive the notification and almost 70% receive them on time. I have another app in Android and I don't have this problem. More than 90% of the users receive the notifications. What it is really interesting about Android is that the user can provide the permission to remove the app from the battery optimization. This is really important permission because the Android OS provides resources (network and giving priority to received push notifications) and even in power save mode the notifications are delivered. If I go straight from our linux server to APNs this situation won't change because APNs cannot deliver the notifications. Why is this happening? Is there any way to provide a permission to the app to have the highest priority? Any advice, feedback or hint will be really appreciated.
0
1
481
Jan ’24
How to debugging EXC_BAD_ACCESS KERN_INVALID_ADDRESS
Hi all, I'm trying to find the reason why my app is crashing and fix it. This is just happening in some devices and others are working fine. I have no idea how to do it and any hint on what to do will be really appreciated. I am in a test stage using testFlight and I am using crashlytics to collect the errors. The apps has Firebase services (Push Notification, firestore, crashlytics) google maps, Realm and more. The error is below: EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000018 Crashed: com.apple.main-thread 0 myapp 0x3dcd4c gmscore::vector::TextureAtlasElement::height() const + 72916 1 myapp 0xe9e50 (anonymous namespace)::BubbleBehavior::Commit(gmscore::renderer::EntityRenderer*) + 4373995088 2 myapp 0x2d14ac gmscore::renderer::EntityRenderer::Draw(bool, bool) + 340 3 myapp 0x39d2dc -[GMSPhoenixRenderer drawForced:deferredPresentation:] + 13156 4 myapp 0x37ed2c -[GMSEntityRendererView draw] + 116072 5 myapp 0x3c2aa0 -[GMSVectorMapView draw] + 166696 6 myapp 0x37d140 -[GMSEntityRendererView displayLinkFired:] + 108924 7 myapp 0x37b4a8 -[GMSDisplayLink displayLinkFired:] + 101604 8 QuartzCore 0x2fa14 CA::Display::DisplayLinkItem::dispatch_(CA::SignPost::Interval<(CA::SignPost::CAEventCode)835322056>&) + 48 9 QuartzCore 0x32bfc CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 864 10 QuartzCore 0x32708 CA::Display::DisplayLink::callback(_CADisplayTimer*, unsigned long long, unsigned long long, unsigned long long, bool, void*) + 844 11 QuartzCore 0xb191c CA::Display::DisplayLink::dispatch_deferred_display_links(unsigned int) + 348 12 UIKitCore 0xaa48c _UIUpdateSequenceRun + 84 13 UIKitCore 0xa9b7c schedulerStepScheduledMainSection + 144 14 UIKitCore 0xa9c38 runloopSourceCallback + 92 15 CoreFoundation 0x3731c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 16 CoreFoundation 0x36598 __CFRunLoopDoSource0 + 176 17 CoreFoundation 0x34d4c __CFRunLoopDoSources0 + 244 18 CoreFoundation 0x33a88 __CFRunLoopRun + 828 19 CoreFoundation 0x33668 CFRunLoopRunSpecific + 608 20 GraphicsServices 0x35ec GSEventRunModal + 164 21 UIKitCore 0x22c2b4 -[UIApplication _run] + 888 22 UIKitCore 0x22b8f0 UIApplicationMain + 340 23 UIKitCore 0x4559c8 __swift_destroy_boxed_opaque_existential_1Tm + 12220 24 myapp 0x34704 main + 4373251844 (AppDelegate.swift:4373251844) 25 ??? 0x1bb0badcc (Falta)
2
0
1.2k
Dec ’23