问题
I know that an apple watch app can launch its parent application in the background to pass data back and forth but can it work the other way around? Can my iOS app launch the related watchOS app?
For a bit more insight, I'm trying to accomplish this so that I can monitor data periodically for the sake of notifications. The 70 seconds apple gives me to keep an app active and pulling data from healthKit isn't conducive to an app that provides alerts to users based on changes in behavior.
I apologize if this is a basic question. I'm new to watchOS development and haven't been able to find the answer to this anywhere. =/
回答1:
No it cannot happen.
At the moment communication between the Watch and the Device is limited to the Watch App initialising communication with the iOS app and not the other way around.
This might help: https://developer.apple.com/library//ios/documentation/General/Conceptual/WatchKitProgrammingGuide/SharingData.html#//apple_ref/doc/uid/TP40014969-CH29-SW1
回答2:
Unfortunately I think I found the answer here How to programmatically open Apple Watch companion app from iOS app. It doesn't look like it can be done. If anyone finds otherwise, let me know!
来源:https://stackoverflow.com/questions/36289265/can-one-open-a-watchos-app-from-an-ios-app