ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Mobile specific functions / Phone functions
  • Necessary conditions
  • Creating a standard-looking "Sign In with Apple" Button control
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
Used to implement authentication via "Sign In with Apple" on devices running on iOS 13 and higher. An external window allows the user to sign in using their AppleID credentials.
Example
INTERNAL PROCEDURE auth(c is AppleID)
IF c.Valid = False THEN
IF ErrorInfo(errCode) = 600062 THEN
STC_Auth = "Authentication canceled by the user."
ELSE
STC_Auth = "Authentication error" + CR + ErrorInfo()
END
ELSE
STC_Auth = "Hello " + c.User + CR
STC_Auth += c.LastName + " " + c.FirstName + CR
STC_Auth += c.Email + CR
STC_Auth += c.Source + CR
END
END

AppleSignIn(auth)
Syntax
AppleSignIn(<WLanguage procedure>)
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure ("callback") called when the authentication result is obtained. For more details on this procedure, see Parameters of the procedure used by AppleSignIn.
Remarks

Necessary conditions

This function requires:
  • iOS 13 or higher; or macOS 10.15 or higher.
  • the activation of "Sign In" in the "Provisioning profile" of your application. Authentication is therefore not allowed in tests run from WMDev. Only tests run from a Mac allow for authentication.

Creating a standard-looking "Sign In with Apple" Button control

To create an Apple authentication Button control with the right look:
  1. Create a Button control in your window: on the "Creation" tab, in the "Usual controls" group, click "Button".
  2. If necessary, open the "Modifier" pane: on the "Home" tab, in the "Environment" group, expand "Panes", select "Panes", and then select "Modifier".
  3. Select the Button control: the characteristics of the control appear in the "Modifier" pane.
  4. In the "Details" section of the "Modifier" pane:
    • In "Apple button", select "Sign in".
    • In "Sign In with Apple button - Style", select the desired style for the button ("According to theme", "Black", "White", "White outline").
Then, simple write the WLanguage code of the control to implement "Sign In with Apple".
Minimum version required
  • Version 25
Comments
Click [Add] to post a comment

Last update: 01/09/2024

Send a report | Local help