xcode - 在范围内未找到 SignInWithAppleButton (SwiftUI 2)

标签 xcode swiftui sign-in-with-apple

我正在 SwiftUI 应用程序(iOS 14、SwiftUI 2)中实现 Sign In With Apple。我正在导入 AuthenticationServices 框架。应用程序构建成功,可以在 iOS 设备或模拟器上运行。但是我无法在预览/ Canvas 中预览 View (设计 View 会更容易)。

Cannot find 'SignInWithAppleButton' in scope
知道为什么吗?
谢谢
阿克塞尔
PS:Xcode 12 beta 6,macOS Big Sur beta 5

最佳答案

SignInWithAppleButton 的命名空间已搬离 SwiftUIAuthenticationServices从测试版 6 开始。只是 import AuthenticationServices .

关于xcode - 在范围内未找到 SignInWithAppleButton (SwiftUI 2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63873574/

相关文章:

xcode - 在 Xcode 中查找方法引用

ios - 合并:像Future一样的发布者,但具有多个值(value)

ios - 如何在具有相同Apple ID的多个设备的用户中找出 "Sign in with Apple"?

firebase - 我正在使用 Firebase Apple 登录进行用户登录,但我不确定将 https ://myapp. firebaseapp.com/__/auth/handler 放在哪里?

xcode - Objective-C的SMB卷挂载fsmountservervolumesync

ios - 点击屏幕获取声音(声音文件数组)、xcode 和 swift

ios - UILongPressGestureRecognizer 不适用于 Googlemap

ios - 如何使 SwiftUI 列表行背景颜色扩展全宽,包括安全区域之外

focus - 当我按下回车键或在文本字段外单击时,如何移除文本字段焦点? (SwiftUI,MacOS)

ios - 如何配置 Mailgun 以与“使用 Apple 登录”和 Apple 的中继服务一起使用?