0
嗨,我有我的代碼的問題,它看起來像發送郵件是沒有得到所謂的出於某種原因,謝謝watchOS發送短消息沒有得到所謂的
if ([[WCSession defaultSession] isReachable]) {
NSLog(@"Initiating WCSession to Read iPhone Data");
[[WCSession defaultSession] sendMessage:watchData replyHandler:^(NSDictionary *dataFromPhone) {
NSLog(@"Sending Empty Write Data Array to iPhone...%@", watchData);
}
errorHandler:^(NSError *error) {
// Log error
NSLog(@"Error: %@", error);
}];
} else {
//we aren't in range of the phone, they didn't bring it on their run
NSLog(@"Unable to connect to iPhone");
}
你是否激活了會話並分配了一個委託?此外,您意識到「發送...」日誌消息將不會出現,直到回覆處理程序被調用? – 2016-04-30 22:30:36