更新到Xcode 8后,我的带有WCSessionDelegate的控制器会在viewController上带来错误,类型'不符合协议WCSessionDelegate'。
任何提示?
答案 0 :(得分:2)
解决:
在ViewController下面:UITableViewController,WCSessionDelegate {
我补充说;
@available(iOS 9.3, *)
public func sessionDidBecomeInactive(_ session: WCSession) {
print ("error in sessionDidBecomeInactive")
}
public func sessionDidDeactivate(_ session: WCSession) {
print ("error in SesssionDidDeactivate")
}
public func session(_ session: WCSession, activationDidCompleteWith activationState: WCSessionActivationState, error: Error?) {
print ("error in activationDidCompleteWith error")
}