0

I have been trying to figure out the simplest way to send a dictionary to an accompanying Apple Watch app. From what I understand I have this code in my AppDelegate

func application(_ application: UIApplication, handleWatchKitExtensionRequest userInfo: [AnyHashable : Any]?, reply: @escaping ([AnyHashable : Any]?) -> Void) {        
    var passDict = [String: String]()
    passDict["One"] = "Two"
    reply(passDict)
}

How does one query the AppDelegate function from the Apple Watch app to access the dictionary.

user2537535
  • 43
  • 1
  • 5
  • That's not the correct method. You should look into the `WatchConnectivity` framework instead, that is the only direct way of sending information from your iOS app to your WatchKit extension. Have a look at [this](https://stackoverflow.com/questions/45489037/how-can-i-share-information-between-my-ios-and-watch-apps-using-watchconnectivit/45489038#45489038) answer about using `WatchConnectivity` for more details. – Dávid Pásztor May 06 '18 at 17:31
  • @DávidPásztor Thanks for the pointer, I kind of figured that was not the correct method since there was very few other examples I could find. – user2537535 May 06 '18 at 17:33

0 Answers0