最近搜索
没有最近搜索

Sadev
已加入2024年11月13日
·
最后活动2024年11月13日
关注
0
关注者
0
活动总数
1
投票
0
订阅
0
活动概览
标记
文章
帖子
社区评论
文章评论
活动概览
的最新活动 Sadev
Sadev 创建了一个帖子,
帖子 Developer - Zendesk SDKs
Hello Zendesk Support,
I am encountering an issue with file uploads in the Zendesk Chat SDK when using a custom ChatAPIConfiguration
in my app. Here are the details and steps I have taken:
-
Configuration Setup:
- I initialize
ChatAPIConfiguration
with visitor information such as name, email, and phone number retrieved from user session data. The configuration is then assigned toChat.instance?.configuration
. - File uploads do not work as expected; the
ChatAttachmentMessage
log shows alocalURL
for the file but lacks an uploadedurl
, which I assume means the upload hasn’t completed successfully.
- I initialize
-
Code Details: Below is a summary of the configuration and initialization code being used:
var chatAPIConfig: ChatAPIConfiguration { let chatAPIConfig = ChatAPIConfiguration() guard let email = session.object(forKey: "user.email") as? String, let firstName = session.object(forKey: "user.name") as? String, let lastName = session.object(forKey: "user.last_name") as? String, let phoneNumber = session.object(forKey: "user.mobile_phone") as? String else { return chatAPIConfig } chatAPIConfig.visitorInfo = VisitorInfo(name: "\(firstName) \(lastName)", email: email, phoneNumber: phoneNumber) return chatAPIConfig } func initialize() { setChatLogging(isEnabled: true, logLevel: .verbose) Chat.initialize(accountKey: accountKey) } func openZendesk() { do { initialize() Chat.instance?.configuration = chatAPIConfig let viewController = try Messaging.instance.buildUI(engines: engines, configs: []) viewController.navigationItem.title = "Live Chat" self.navigationController?.show(viewController, sender: self) } catch { self.showSimpleAlert(title: "Error", message: "Error Zendesk") } }
-
Troubleshooting Steps Taken:
- Confirmed that file uploads are enabled in Zendesk Chat settings.
- Ensured that the file size is within limits (325 KB).
- Enabled verbose logging with
Logger.isEnabled = true
andLogger.defaultLevel = .verbose
, but there are no specific error messages indicating why the file does not upload. - Tested on both the simulator and a real device to rule out environment-specific issues.
Could you provide guidance on resolving this issue or suggest additional troubleshooting steps? Thank you for your assistance!
已于 2024年11月13日 发布 · Sadev
0
关注者
0
投票
0
评论