shinyorg / shiny

.NET Framework for Backgrounding & Device Hardware Services (iOS, Android, & Catalyst)
https://shinylib.net
MIT License
1.44k stars 227 forks source link

[Bug]: MAUI iOS token not working with Firebase. (Previously under issue #1377) #1382

Closed Yahya0007 closed 7 months ago

Yahya0007 commented 7 months ago

Component/Nuget

Push - Native (Shiny.Push)

What operating system(s) are effected?

Version(s) of Operation Systems

iOS 17.2.1

Hosting Model

Steps To Reproduce

Sample project repository attached. Running sample project will come up with a token. Using this token does not work with sending Push.

Expected Behavior

Push token should work when sending push notifications to iOS devices using Firebase.

Actual Behavior

Sending push notifications to iOS devices comes up with below exception;

FirebaseMessagingException: The registration token is not a valid FCM registration token

Exception or Log output

System.AggregateException HResult=0x80131500 Message=One or more errors occurred. (The registration token is not a valid FCM registration token) Source=System.Private.CoreLib StackTrace: at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at XFFCMPushNotificationsSample.Send.Program.Main(String[] args) in F:\Projects....\Program.cs:line 39

This exception was originally thrown at this call stack: [External Code]

Inner Exception 1: FirebaseMessagingException: The registration token is not a valid FCM registration token

Code Sample

Sample app repository link: https://github.com/Yahya0007/Shiny-Issue-1377-Sample

Invite to join this private reposiorty sent.

Code of Conduct

aritchie commented 7 months ago

Please make the link public

Yahya0007 commented 7 months ago

Link to public repository: https://github.com/Yahya0007/Shiny-Issue-1377-Sample3

Thanks

aritchie commented 7 months ago

You aren't using the firebase messaging plugin which is necessary for iOS if you want it to use firebase

https://shinylib.net/client/push/providers/

Yahya0007 commented 7 months ago

HI Allan, Thanks a lot. Very embarrassed at wasting your time. Regards