【问题标题】:Swift 4 iMessage sending message: The operation couldn’t be completed. (com.apple.messages.messagesapp-error error 9.)Swift 4 iMessage 发送消息:操作无法完成。 (com.apple.messages.messagesapp-error 错误 9。)
【发布时间】:2017-11-19 14:47:20
【问题描述】:

发送消息时,它会抛出带有随机代码的错误。没有描述或任何东西。这是我的代码:

       if #available(iOSApplicationExtension 11.0, *) {
            conversation?.send(message, completionHandler: { (error) in
                if error != nil {
                    print(error?.localizedDescription)
                }
            })
        } else {
            conversation?.insert(message, completionHandler: { (error) in
                if error != nil {
                    print(error?.localizedDescription)
                }
            })
        }

错误:操作无法完成。 (com.apple.messages.messagesapp-error 错误 9.)

当我使用插入功能时它工作正常。真烦我哈哈,明白吗?臭虫……不是吗?好的。

【问题讨论】:

    标签: swift xcode imessage


    【解决方案1】:

    在 Apple 的 beta 文档中找到错误代码: https://developer.apple.com/documentation/messages/msmessageerrorcode/2909031-sendwithoutrecentinteraction 显然,该应用程序在发送之前需要用户交互(我的应用程序有),但由于某种原因它仍然会触发它。

    【讨论】:

    • 我也注意到了这一点。我提交了雷达以防万一,但它应该很快就会修好。
    猜你喜欢
    • 2017-07-28
    • 2021-12-16
    • 1970-01-01
    • 2011-11-10
    • 2015-08-12
    • 2019-10-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多