-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Unity ios cloud message with image #1123
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
any updates? |
Hey @jedai7, sorry this took a while. Upon testing, it seems that this also happens on native iOS. Could you file an issue to the Firebase iOS SDK? For context, the Firebase Unity SDK acts as a wrapper, and if the underlying SDK encounters the issue, then the fix would likely be applied on the native SDK. That said, I'll go ahead and close this thread. Feel free to reply back here in case of any updates. Thanks! |
Hi @jedai7, our colleagues informed me that it could be an issue specifically with our Unity SDK. Let me investigate this further and reply back once I have updates to share with you. |
Just some updates, it looks like in iOS there are extra setups needed to get the image to show in Firebase Messaging. Specifically adding, this code snippet. Now for Unity builds, while I think it is possible to add Notification Service Extension with Xcode after exporting the iOS project. The FCM docs for Unity does not specify how to add the following equivalent code in @implementation NotificationService
- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler {
self.contentHandler = contentHandler;
self.bestAttemptContent = [request.content mutableCopy];
// Modify the notification content here as you wish
self.bestAttemptContent.title = [NSString stringWithFormat:@"%@ [modified]",
self.bestAttemptContent.title];
// Call FIRMessaging extension helper API.
[[FIRMessaging extensionHelper] populateNotificationContent:self.bestAttemptContent
withContentHandler:contentHandler];
} Let me bring this up to our engineers and see if we have an official guide for setting this up. |
Hey @jedai7, it looks like we don't have this feature available yet for Firebase Unity SDK. I've consulted this with our engineer and have concluded that we likely need to add an equivalent C# code for this feature. That said, we are unable to promise any timeline for this, but we'll definitely keep this under our radar. |
What is your question?
I have android and ios build from unity 2021.3.24. And i want to send push notification with image. In Android it works fine
but on ios its dont work. Image missing
Can you help with this. Maybe i made some mistake
I use this variant for sending messages
Firebase Unity SDK Version
12.1.0
Unity editor version
2021.3.24
Installation Method
.unitypackage
Problematic Firebase Component(s)
Messaging
Other Firebase Component(s) in use
Analytics, Crashlytics, Messaging, Remote Config
Additional SDKs you are using
No response
Targeted Platform(s)
Apple Platforms, Android
Unity editor platform
Mac
Scripting Runtime
IL2CPP
Release Distribution Type
Pre-built SDK from https://firebase.google.com/download/unity
The text was updated successfully, but these errors were encountered: