Skip to content

Commit fe9265f

Browse files
committed
Sample-SwiftUI updated for M5.
1 parent 41cf3c4 commit fe9265f

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

Examples/Sample-SwiftUI/iOS/Views/LoggedInView.swift

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,38 @@ struct LoggedInView: View {
2222
}
2323
VStack(spacing:15) {
2424
StylizedButton("Open Messenger", action: openMessenger)
25+
StylizedButton("Open Inbox", action: openInbox)
2526
StylizedButton("Open Help Center", action: openHelpCenter)
2627
StylizedButton("Open Article", action: openArticle)
28+
StylizedButton("Open Carousel", action: openCarousel)
29+
StylizedButton("Open Survey", action: openSurvey)
2730
StylizedButton("Log out", action: logoutOfIntercom)
2831
}
2932
}
3033
}
3134

3235
func openMessenger() {
33-
Intercom.presentMessenger()
36+
Intercom.present()
37+
}
38+
39+
func openInbox() {
40+
Intercom.present(.messages)
3441
}
3542

3643
func openHelpCenter() {
37-
Intercom.presentHelpCenter()
44+
Intercom.present(.helpCenter)
3845
}
3946

4047
func openArticle() {
41-
Intercom.presentArticle("<#ARTICLE_ID#>")
48+
Intercom.presentContent(.article(id: "<#ARTICLE_ID#>"))
49+
}
50+
51+
func openCarousel() {
52+
Intercom.presentContent(.carousel(id: "<#CAROUSEL_ID#>"))
53+
}
54+
55+
func openSurvey() {
56+
Intercom.presentContent(.survey(id: "<#SURVEY_ID#>"))
4257
}
4358

4459
func logoutOfIntercom() {

0 commit comments

Comments
 (0)