小编Avi*_*viv的帖子

'openParentApplication(_:reply :)'在这里明确标记为不可用 - Xcode 7 Beta

更新到Xcode 7 beta后,我收到以下错误消息:"'openParentApplication(_:reply :)'在此处显式标记为不可用",运行代码行时"WKInterfaceController.openParentApplication"

这是我的实际代码:

func getData(messageText: String) {
    let infoDictionary = ["message" : messageText]
    WKInterfaceController.openParentApplication(infoDictionary) {
        (replyDictionary, error) -> Void in

        if let castedResponseDictionary = replyDictionary as? [String: String],
            responseMessage = castedResponseDictionary["message"]
        {
            print(responseMessage)
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

beta xcode ios swift watchkit

13
推荐指数
1
解决办法
6282
查看次数

标签 统计

beta ×1

ios ×1

swift ×1

watchkit ×1

xcode ×1