Let’s get some in-app messaging going!
Note: This series is just the technology enablement; I plan to cover the strategy as interest in this blog grows, including the why and the when of using these things.
Things To Gather
- CocoaPods
- A good text editor like Sublime Text.
- A terminal/emulator
- The latest Firebase branch of the sample app (or your own app) plus your own
GoogleService-Info.plist
file- see the previous post to catch up
Adding In-App Messaging
After you pull the most recent version of the app (or any app with Firebase already), we just need to add one more podfile. You should know the drill by now. 😁
open podfile
pod 'Firebase/InAppMessaging'

pod install

Just like that, we are ready to send in-app messages! Let’s test it out. We’ll need to identify your device to test on, so make sure you still have debugging on, and check your log for the Firebase Instance ID.

Head over to the Firebase console, and click on In-App Messaging > Create Your First Campaign

Choose a style, like Card for instance, and test it using the token we just collected.


Then just restart your sample app!

This is my stop, but I’m sure you can manage to fill in the form fields to help users qualify for your message using things like app_launch
or screen_view
or other events, and managing the frequency (which we can discuss another time)!
Thoughts
Wow, that was crazy simple. One thing Google mentions is that In-App Messaging only pulls the messages once per day from the server, so keep that in mind when trying to send out campaigns, and definitely while testing.