Is it possible to send information from the iPhone to the Apple Watch? - ios

I made some researches and I found that it was possible to call the iPhone from the Apple Watch Extension (with the method openParentApplication) but I didn't find anything talking about calling the Apple Watch from the iPhone app (like openChildApplication).
Is it possible ? If it is, can you please tell me how ?
Thanks in advance

It is possible with CFNotificationCenter and Darwin notifications. You need to look at MMWormhole.

Related

VoIP and Callkit framework audio issue

I am using VoIP Push and Callkit Framework for audio and video call feature in my app. I am able to display incoming call screen when app is in background mode.
I am facing one issue, that is when I answer the call, I am hearing my own voice again from device speaker.So please help me to resolve this issue.
I checked with the Speakerbox sample app given by apple developer, It that also same thing happening.
Thanks in advance.
The issue could be the setup of the IOUnit in AudioController.mm.
Check my answer here: https://stackoverflow.com/a/42034409/3990192

watchOS Show App When Message Received [duplicate]

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. =/
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
Yes, you can. Try the startWatchApp(with:completion:) func in HealthStore. However, it can only be used in a workout app that enable the background mode of "workout processing".
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!

Detecting Apple Watch in iOS 8

I have some events that should only be fired off if a user has an Apple Watch. Is there a way to detect whether a watch is paired? I'm not sure if I can use the shared app group to detect the Apple Watch extension or maybe I can use bluetooth?
The best you an do is set a BOOL to true in shared NSUserDefaults the first time the Watch app is run and then check for that value in your iOS app. All indications on the dev forums and publicly have been that there isn't a way to programatically know if a Watch has been paired.
This is possible on watchOS2.0+
I tried to give an answer here https://stackoverflow.com/a/44190804/2946782
you can check if connectivity session is supported as described here: How to check whether iPhone and apple watch are connected

How to tell what app is running my iOS 8 Extension

How can I tell what app has summoned my extension. The docs are silent on this afaict. Is it possible?
Nope. This behavior is by design.

iPhone Call History and App store

I would like to know if Apple will allow reading the call log history database on iPhone in application that will be submitted to the App Store.
Any help is appreciated.
No, there is no supported method for accessing the call log on iOS devices, and no way you can achieve this or submit an app doing this to the App Store legitimately.
If it's an existing official documented API, you may use it. It's as simple as that.

Resources