crisp-im / crisp-sdk-ios

:package: Crisp iOS SDK, add a chat in any iOS app and communicate with your users.
https://docs.crisp.chat/guides/chatbox-sdks/ios-sdk/
Other
44 stars 19 forks source link

Error typing the message #83

Closed h-o-sein closed 1 year ago

h-o-sein commented 1 year ago

Hello Error typing the message version Crisp: 2.2.1 with: SwiftUI Video:

https://user-images.githubusercontent.com/9271127/230393460-9d3b6764-99a5-47e3-b919-a0e8b904ed01.mov

baptistejamin commented 1 year ago

Hi, Alexandre from the Crisp team! Thank you for sharing this bug with us. Can you share the iPhone you use, and its version, please?

h-o-sein commented 1 year ago

Version SDK Crisp: 2.2.1 model Device: iPhone 13 Pro Version iOS: 16.4 Version xCode: 14.3

nesium commented 1 year ago

Hi @h-o-sein. Thanks for the report! Is it possible that you're presenting the Crisp SDK in a SwiftUI context? If so I'd urge you to use the new ChatView. Here's a quick example…

struct ContentView: View {
  @State var isChatPresented = false

  init() {
    CrispSDK.configure(websiteID: "YOUR_WEBSITE_ID")
  }

  var body: some View {
    VStack {
      Button("Show chat") {
        self.isChatPresented = true
      }
      .sheet(isPresented: self.$isChatPresented) {
        ChatView()
      }
      .padding()
    }
  }
}
h-o-sein commented 1 year ago

Thanks, the problem is solved