Login via Apple
Prerequisite
Add Sign in with Apple button. It is recommended to check Apple’s official design requirements https://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple
For supporting shared user account within app group, please specify the primary App ID correctly
Add dependencies
- Android
- iOS
- Unity
- Unreal
Add the following code in build.gradle on the app-level, and replace $msdk_version with the actual MSDK version.
dependencies {
implementation "com.garena.sdk.android:login-apple:$msdk_version"
}
Usage
- Android
- iOS
- Unity
- Unreal
AccountManager accountManager = new AccountManager(activity);
accountManager.login(PlatformType.APPLE, onLoginListener);
Enablesign in with Applecapability. For official reference please check https://developer.apple.com/help/account/configure-app-capabilities/about-sign-in-with-apple
warning
Sign in with Appleis only supported in iOS 13+. For lower iOS version, it is recommended to hide the Sign in with Apple button or prevent calling the login API.
[MSDKLoginManager loginWithPlatform:MSDKePlatformApple completion:^(MSDKLoginRet *loginRet) {
// handle login result
}];
GMSDKHandler.LoginClient.Login(AccountPlatform.Apple, OnLoginCallback);
UMsdkLogin::Login(EPlatform::Apple);
Customize page title
- Android
- iOS
- Unity
- Unreal
accountManager.login(new AppleLoginParams("Apple login test"), onLoginListener);