Inside the app I have a MFMessageComposeViewController presented with pre-defined text. Inside this text I have a link, for example: "Hey, visit this site https://stackoverflow.com/"
In HTML we can do next:
site
And it will make "site" clickable. Is there any way to do inside the app, so that recipient will receive iMessage with text link, instead of full https://stackoverflow.com/ ?
SMS does not support HTML or URLs, just plain text.
All you can do is just add the URL to message and then it's up to the Message app to recognise the URL and allow the user to click on it.
Related
I have Slack message posted using postMessage & Attachment. It has Title and Title Link which opens the External URL. I wanted to capture the link click event when User click on it. Is it possible to wire click event and handle it?
No. The Slack API does not provide any means to "capture" the click event and do anything else then open an external link in the browser.
I have word document (.docx) with hyperlink, which points to my own app with specified app URL -> myApp://url. There is problem with webViewShouldStartLoadingWithRequest:navigationType: delegate event, when I open this document in UIWebView and try to tap on link.
It works, if the link is in full form like -> "File is located myApp://fullURL" in text, but if the link is hidden behind some word like "File is located here.", UIWebView doesn't recognize link and event is not fired.
Does anyone have the same problem? Regular hyperlink (http://) works well.
Hello I have a custom URL to open an app with a link. It works in the browser. But I want to send an email that another user can click the link in the email and the app will be started. Does anybody know a solution?
It is not possible to send an email with the link (myApp://). It always shows the the link as blank text.
Or does anyone know another solution to transfer data between an app to a other users app?
I think you need to write the link in href html tag
i.e. open my app
another solution is to try to add any text after the double slash i.e. myApp://open
I am building a news website where one of the views is a webview of articles.
I had installed push woosh but when i send out notifications with URLs in them tapping the URL opens the web page in the native browser, is there any way i can set it so that the pages open in the webview in the app?
You can use Rich HTML Pages,
Such pages can contain rich-formatted text, links and images.
From GUI - yes, rich pages.
Also there is "remote_page" parameter in API. It's similar to "url" parameter, but it will be opened in webview.
For example:
{"request":{
"auth":"TOKEN",
"application":"APP-CODE",
"notifications":[{
"send_date":"now",
"content":"test",
"remote_page":"http://google.com"
}]
}}
This url will be delivered as "r" parameter on your device. Be careful: max ios payload size is 255 bytes. And Pushwoosh will not short this url automatically. Do it by yourself if needed.
I can launch my app if I embed a url in an SMS and then the user clicks on the url from within the message app. I have this all working.
What I would like to be able to do however is send an MMS to the device which contains a number of image(s) and text filling the screen and when the user clicks on the url within the MMS my app is launched same as it is if clicked from within an SMS.
Is it possible to mock this up so I can see it working? i.e. how could I create an MMS containing a working active link to demo a proof of concept (I'm not talking about creating an MMS programatically on iOS, just how to create one containing my app's url to send to the device)?
Edit: This answer was written under the assumption that implementation details were required for the URL handling part. I'll leave the technical details here for future Googlers.
Here is a link to a forum thread which seems to indicate you can't send MMSes from the iPhone programmatically (I know you said you didn't want to know this anyway, but it's here for completeness). The suggestion is to use a message provider's MMS gateway directly (e.g http://www.smsglobal.com).
Instructions on how to get a hyperlink into an MMS are here. You can just write it in plain text, or use an anchor: <a href="myapp://"> Not 100% sure the iPhone will properly parse those anchor tags in an MMS though.
Read this article. The gist is that you add a "URL types" row to your Info.plist and set it to any valid protocol, say myapp, and then a user opens a link in an MMS to a myapp URL. Article excerpt:
myapp://
myapp://some/path/here
myapp://?foo=1&bar=2
myapp://some/path/here?foo=1&bar=2
The iPhone SDK, when launching the application in response to any of the URLs above, will send a message to the UIApplicationDelegate.
If you want to provide a custom handler, simply provide an implementation for the message in your delegate. For example:
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
{
// Do something with the url here
}