You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ImageOnly message shows incorrect message type. It may be a bug of parsing passing data.
Steps to reproduce:
add new message as Image Only message at Firebase Console
send test message
open app with following code
Relevant Code:
classSample:InAppMessagingDisplay{func displayMessage(_ messageForDisplay:InAppMessagingDisplayMessage, displayDelegate:InAppMessagingDisplayDelegate){
switch messageForDisplay.type {case.banner,.card:
break
case.modal:print("When set `imageOnly` message at firebase console, message will be received with `modal` type")case.imageOnly:print("This line will be never called.")@unknowndefault:
break
}}}// at AppDelegateInAppMessaging.inAppMessaging().messageDisplayComponent =Sample()
The text was updated successfully, but these errors were encountered:
There’s this issue indeed. I’ve faced it myself, and I think I’ll look into it.
@fumito-ito As a quick fix, you can determine message type by type-casting the messageForDisplay instance, like that:
switch messageForDisplay {caseletbannerMessage as InAppMessagingBannerDisplay:print(bannerMessage)caseletcardMessage as InAppMessagingCardDisplay:print(cardMessage)caseletimageOnlyMessage as InAppMessagingImageOnlyDisplay:print(imageOnlyMessage)caseletmodalMessage as InAppMessagingModalDisplay:print(modalMessage)default:
break
}
In fact, that’s the way message type is determined in the original implementation of IAM.
[REQUIRED] Step 1: Describe your environment
Carthage
[REQUIRED] Step 2: Describe the problem
ImageOnly message shows incorrect message type. It may be a bug of parsing passing data.
Steps to reproduce:
Image Only
message at Firebase ConsoleRelevant Code:
The text was updated successfully, but these errors were encountered: