开发者

Check to see if email is enabled?

开发者 https://www.devze.com 2022-12-16 00:22 出处:网络
I\'m working on an iPhone app that, at a certain point, will try to send an email message. If the user has an email set up, great, if not, I need to change some actions accordingly. My question is how

I'm working on an iPhone app that, at a certain point, will try to send an email message. If the user has an email set up, great, if not, I need to change some actions accordingly. My question is how do I check to see if t开发者_开发百科he user's iPhone has an email account setup? I've looked everywhere but I can't seem to find an answer.

I'm using MFMailViewController to send the message, but I don't want to create an instance of it unless I can actually send something. Any ideas?


MFMailComposeViewController class has +canSendMail method which

Returns a Boolean indicating whether the current device is able to send email. (YES if the device is configured for sending email or NO if it is not.)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号