Sends data from your WatchKit extension running in watchOS 1 to your iOS app.
- iOS 8.2+
A dictionary containing data to pass to the iOS app. Use this dictionary to pass information to the iOS app so that it can perform any needed tasks. The contents of the dictionary must be serializable to a property list file. This parameter must not be
A block for receiving a reply from the containing iOS app. You may specify
nilfor this parameter. This block has no return value and takes the following parameters:
The reply dictionary provided by the iOS app.
An error object indicating if a problem occurred or
nilif there was no error.
true if the request was sent successfully or
false if the request was not sent.
In watchOS 1, use this method to send a message from your WatchKit extension to your iOS app running on the same device. Calling the method causes iOS to launch the app in the background (as needed) and call the
application(_: method of its app delegate. That method has the following signature:
- (void)application:(UIApplication *)application handle
The app delegate receives the dictionary you pass into the
user parameter and uses it to process whatever request you made. If it provides a reply, WatchKit executes the block you provided in the
reply parameter on your Watch app’s main queue. If you call this method multiple times in quick succession, your calls are serialized so that each subsequent call is delayed until the response from the previous call is received.