6

I have an application where I have to get a message from server. The server sends the message in an SMS. Since iPhone applications cannot receive SMS programatically I have registered a Custom URL scheme and prefixing my message with the custom URL value say for ex: mymsg://.

This works fine most of the time. Whenever the SMS is received by the phone and I click reply button, it takes me to the reply state and the original message will appear like a link which I can click which takes me to the application. For some reason, sometimes this message is not clickable. That is, when I click on the message it does not launch the application or simply the message is not clickable. Then if i restart the phone, the link is clickable again and i can click on the link which launches my application. Does anyone know what could be the reason?

-chinnadurai

Vidya Murthy
  • 530
  • 1
  • 9
  • 22
user946414
  • 135
  • 1
  • 2
  • 8

1 Answers1

0

I've encountered this issue before but I'm not sure it's the same one you're having. What I discovered is that whether or not a custom URL scheme is clickable in Messages.app is determined when the message arrives, not when the user sees the URL.

What this means is that if you send the user your custom scheme URL before they've downloaded the app, that link will never be clickable, even if they go on to download the app at a later time. I've verified this behavior on iOS 7.1 only (haven't checked other versions).

For my case, I can't guarantee that the user has already downloaded the app when I send the message, so my solution was to use a standard http:// url that redirects to the custom myapp:// URL on the server with a 302 redirect. Hope this helps!

bloudermilk
  • 16,783
  • 13
  • 62
  • 94