-->

How can I get user's email? iPhone SDK

2020-07-17 15:13发布

问题:

I need to get an user's email address that used in Mail.app.

How can I do it with the iPhone SDK?

Thank you!

回答1:

Short answer: you can't. You should prompt the user for their email address if you need it.



回答2:

Have a look at ABGetMe for iOS. Specifically, the AccountEmailAddresses function returns the list of configured e-mail addresses.



回答3:

welcome to IOS, just assume that you are not allowed to do anything that is related to the private user info ( email address \ phone number )

another workaround is to save the user phone number and email address in the address book and get that from there