Open EugeneSnihovsky opened 6 years ago
@EugeneSnihovsky seems like this would be fixed by #2266. Can you give that PR a review and try it out locally to see if it fixes your problem?
@macdonst I implemented locally in Xcode changes for all 4 files from this request, relaunch app on my device and it not helped. Notifications worked but without sound. Maybe I missed something?
Without my fixes (original plugin version and version with 2266 fixes) using received token from plugin, I can send notification with Production VoIP Services Certificate
Establish connectivity between your notification server, the Apple Push Notification service sandbox, and production environment to alert background VoIP apps of incoming activity. A separate certificate is required for each app you distribute.
It creates from apple developer => certificates => add icon
With fixes from my topic I receive other token that can't be used with certificate from 1. I need Apple Push Notification service SSL Certificates
To configure push notifications for this iOS App ID, a Client SSL Certificate that allows your notification server to connect to the Apple Push Notification Service is required. Each iOS App ID requires its own Client SSL Certificate. Manage and generate your certificates below.
It creates from apple developer => Identifiers => my app id => edit => Push Notifications => Create Certificate
. And all works correct
NOTE: my fixes has some bug and I receive correct token not in cordova on registration callback
, this callback still return token that work as in 1. Correct token I receive from Xcode log
Unexpected call to didRegisterForRemoteNotificationsWithDeviceToken, ignoring: <1d32b314 48060e21 18b8f001 8bc1da0f 3d92ee23 89db0050 23b4f022 5bb5f6cf>
Hello guys!
Actual Behaviour
I init voip notifications on my real device (iPad, iOS 10.3.3) like this
And found strange behaviour in voip notifications:
sound
field in payload, even if it set asdefault
- not work at all, only worked field in payload isalert
Sended payload:
I receive this notifications (see text field and sound field in it), but without any sounds.
Possible solution
After some researches I found this solution. According to it I changed in
Xcode => Classes
two filesAppDelegate.h
before
after
AppDelegate.m
before
after
Changes in app after this fixes
sound
field in payload begin to work correctly as expected (device play custom and default music during notification)So problem is solved but how can I automate fixes for
AppDelegate.(h|m)
files? Can this be implemented in new versions of your plugin or I have a specific case?