我正在 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
的命名空间已搬离 SwiftUI
至 AuthenticationServices
从测试版 6 开始。只是 import AuthenticationServices
.
关于xcode - 在范围内未找到 SignInWithAppleButton (SwiftUI 2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63873574/