Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8805209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:48:27+00:00 2026-06-14T01:48:27+00:00

I’ve found several places showing how to subclass UIApplication.openURL which is called when a

  • 0

I’ve found several places showing how to subclass UIApplication.openURL which is called when a user taps a hyperlink in a UITextView. However, I’m finding that this is not called when they tap a mailto link, and I only need to override mailto links. My app includes an email client, and since Apple will not allow me to make my app the “default” email client, I at least want mailto links inside my own program to use my app for sending email.

I first tried using a UIWebView instead, which did allow me to do this, however that had some display issues (I’m just displaying plain-text and it doesn’t look/work as nice as the UITextView for that).

I have also tried overriding UIApplication.canShowURL but it is never called, not even for http: links. I’ve tried subclassing and also “Swizzling”, both give same results.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T01:48:28+00:00Added an answer on June 14, 2026 at 1:48 am

    Based on info I found here Possible to handle your own http URL schemes in iOS?, from the comment by kineticfocus, I ended up with:

    Register for a custom URL scheme http://mobiledevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html.

    Before displaying my text in the UITextView, find each valid email address and mailto: URL and convert to my custom URL scheme. Example conversions:

    example@sample.com -> myapp://example@sample.com

    mailto:example@sample.com -> myapp://example@sample.com

    This isn’t ideal because it makes the text harder to read due to the conversion (not so much for the mailto: URLs but for the plain email addresses in the text it does), but was the best I could find without going to a UIWebView.

    I was impressed that the UITextView supports custom URL schemes — In the Windows world I’ve always wished the RICHEDIT window class would support that, but it doesn’t.

    Only posting this as an answer instead of reporting my question as a duplicate because most everything else I’ve found is not related to UITextView, they are either using UIWebView or just want to invoke their app from another app or website.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have an autohotkey script which looks up a word in a bilingual dictionary
I have an array which has BIG numbers and small numbers in it. I
I have a text area in my form which accepts all possible characters from
I'm trying to select an H1 element which is the second-child in its group

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.