swiftui - 任何人都可以使用 SwiftUI SignInWithAppleButton 在 tvOS 上工作
问题描述
我正在尝试使用 SwiftUI 的 SignInWithAppleButton 与 tvOS 一起使用?我遇到了一个问题,请求和完成块没有被调用,并且我可以找到的任何日志中都没有错误。它只是为点击设置动画,仅此而已。这已经在带有 tvOS 14 的实际 Apple TV 上进行了测试。
我的代码是一个简单的页面:
import SwiftUI
import AuthenticationServices
struct SignInView: View {
var body: some View {
VStack(spacing: 40) {
Text("Welcome to My App")
.font(.system(size: 50.0, weight: .bold))
SignInWithAppleButton(.signIn) { request in
request.requestedScopes = [.fullName, .email]
} onCompletion: { result in
print(result)
}
.signInWithAppleButtonStyle(.whiteOutline)
.frame(width: 300, height: 50)
}
}
}
我根本看不到结果或请求块被调用。
解决方案
推荐阅读
- c# - 如何从 mongo DB 中的文档中获取值
- html - 如何降低透明度
,我指定的位置是固定的? - elasticsearch - Elasticsearch search_after,不要将_id用于tie_breaker_field?
- java - Centos 7 启动 DMS Agorum Core 时出现问题
- html - 导航栏修改
- cypress - 赛普拉斯:在动态定位元素方面需要帮助
- javascript - 如果 checkValidity() 方法返回 false,则显示表单错误
- amazon-web-services - 未能满足约束:在此区域('us-east-1')中无法访问指定的资源 - aws quicksight -
- python - 仅重命名一列中的多索引标题
- visual-studio - 构建旧的 Visual C++ 6 解决方案时 VS19 中出现大量 Microsoft 头文件错误