Share Data From Apple Watch to iPhone - iphone

I am trying to Transfer Watch Data to the Application. I have tried to Research but the Tutorials are outdated. I am new to Watch development! I am thankful for any help I can get! :)
Trying to Pass Watch Button Text to iPhone Application
ON WATCH
let watchBatteryLevel = WKInterfaceDevice.current().batteryLevel
self.button.setTitle(watchBatteryLevel)
ON IPHONE
Your Watch Battery is .....

If the watch app is not running it can't send a message to the iPhone app, and it cannot be launched from the iPhone app, so I don't know if your idea will make sense.
But you can send a message from a running watch app to the iPhone using the WCSession class functions.
https://developer.apple.com/documentation/watchconnectivity/wcsession
transferUserInfo is one function that may do what you want

Related

Background transfer in watchos2

I tried to use transferUserInfo for sharing data between iPhone and Apple Watch in background.
But it sharing data only when you open the app. Is it possible to transfer data instantly?
(I need to start timer on iPhone when I started it on the Apple Watch at the same time)
Sorry, if my English is bad :( Thanks!

Apple Watch and iphone communication

I am implementing apple watch app with in my existing app.I need to full fill these task between both iphone and watch
1) sending data from watch to iphone Done (by using openParentApplication).
2) getting call back also done (using openParentApplication call back method)
3) I need to get apple watch notify when user click on a button on iphone app .I have implemented reverse functionality using openParentApplication.
I stuck how to update apple watch UI after user click on any button or any particular task happen on iphone app.
Please let me know is there any way to perform passing event and data from iphone to apple watch
Please use this link https://github.com/mutualmobile/MMWormhole for communication between iphone and watchKit.
You should checkout the new WCSessionDelegate is watchOS 2.0. It can be implemented on both the Apple Watch and contains multiple methods for sending data back and forth between the two devices. Detailed information can be found in the WWDC video Introducing Watch Connectivity

iPhone programming:Send message from one App to another App Via Bluetooth/Wi-Fi?

I am new to iPhone development. I want to create an iPhone application, using which user can send message to another user who is using the same App through Bluetooth/Wi-Fi. I want to know how can i send a message into another iPhone via Bluetooth/Wi-Fi? I want to know the technology which i should use to sending such thing from one iPhone to another through Bluetooth/Wi-Fi.
thanks.
You are looking for Game Kit. Check this guide by apple.

Can we play prerecorded message in a call through iPhone app?

I want to create an iPhone app with following features:
User should be able to make a call to number.
App will play the prerecorded message when call get connected.
After playing the message, line will be connected and user will be able to communicate with the person to whom he made the call.
I heard that Apple doesn't allow the developers to interact with the calling functionality of iPhone but is there any way to achieve this. Please suggest!
Thanks-
You have heard correctly, According to Apple Developer Library, it is not possible to intercept the calling functionality.
Simple Apple does not allow such stuff with current sdk.
Not so sure but, May be possible for jailbroken iPhone app.

Incoming call wakes iOS background App?

is it possible to wake an App in the background up, when a call comes in, and access CoreTelephony to send some infos over the web?
I'm practically a n00b in iOS development right now, but got asked a question if iOS is capable to do this. I searched in the iOS reference too, but with no luck.
It would be great if someone with more experience could answer it. Thanks a lot!
Steno
Please, have a look at the document about executing code in the background.
If you go to section "Implementing a VoIP Application", you will see that it is actually possible for your app to be awaken periodically so that it can check if it has anything to do (in your case, if I understand you correctly you would use CTCall to check for calling state).
So, basically, when awaken, your app could check for any incoming call and then use Core Telephony, as you say.
The only trouble about this is that if your app cannot be considered to a a VOIP app, Apple will not let it into the App Store.
It is not possible to have your code run when a call is received.