This repository has been archived by the owner on Sep 25, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There's really only 1 way to do native email composition in an iOS app and doing so a much nicer experience to do it than to click on a mailto: link and have it switch you to the Mail app. I don't think there'll ever be a case where someone using turbolinks-ios will prefer it to be the other way.
So here's a PR for taking a mailto: link and converting it to a native email popup. I was inspired reading http://stackoverflow.com/questions/25604552/i-have-real-misunderstanding-with-mfmailcomposeviewcontroller-in-swift-ios8-in to see how to parse an email address and strip out the necessary components.
Note that in testing this, it can't be done on a simulator, you have to use a real device to compose emails. Let me know what you think and if there's anything you'd like me to change/add!