Customize Text Messages

Customize Text Messages Guide

The SDK provides for the implementation of customized text messages to other users for use in conjunction with invitation functionality. This is an excellent method for attracting additional users to your application. When a user is inside your application and wants to invite other users into their Watch Party, your app can send along a custom message greeting to their contacts/invitees.

shareInviteMessage:

The shareInviteMessage allows you to send a message out to the users in the contact list. This will help you engage with potential new users in the contact list. The message will also include automatically generated via branch.io deep links, so invited users can easily download and install the app. The deep link will be added to the end of the message.

waveMessage

The waveMessage function will send out all the information the user needs to attract a new user. It shares the name of the home team, the away team, and a link to your application. See the waveMessage code snippet below.

SLRVideoPlayer: SLROverlayDelegate {

...

  public func shareInviteMessage() -> String {
    return "You have received a test message from StreamLayer. Please disregard. Thanks"
  }

  public func waveMessage() -> String {
    let clientApp = Bundle.main.infoDictionary![kCFBundleNameKey as String] as? String ?? ""
    let overlayState = StreamLayer.shared.redux.state.overlayState
    let awayTeamName = "Manchester United"
    let homeTeamName = "Barcelona"

    return """
           Hey! I’m watching the \(awayTeamName) vs \(homeTeamName) game right now in \
           the \(clientApp) app new interactive group viewing features. Let's hang out and watch together!
           """
  }

...

}