开发者

iPhone Email app launch url

The url to launch email and start a new 开发者_Python百科email on an iphone is "mailto://someone@somwhere.com". I just want to launch the email app, dropping the user at the main menu, or inbox.

"mailto:" starts composing a new blank email

I've tried "mail:", "email:" and a few others. Is there no way to just launch the email app?


This is now possible since iOS 7 using message ID tricks. Use the URL message:<messageID> with a dummy Message ID (such as 0).

See this blog post for more info :

A happy by-product of this URL scheme and behavior is that you can use a dummy string for the message-id to just launch the Mail app without deep linking to a specific email. This can enable scenarios where an app may want to launch the user directly into their inbox e.g. to verify their email address to complete the signup process.


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?


Have you tried using an invalid email address? Something like mailto://!!!?


From the documentation (highlight added).

The mailto scheme is used to launch the Mail application and open the email compose sheet. When specifying a mailto URL, you must provide the target email address.

So it does not appear you can do what you want.

-t


No, you can't.

;)

Along the lines of what Tim said, since the handling of the URL is automatic and trying to degrade the URL to where the Mail app somehow throws up and just shows the menu could give undesirable results in App Review or in future OS/Mail App versions, you might not like it even if you make it work. You might want it, but that's another thing :)

If you want to 'just start the app', look here. http://iosdevelopertips.com/cocoa/launching-other-apps-within-an-iphone-application.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜