[审核]因为审核人员不了解苹果登录被拒
1.审核被拒信息
Guideline 2.1 - Information Needed
We’re looking forward to completing the review of your app, but we need more information to continue.
Next Steps
Please provide detailed answers to the following questions in your reply to this message in App Store Connect:
The Sign in with Apple login option in your app, does not give the options to users to Share or to Hide their information. Is this intentional?
附图
2.App中苹果登录部分代码
import UIKit
import AuthenticationServices
class PALoginVC: BaseViewController {
@IBOutlet weak var appleBut: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
}
/// 接口Apple登录
private func loginApple(user: String, token: String) {
}
}
extension PALoginVC : ASAuthorizationControllerDelegate, ASAuthorizationControllerPresentationContextProviding {
private func openApple() {
if #available(iOS 13.0, *) {
let appleIDProvider = ASAuthorizationAppleIDProvider()
let appleIDRequest = appleIDProvider.createRequest()
appleIDRequest.requestedScopes = [ASAuthorization.Scope.fullName]
let authVC = ASAuthorizationController(authorizationRequests: [appleIDRequest])
authVC.delegate = self
authVC.presentationContextProvider = self
authVC.performRequests()
} else {
// Fallback on earlier versions
}
}
@available(iOS 13.0, *)
func presentationAnchor(for controller: ASAuthorizationController) -> ASPresentationAnchor {
return self.view.window!
}
@available(iOS 13.0, *)
func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) {
let authorError = error as! ASAuthorizationError
if authorError.code != .canceled {
CMScreenUIManager.showToastMessage(message: CMAlertConfig.login_failed)
}
}
@available(iOS 13.0, *)
func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) {
switch authorization.credential {
case let appleIDCredential as ASAuthorizationAppleIDCredential:
let token = String(data: appleIDCredential.identityToken!, encoding: String.Encoding.utf8)
loginApple(user: appleIDCredential.user, token:token ?? "")
break
default:
break
}
}
}
3.原因分析
回馈信息中说,Sign in with Apple login选项并没有给用户分享或隐藏信息的选项。但问题是,我们首次授权时并没有去拿邮箱地址,除了首次授权后面的授权登录也拿不到信息。拿不到信息的时候,还隐藏个锤子。
是否隐藏邮箱,是否改变用户名,这是在向苹果拿这些数据时系统控制的是否显示。
下面列举一下requestedScopes参数传不同值时的区别。
调试时如何关闭Apple ID对App的授权:
手机进入 设置 -> Apple ID -> 密码与安全性 -> 使用Apple ID的App -> App名称 -> 选择“停止使用Apple ID”
4.解决办法
只有这一个问题的话,可以去App Store Connect回复审核信息,给审核人员解释明白应该就可以。
我这边反正要重新提包,就先将授改成[图三]样式,提审时再给了解释说明(避免审核人员非首次授权登录时来找麻烦)。