Skip to content

Commit

Permalink
Sample-SwiftUI updated for M5.
Browse files Browse the repository at this point in the history
  • Loading branch information
KarthikMS committed Nov 4, 2022
1 parent 41cf3c4 commit fe9265f
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions Examples/Sample-SwiftUI/iOS/Views/LoggedInView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,38 @@ struct LoggedInView: View {
}
VStack(spacing:15) {
StylizedButton("Open Messenger", action: openMessenger)
StylizedButton("Open Inbox", action: openInbox)
StylizedButton("Open Help Center", action: openHelpCenter)
StylizedButton("Open Article", action: openArticle)
StylizedButton("Open Carousel", action: openCarousel)
StylizedButton("Open Survey", action: openSurvey)
StylizedButton("Log out", action: logoutOfIntercom)
}
}
}

func openMessenger() {
Intercom.presentMessenger()
Intercom.present()
}

func openInbox() {
Intercom.present(.messages)
}

func openHelpCenter() {
Intercom.presentHelpCenter()
Intercom.present(.helpCenter)
}

func openArticle() {
Intercom.presentArticle("<#ARTICLE_ID#>")
Intercom.presentContent(.article(id: "<#ARTICLE_ID#>"))
}

func openCarousel() {
Intercom.presentContent(.carousel(id: "<#CAROUSEL_ID#>"))
}

func openSurvey() {
Intercom.presentContent(.survey(id: "<#SURVEY_ID#>"))
}

func logoutOfIntercom() {
Expand Down

0 comments on commit fe9265f

Please sign in to comment.