Get default user email in iOS Device

前端 未结 2 1638
暗喜
暗喜 2020-12-19 02:39

Is it possible to retrieve the user email associated with the default email account directly from an app?

Screenshot:

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-19 02:54

    I can't prove a negative, but I am fairly certain this is not possible. You can use MFMailComposeViewController to allow the user to send an email from the default account, but you cannot directly access information about the default account. If you need the user's email address, you either have to ask for them to type it in, or have them select it from their contacts.

提交回复
热议问题