Connection error chat SDK - iOS/Flutter

7 コメント

  • Greg - Community Manager
    Zendesk Developer Support

    Hi Robson Junior! It looks like you're utilizing a Flutter plugin, which we do not make ourselves. I would recommend reaching out to the dev team responsible for that to see if they're seeing any similar issues, as this is not something that I can replicate in a sample app

    0
  • Mohamed T. Ibrahim

    Hey Greg - Community Manager I am facing the same problem with implementing the native unfied sdk

    0
  • Greg - Community Manager
    Zendesk Developer Support

    Hi Mohamed...are you using Flutter as well? Are you able to reproduce this in the above sample app?

    0
  • Renata Oliveira

    Hi Greg - Community Manager, same issue here (I am using native iOS implementation)

    Xcode: Version 12.0.1
    Swift 4 (but I tried with Swift 5).

    Can you help us?

    [EDIT] I'm using this doc> https://developer.zendesk.com/embeddables/docs/chat-sdk-v-2-for-ios/getting_started#starting-a-chat

    [EDIT] My code:

     

    import UIKit
    import ChatSDK
    import ChatProvidersSDK
    import MessagingSDK
    import CommonUISDK

    @main
    class AppDelegate: UIResponder, UIApplicationDelegate {
        func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
            Chat.initialize(accountKey: "<my key>", appId: "<my id>")
            return true
        }

        // MARK: UISceneSession Lifecycle

        func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
            // Called when a new scene session is being created.
            // Use this method to select a configuration to create the new scene with.
            return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
        }

        func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
            // Called when the user discards a scene session.
            // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
            // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
        }
    }

     

    import UIKit
    import SwiftUI
    import MessagingSDK
    import ChatProvidersSDK
    import ChatSDK
    import CommonUISDK


    class ViewController: UIViewController {
    override func viewDidLoad() {
    super.viewDidLoad()
    }

    @IBAction func showMessage(sender: UIButton) {
    let viewController = try! buildUI()
    present(viewController, animated: true, completion: nil)
    }

    func buildUI() throws -> UIViewController {
    let chatAPIConfiguration = ChatAPIConfiguration()
    chatAPIConfiguration.department = "Tech"
    chatAPIConfiguration.visitorInfo = VisitorInfo(name: "Renata Oliveira", email: "<user email>", phoneNumber: "<user phone>")
    Chat.instance?.configuration = chatAPIConfiguration
    let messagingConfiguration = MessagingConfiguration()
    messagingConfiguration.name = "Atendimento"
    let chatConfiguration = ChatConfiguration()
    chatConfiguration.isAgentAvailabilityEnabled = true
    chatConfiguration.isPreChatFormEnabled = false
    let chatEngine = try ChatEngine.engine()
    return try! Messaging.instance.buildUI(engines: [chatEngine], configs: [messagingConfiguration, chatConfiguration])
    }
    }
    0
  • Greg - Community Manager
    Zendesk Developer Support

    Hi Renata! Just to make sure that I understand, you're seeing this error and the message is not being sent? Or is the message sent successfully, but you still see the error?

    0
  • Renata Oliveira

    Hello Greg - Community Manager, I saw the error when I sent text message first (status pending).
    When I sent a image or other file first, all the queued messages are sent with success.

    0
  • Renata Oliveira

    Hey Greg - Community Manager, can you help us?

    0

サインインしてコメントを残してください。

Powered by Zendesk