Home > database >  Unable to make push notifications works on a SwiftUI app with Firebase cloud Messaging
Unable to make push notifications works on a SwiftUI app with Firebase cloud Messaging

Time:11-18

I'm trying to implement push notifications with Firebase Cloud Messaging on an iOS application.

My applications uses the SwiftUI life cycle.

I followed the official documentation from Firebase enter image description here (I erased the empty fields for the image)

I set the next capabilities enter image description here

On the info.pils I set FirebaseAppDelegateProxyEnabled to false

Also, I have an App ID with the Push Notification checked enter image description here

In my profile says I enable to use Push notifications.

enter image description here

And I set the provisioning profile on Xcode

Any idea? Any help will be appreciated

CodePudding user response:

Finally, I found a solution. The official documentation suggest changing the methods if you disable swizzling, or you are building a SwiftUI application. I don't know why they suggest that, because if you keep the original methods, works....

I follow this tutorial and now push notifications arrive to my device.Excellent tutorial

CodePudding user response:

Okay, now I realize that with the methods of this post works also. You only have to edit that.

 completionHandler([[.banner,.badge ,.sound]]).
  • Related