问题
In my app, if the user has not configured their E-mail account on their iPhone, then when the user opens the application, it will ask for e-mail configuration (means the app redirects to "settings >> mail >> add account " add account page),
How can I do that?
I searched and found one similar question in stack overflow but it was not helpful. just like this so question
回答1:
just see the official sample code.Here is the link:SampleCode
find the launchMailAppOnDevice() function.
// Launches the Mail application on the device.
-(void)launchMailAppOnDevice
{
NSString *recipients = @"mailto:first@example.com?cc=second@example.com,third@example.com&subject=Hello from California!";
NSString *body = @"&body=It is raining in sunny California!";
NSString *email = [NSString stringWithFormat:@"%@%@", recipients, body];
email = [email stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:email]];
}
It was useful for me. Hope it can help you.
来源:https://stackoverflow.com/questions/6689152/i-want-to-open-from-my-aap-settings-mail-add-account-the-add-account