After updating to Xcode 7 beta, I receive the following error message: "'openParentApplication(_:reply:)' has been explicitly marked unavailable here", when running the line of code "WKInterfaceController.openParentApplication"
Here is my actual code:
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)
}
}
}
+[WKInterfaceController openParentApplication:] is only relevant for WatchKit1 app extensions because with WatchKit1 app extensions, the appex is running on the phone instead of on the watch.
With WatchKit2 app extensions, the appex is running on the watch, so actions such as this are less trivial to accomplish. You probably want to use -[WCSession sendMessageData:replyHandler:errorHandler:] from WatchConnectivity.framework for what you're doing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With