Launch Apple Mail App from within my own App?
Apparently Mail application supports 2nd url scheme - message://
which ( I suppose) allows to open specific message if it was fetched by the application. If you do not provide message url it will just open mail application:
NSURL* mailURL = [NSURL URLWithString:@"message://"];
if ([[UIApplication sharedApplication] canOpenURL:mailURL]) {
[[UIApplication sharedApplication] openURL:mailURL];
}
Launch Mail app (iOS) from my own app
You can launch mail app using message://
url scheme, e.g.
NSURL* mailURL = [NSURL URLWithString:@"message://"];
if ([[UIApplication sharedApplication] canOpenURL:mailURL]) {
[[UIApplication sharedApplication] openURL:mailURL];
}
I was not able to find any information about it in apple documentation, but the scheme is present in URL schemes section (not private urls!) in mail's Info.plist, so I assume it is a part of a public api. You can also find some information on the topic here
iPhone Email app launch url
I don't think so, since the whole idea of the url schemes is to launch another app given some context in your own app. Watch a specific YouTube vid, write an email, etc.
in addition, this sounds like a weird requirement - why would you just want to send them to their email client without having them compose an email?
Launch Apple Mail App from within my own App?
Apparently Mail application supports 2nd url scheme - message://
which ( I suppose) allows to open specific message if it was fetched by the application. If you do not provide message url it will just open mail application:
NSURL* mailURL = [NSURL URLWithString:@"message://"];
if ([[UIApplication sharedApplication] canOpenURL:mailURL]) {
[[UIApplication sharedApplication] openURL:mailURL];
}
How to launch the iOS mail app in Swift?
Not tested myself but maybe this answer will help you:
Apparently Mail supports a second url scheme
message://
which (I suppose) allows you to open a specific message if it was fetched by your application. If you do not provide a full message url, it will just open Mail:
let mailURL = URL(string: "message://")!
if UIApplication.shared.canOpenURL(mailURL) {
UIApplication.shared.openURL(mailURL)
}
Taken from: Launch Apple Mail App from within my own App?
How can to launch the Mail app from within my app?
MFMailComposeViewController is what you want, which was introduced with iPhone OS 3.0.
https://developer.apple.com/iphone/library/samplecode/MailComposer/index.html
http://blog.mugunthkumar.com/coding/iphone-tutorial-in-app-email
This blog post also covers adding UIImage attachments:
http://howtomakeiphoneapps.com/2009/07/how-to-make-your-iphone-app-send-email-with-attachments/
Related Topics
How to Use Namespaces in Swift
Why Maskstobounds = Yes Prevents Calayer Shadow
How to Fetch All Contacts Record in iOS 9 Using Contacts Framework
Changing Text of Uibutton Programmatically Swift
Uinavigationcontroller "Back Button" Custom Text
How to Create a Colored 1X1 Uiimage on the iPhone Dynamically
View with Continuous Scroll; Both Horizontal and Vertical
How to Enable Back/Left Swipe Gesture in Uinavigationcontroller After Setting Leftbarbuttonitem
Draw Dotted (Not Dashed!) Line, with Ibdesignable in 2017
Get Device Location (Only Country) in iOS
Identify New iPhone Model on Xcode (5, 5C, 5S)
How to Style Uitextview to Like Rounded Rect Text Field
Uinavigationcontroller "Back Button" Custom Text
Implement Pushkit and Test in Development Behavior
Firebase Cloud Messaging - Check Existing or Available Topics
How to Hide a Navigation Bar from First Viewcontroller in Swift