File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ To install it using Swift Package Manager, add the following to your `Package.sw
25
25
26
26
```
27
27
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 ")
29
29
]
30
30
```
31
31
@@ -109,6 +109,23 @@ struct MyView: View {
109
109
}
110
110
```
111
111
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
+
112
129
### 5.(Optional) Run the Example App
113
130
114
131
To run the example project, first clone the repo, then:
You can’t perform that action at this time.
0 commit comments