Skip to content

Commit 4e0c0c7

Browse files
updated to latest docusaurus docs
1 parent f5901c2 commit 4e0c0c7

File tree

4 files changed

+38
-12
lines changed

4 files changed

+38
-12
lines changed

Sources/StreamChatSwiftUI/ChatChannel/Composer/Suggestions/InstantCommands/GiphyCommandHandler.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,6 @@ public struct GiphyCommandHandler: CommandHandler {
6969
public func showSuggestions(
7070
for command: ComposerCommand
7171
) -> Future<SuggestionInfo, Error> {
72-
StreamChatError.unknown.asFailedPromise()
72+
StreamChatError.noSuggestionsAvailable.asFailedPromise()
7373
}
7474
}

StreamChatSwiftUITests/Tests/Utils/ViewFactory_Tests.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,17 @@ class ViewFactory_Tests: XCTestCase {
476476
// Then
477477
XCTAssert(view is EditMessageHeaderView)
478478
}
479+
480+
func test_viewFactory_() {
481+
// Given
482+
let viewFactory = DefaultViewFactory.shared
483+
484+
// When
485+
let view = viewFactory.makeCommandsContainerView(suggestions: [:]) { _ in }
486+
487+
// Then
488+
XCTAssert(view is CommandsContainerView)
489+
}
479490
}
480491

481492
extension ChannelAction: Equatable {

docusaurus/docs/iOS/basics/integration.md

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -116,19 +116,13 @@ _More information about CocoaPods [can be found here](https://cocoapods.org/)._
116116

117117
### Carthage
118118

119-
In your project's `Cartfile`, add one of these options
120-
121-
- For the LLC (**StreamChat**) use:
122-
- `github "getstream/stream-chat-swift" ~> 4.6.0`
123-
- For the UIKit components (**StreamChatUI**, which depends on **StreamChat**) use:
124-
- `github "getstream/stream-chat-swift" ~> 4.6.0`
119+
If you are using **Swift 5.5 / Xcode 13** or above, the recommended method for Carthage is to use **pre-built XCFrameworks**.
125120

126121
:::note
127122
Our SwiftUI components library is not yet available using Carthage, please use Swift Package Manager or CocoaPods.
128123
:::
129124

130-
131-
<details><summary>➤ Do you want to use <b>XCFrameworks</b>? (Click to read more)</summary>
125+
<details><summary>➤ Using pre-built <b>XCFrameworks</b></summary>
132126
<p>
133127

134128
:::caution
@@ -142,16 +136,37 @@ You can learn more about [our Module Stable XCFrameworks here](#xcframeworks)
142136
- For the UIKit components (**StreamChatUI**, which depends on **StreamChat**) use:
143137
- `binary "https://raw.githubusercontent.com/GetStream/stream-chat-swift/main/StreamChatArtifacts.json" ~> 4.6`
144138

139+
Now that we’ve modified our Cartfile, let’s go ahead and install the project dependencies via the terminal with one simple command:
140+
141+
```bash
142+
carthage update --use-xcframeworks
143+
```
144+
145+
The previous command will download pre-built XCFrameworks. You now need to add those to your project. Keep reading.
146+
145147
</p>
146148
</details>
147149

150+
<details><summary>➤ Building from source <b>(OSS)</b></summary>
151+
<p>
152+
153+
In your project's `Cartfile`, add one of these options
154+
155+
- For the LLC (**StreamChat**) use:
156+
- `github "getstream/stream-chat-swift" ~> 4.6.0`
157+
- For the UIKit components (**StreamChatUI**, which depends on **StreamChat**) use:
158+
- `github "getstream/stream-chat-swift" ~> 4.6.0`
159+
148160
Now that we’ve modified our Cartfile, let’s go ahead and install the project dependencies via the terminal with one simple command:
149161

150162
```bash
151-
carthage update --use-xcframeworks
163+
carthage update --use-xcframeworks --no-use-binaries --platform iOS
152164
```
153165

154-
This command will create pre-built XCFrameworks built from our source code. You now need to add those to your project.
166+
The previous command will create pre-built XCFrameworks built from our source code (This might take a while ⏱). You now need to add those to your project. Keep reading.
167+
168+
</p>
169+
</details>
155170

156171
Open the `Carthage/Build` folder that has been created in the root of your project, and drag and drop the frameworks you want to use. Those should be added to the "Frameworks, Libraries, and Embedded Content" section under General settings:
157172

docusaurus/docs/iOS/swiftui/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ let streamChat = StreamChat(chatClient: chatClient, appearance: appearance, util
132132

133133
Please note that these are customizations for branding and utilities.
134134

135-
If you want to customize the views themselves and inject your views, please refer to this [page](../view-customizations).
135+
Please refer to this [page] (../view-customisations) if you want to customize the views themselves and inject your views, please refer to this [page](../view-customizations).

0 commit comments

Comments
 (0)