当前位置:网站首页>Unity Apple登录接入
Unity Apple登录接入
2022-08-04 16:39:00 【淡定九号】
Unity Apple登录接入
引言
在2019年6月份的全球开发者大会(WWDC)上,苹果宣布了一款新产品:Sign In With Apple。随后苹果更新了App Store审查指南,现在他们要求任何使用第三方或者社交登录服务的新App提供与Apple相同的登录选项,也就是说,你的app上有第三方登录,就必须接入苹果登录Sign In With Apple。
相关链接
开发者中心:登录 - Apple
官方文档:使用入门 - 通过 Apple 登录 - Apple Developer
步骤
1、在unity Asset Store中下载Sign In With Apple Unity Plugin,下载完成之后导入工程。

2、在苹果开发者中心,找到对应的app,开启sign in with apple功能。
3、在项目中合适位置添加Apple登录图标,需要遵循苹果官方文档。
4、添加登录事件即可。导入的工程中有实例工程,可以尝试以下。
private void SignInWithApple()
{
var loginArgs = new AppleAuthLoginArgs(LoginOptions.IncludeEmail | LoginOptions.IncludeFullName);
this._appleAuthManager.LoginWithAppleId(
loginArgs,
credential =>
{
// If a sign in with apple succeeds, we should have obtained the credential with the user id, name, and email, save it
PlayerPrefs.SetString(AppleUserIdKey, credential.User);
this.SetupGameMenu(credential.User, credential);
},
error =>
{
var authorizationErrorCode = error.GetAuthorizationErrorCode();
Debug.LogWarning("Sign in with Apple failed " + authorizationErrorCode.ToString() + " " + error.ToString());
this.SetupLoginMenuForSignInWithApple();
});
}
注意问题
边栏推荐
猜你喜欢

Hubei Mobile HG680-LV_S905L3B_wire brush firmware package

九联_UNT400G_S905L2_(联通)_线刷固件包

历史上的今天:微软研究院的创始人诞生;陌陌正式上线;苹果发布 Newton OS

No server is required, teach you to get real-time health code recognition with only 30 lines of code

转型阵痛期,好未来减亏容易增收难?

谷粒商城笔记

MySQL 性能调优和优化技巧

Steady Development | Data and Insights on Mobile Game Players in Western Europe

移动CM101s_MV100_EMMC_M8233_强刷后全分区线刷固件包

不需要服务器,教你仅用30行代码搞定实时健康码识别
随机推荐
码蹄集 - MT2142 - 万民堂大厨
花了半个月,终于把一线大厂高频面试题做成合集了
jasmine.any(Function) 的一个使用场景
湖北移动中兴B860AV2.1_S905L_线刷固件包
移动魔百盒CM201-1_CW_S905L2_MT7668_线刷固件包
不需要服务器,教你仅用30行代码搞定实时健康码识别
生产环境重大bug,update加上索引字段会走索引进行更新?还是走全表扫描
MySQL学习之运算符
PAT 甲级 A1072 Gas Station
跨域传递数据(iframe)
SAP HANA Schemas 和 HDI Containers
查看每个数据库分配给了哪些用户权限,这个有接口吗
广东湛江海关破获3起走私冻海产品案 查证案值约1亿元
移动海信IP102H_905L3-B_线刷固件包
Real-Time Rendering 4th related resource arrangement (no credit required)
面试官:多个线程执行完毕后,才执行另一个线程,该怎么做?
华为应用市场“图章链接”功能上线 让APP分发突破机型壁垒
Jenkins 如何玩转接口自动化测试?
SQL语言的分类以及数据库的导入
如何实时监控销售数据?销售看板来帮你!
