Skip to content

Commit f5466da

Browse files
committed
chore: Update README
1 parent b936194 commit f5466da

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ To install it using Swift Package Manager, add the following to your `Package.sw
2525

2626
```
2727
dependencies: [
28-
.package(url: "https://github.com/tryfoobar/CommandBarIOS.git", from: "1.0.9")
28+
.package(url: "https://github.com/tryfoobar/CommandBarIOS.git", from: "1.1.8")
2929
]
3030
```
3131

@@ -109,6 +109,23 @@ struct MyView: View {
109109
}
110110
```
111111

112+
Additionally, you can pass in an `fallbackAction` to `openHelpHub` to receive a callback when the user triggers an Open Chat action in HelpHub/Copilot
113+
114+
```
115+
struct MyView: View {
116+
var body: some View {
117+
Button(action: {
118+
CommandBarSDK.shared.openHelpHub(articleId: <article_id | null>, fallbackAction: {
119+
print("User triggered Open Chat action")
120+
CommandBarSDK.shared.closeHelpHub()
121+
})
122+
}) {
123+
Text("Tap me!").padding()
124+
}
125+
}
126+
}
127+
```
128+
112129
### 5.(Optional) Run the Example App
113130

114131
To run the example project, first clone the repo, then:

0 commit comments

Comments
 (0)