Commit e93ea665 authored by Steven杜宇's avatar Steven杜宇

// 苹果登录

parent 5c18623b
......@@ -73,8 +73,19 @@ extension YHAppleLoginManager: ASAuthorizationControllerDelegate, ASAuthorizatio
}
func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) {
YHHUD.flash(message: "苹果登录失败 原因:\(error.localizedDescription)")
printLog("Apple login FAILED: \(error.localizedDescription)")
if error is ASAuthorizationError {
let err = error as! ASAuthorizationError
// 在这里处理 AuthenticationError
handleAuthenticationError(err)
}
}
func handleAuthenticationError(_ error: ASAuthorizationError) {
if error.code != .canceled { // 非用户取消的错误
YHHUD.flash(message: "苹果登录失败 原因:\(error.localizedDescription)")
}
}
func presentationAnchor(for controller: ASAuthorizationController) -> ASPresentationAnchor {
......
......@@ -69,7 +69,7 @@ class YHOneKeyLoginView: UIView {
lazy var loginSubTitleLabel: UILabel = {
let label = UILabel()
label.text = "手机号首次登录自动注册"
label.text = "用户首次登录自动注册"
label.font = UIFont.PFSC_R(ofSize: 15)
label.textColor = UIColor(hex: 0xffffff, alpha: 0.8)
return label
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment