如何检查电子邮件地址是Apple的私人电子邮件还是实际电子邮件

How to check an email address is whether Apple's private email or an actual email

我正在开发一个 iOS Swift 项目,我在其中实施了 Sign in with Apple。但是当用户尝试使用 Apples 登录时,它会要求共享电子邮件或隐藏电子邮件。如果它是共享意味着它将 return 实际电子邮件,如果它是隐藏意味着它将 return 发送到一些私人电子邮件,如

<unique-alphanumeric-string>@privaterelay.appleid.com

但是有什么方法可以检查return编辑的电子邮件是真实用户的电子邮件还是苹果的私人电子邮件?

举例:

let email = "7dhu73da@privaterelay.appleid.com"
let isApplePrivateEmailAddress = email.hasSuffix("@privaterelay.appleid.com")