ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Mobile specific functions / Apple Watch functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Sends data from an iOS phone to an Apple Watch (or conversely) while expecting a response.
Example
INTERNAL PROCÉDURE GetInfo(b is Buffer)
Info(b)
END
 
MyBuffer is Buffer = "Text buffer"
IF NOT awSendAndGetInfo(MyBuffer, GetInfo) THEN
Error(ErrorInfo())
END
Syntax
<Result> = awSendAndGetInfo(<Data> , <WLanguage procedure>)
<Result>: Boolean
  • True if the sending was successful,
  • False otherwise. ErrorInfo returns more details about the error.
<Data>: Buffer
Data to send.
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure ("callback") called when the response is received. This procedure is used to retrieve and process the response.
This procedure has the following format:
PROCEDURE <Procedure name>(<Response>)

where <Response> is a Buffer variable.
Remarks
  • The receiver receives the data sent via the procedure passed to awProcedureGetAndSendInfo. Then, the receiver must send a response in return value of this procedure.
  • The data is immediately sent.
    • From "Watch to Phone": if the iOS application is not started, it will be automatically started in background in order to respond to the call.
    • From "Phone to Watch": if the Apple Watch application is not started, an error is generated by the call.
  • The messages are delivered in the order in which they have been sent.
Minimum version required
  • Version 21
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help