To communicate to the containing iPhone app you can use
(BOOL)openParentApplication:(NSDictionary *)userInfo
reply:(void (^)(NSDictionary *replyInfo,
NSError *error))reply
In your WKInterfaceController
From the Apple Docs
Use this method to communicate with your containing iOS app. Calling
the method causes iOS to launch the app in the background (as needed)
and call the application:handleWatchKitExtensionRequest:reply
: method
of its app delegate. That method has the following signature:
- (void)application:(UIApplication *)application handleWatchKitExtensionRequest:(NSDictionary *)userInfo
reply:(void(^)(NSDictionary *replyInfo))reply
The app delegate receives the dictionary you pass into the userInfo
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 of this method.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…