xcode - 在范围内找不到 SignInWithAppleButton (SwiftUI 2)
问题描述
我正在 SwiftUI 应用程序(iOS 14、SwiftUI 2)中实现 Sign In With Apple。我正在导入 AuthenticationServices 框架。应用构建成功,可以在 iOS 设备或模拟器上运行。但我无法在 Preview / Canvas 中预览视图(设计视图会更容易)。
Cannot find 'SignInWithAppleButton' in scope
知道为什么吗?谢谢阿克塞尔
PS:Xcode 12 beta 6,macOS Big Sur beta 5
解决方案
自 beta 6 以来,命名空间SignInWithAppleButton
已从 移动SwiftUI
到AuthenticationServices
。只是import AuthenticationServices
.
推荐阅读
- java - 添加失败:stat /var/lib/docker/tmp/docker-builderXYZ/myapp.jar:没有这样的文件或目录
- c# - ASP.NET Core Kestrel RequestSizeLimit 对不同用户不同?
- sql-server - 如何将数据从 Common Data Service 复制到 Azure 上的 SQL Server?
- oracle - ORA-00900: SQL 语句无效 - 在 oracle 12c 中运行包时
- dart - 如何在共享首选项中添加小部件
- c - 有人可以解释这个scanf代码的含义吗
- javascript - JS - 将键附加到匹配的数组、对象值
- java - 从 JAVA 运行 TCL 脚本
- javascript - 使用 npm 进行不可复制的安装
- jakarta-ee - 两个相似的网页,使用一个/两个控制器?为什么?