最近の検索
最近の検索はありません

Neil Hannah
参加日2021年11月30日
·
前回のアクティビティ2022年1月11日
フォロー中
0
フォロワー
0
合計アクティビティ
4
投票
0
サブスクリプション
1
アクティビティの概要
バッジ
記事
投稿
コミュニティへのコメント
記事へのコメント
アクティビティの概要
さんの最近のアクティビティ Neil Hannah
Neil Hannahさんがコメントを作成しました:
Hi,
As I initially found a workaround it took me a bit to get back to this, but using the example, which is in swift instead of ObjC, I find the exact same issue. I actually found another issue as well where setting department also caused message sending issues. So to reiterate, if the name is set to hidden, and not given, FAIL, if name required, and given, FAIL, if department given FAIL. Here is the sample code in a failed state... comment out the `.department` and swap the commented `visitorInfoTest` for the uncommented one and you will find another failure. You can paste this into your ZendeskMessaging file in the sample project, it has very few changes from that.
//
// ZendeskMessaging.swift
// UnifiedSDK
//
// Created by Zendesk on 17/04/2020.
// Copyright © 2020 Zendesk. All rights reserved.
//
import Foundation
import MessagingSDK
import MessagingAPI
import CommonUISDK
import ChatSDK
import ChatProvidersSDK
final class ZendeskMessaging: NSObject, JWTAuthenticator {
static let instance = ZendeskMessaging()
static var themeColor: UIColor? {
didSet {
guard let themeColor = themeColor else { return }
CommonTheme.currentTheme.primaryColor = themeColor
}
}
#warning("Please provide Chat account key")
let accountKey = ""
var authToken: String = "" {
didSet {
guard !authToken.isEmpty else {
resetVisitorIdentity()
return
}
Chat.instance?.setIdentity(authenticator: self)
}
}
// MARK: Configurations
var messagingConfiguration: MessagingConfiguration {
let messagingConfiguration = MessagingConfiguration()
messagingConfiguration.name = "Chat Bot"
return messagingConfiguration
}
var chatConfiguration: ChatConfiguration {
let chatConfiguration = ChatConfiguration()
chatConfiguration.isAgentAvailabilityEnabled = true
chatConfiguration.isPreChatFormEnabled = true
chatConfiguration.preChatFormConfiguration.name = FormFieldStatus.required
chatConfiguration.preChatFormConfiguration.email = FormFieldStatus.required
chatConfiguration.preChatFormConfiguration.phoneNumber = FormFieldStatus.required
chatConfiguration.preChatFormConfiguration.department = FormFieldStatus.hidden
return chatConfiguration
}
var chatAPIConfig: ChatAPIConfiguration {
let chatAPIConfig = ChatAPIConfiguration()
chatAPIConfig.tags = ["iOS", "chat_v2"]
chatAPIConfig.department = "Neil test" // This line commented out will work
let visitorInfoTest = VisitorInfo(email: "neil@gmail.com", phoneNumber: "1111111111")
// let visitorInfoTest = VisitorInfo(name: "Neil Test", email: "neil@gmail.com", phoneNumber: "8607489943") // This line replacing one above it causes app not to work
chatAPIConfig.visitorInfo = visitorInfoTest
return chatAPIConfig
}
// MARK: Chat
func initialize() {
setChatLogging(isEnabled: true, logLevel: .verbose)
Chat.initialize(accountKey: accountKey, appId: "")
}
func setChatLogging(isEnabled: Bool, logLevel: LogLevel) {
Logger.isEnabled = isEnabled
Logger.defaultLevel = logLevel
}
func resetVisitorIdentity() {
Chat.instance?.resetIdentity(nil)
}
func getToken(_ completion: @escaping (String?, Error?) -> Void) {
completion(authToken, nil)
}
// MARK: View Controller
func buildMessagingViewController() throws -> UIViewController {
Chat.instance?.configuration = chatAPIConfig
return try Messaging.instance.buildUI(engines: engines,
configs: [messagingConfiguration, chatConfiguration])
}
}
extension ZendeskMessaging {
// MARK: Engines
var engines: [Engine] {
let engineTypes: [Engine.Type] = [ChatEngine.self]
return engines(from: engineTypes)
}
func engines(from engineTypes: [Engine.Type]) -> [Engine] {
engineTypes.compactMap { type -> Engine? in
switch type {
case is ChatEngine.Type:
return try? ChatEngine.engine()
default:
fatalError("Unhandled engine of type: \(type)")
}
}
}
}
コメントを表示 · 投稿日時:2022年1月11日 · Neil Hannah
0
フォロワー
0
投票
0
コメント
Neil Hannahさんがコメントを作成しました:
Hi Greg, I will try to sum it up here.
Working:
`config.visitorInfo = [[ZDKVisitorInfo alloc] initWithName:nil email:@"neil@test.com"phoneNumber:@"1234567890"];`
コメントを表示 · 投稿日時:2021年12月02日 · Neil Hannah
0
フォロワー
0
投票
0
コメント
Neil Hannahさんが投稿を作成しました:
As of 2 days ago trying to set initWithName on ZDKVisitorInfo causes the chat not to work. The same issue is present if ZDKChatFormConfiguration is set with initWithName ZDKFormFieldHidden. Chat works fine with name set to NULL and the field required or optional in the form, but if the name is given, it does not connect to the chat. Also if the name is not given and the field in the form set to ZDKFormFieldHidden it also no longer connects. This started 2 days ago in prod apps and I suspect it's an issue in either the SDK or server. I cannot find actual support so posting here.
投稿日時:2021年11月30日 · Neil Hannah
0
フォロワー
2
投票
4
コメント