Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom URL scheme not recognized as link in SMS app(only in iphone 4 iOS 5.0)

Tags:

Summary: In my application, I've defined a custom URL in the format "myapp://.." . But the URL is not recognized as a link when it comes in an SMS. So the user is not able to tap it and launch the app. Instead, he has to copy & paste it in browser. This happens only in iPhone4(iOS v5.0)

Steps to Reproduce: Define a custom URL for the app by specifying a new URL scheme in info.plist. Send an SMS with the custom URL of the app to iPhone4(iOS v5.0). Open the SMS.

Expected Result: The URL must be displayed as link in the SMS.

Actual Result: The URL is displayed there as plain text and not as a link.

Regression: Before upgrading to iOS 5, in the same iPhone4(iOS version 4.3), the URL was displayed as link always.

Notes: The funny side is that, if I forward the message from the same iPhone to itself, in the sent SMS and the newly received SMS, the URL will appear as a link.

like image 715
DroidHeaven Avatar asked Oct 26 '11 10:10

DroidHeaven


People also ask

What is a custom app URL?

Custom URL schemes provide a way to reference resources inside your app. Users tapping a custom URL in an email, for example, launch your app in a specified context. Other apps can also trigger your app to launch with specific context data; for example, a photo library app might display a specified image.

How do I text a link on my Iphone?

Add a link. Tap an object, text box, or selected text you want to turn into a link, then tap Link. to see Link. Tap Link To and choose a link type (Webpage, Email, Phone Number, Page, or Bookmark).


2 Answers

Check if you're using uppercase/mixed scheme (as in MyApp://...) versus an all lowercase (myapp://...). Under iOS 5, the OS won't recognize and will throw exceptions if you try to use uppercase in a custom URL scheme. If that doesn't work, it's almost certainly a bug with the SMS code in which case you should file a bug. Let me know if that worked.

like image 74
Dylan Gattey Avatar answered Sep 28 '22 07:09

Dylan Gattey


It seems the SMS url parser is not clever enough to work out that your url is for an app - my suggestion would be to use an http:// based url that will then redirect to the url for your app.

This would allow you to show a message to non iPhone users who might have inadvertently got the message and would also allow you to register that the SMS linked has clicked on all this is in addition to also working on iOS 5.

like image 24
Grouchal Avatar answered Sep 28 '22 06:09

Grouchal