我使用 Firebase 身份验证成功集成了 Microsoft 登录,但某些方法似乎仅适用于 iOS,不适用于 macOS。将目标切换到 macOS 时,provider.getCredentialWith 根本不存在。任何人都对解决此问题的可能解决方案或方法有任何想法。
#if os(iOS)
provider.getCredentialWith(nil)
{
credentials, error in
if let credentials = credentials
{
continuation.resume(returning: credentials)
}
else if let error = error
{
continuation.resume(throwing: error)
}
}
#else
//What to do here?
#endif