Well, I've always been able to either exit browser or return to my app.
-Good Luck.
Well, I've always been able to either exit browser or return to my app.
-Good Luck.
Hi, yes you were right. Our developers already looking into this issue.
Hi Marina,
Any update from your developers?
Thanks,
Mike
Hi Mike,
Sorry, no update. Developers are working on it, but no ETA yet.
Hi Mike,
After deep investigations we have found the following:
In your app you use a transformation for the label element where links (and whole messages) are displayed after searching. This transformation finds links in messages and changes them in way when parameter target="_blank" is added to the < a tag. It is supposed, that when this link is tapped it opens in Mobile Safari instead of UIWebView.
Attached project's assets can reveal that version of Cordova is 2.4.0 (appery lib 1.0). It seems that starting from Cordova 2.3 there is other mechanics to open links. Parameter "target" is not supported. But you still can open links not in WebView but either in Safari or InAppBrowser. To do this you should perform the following:
Enable support of InAppBrowser: Open config.xml on the Editor's tab "Sources" and add the following line to the :
code<plugin name="InAppBrowser" value="CDVInAppBrowser" />/code
Update transformation for component with ID = messageLabel with the following text: codeHere should be the code you can see in the next comment. GetSatisfaction doesn't display it correctly/code
The code in point 2 opens links in the InAppBrowser. If it is necessary to open in Safari, then _blank should be replaced with _system.
This solution is actual only for iOS. It wasn't tested on Android and WinPhone apps so I cannot guarantee it does not break other components.
var inputText = value;
var replaceText, replacePattern1, replacePattern2, replacePattern3;
//URLs starting with a href="http://" rel="nofollow"http:///a, a href="https://" rel="nofollow"https:///a, or ftp://
replacePattern1 = /(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~|!:,.;]*[-A-Z0-9+&@#\/%=~|])/gim;
replacedText = inputText.replace(replacePattern1, '[url=http://#]$1[/url]');
//URLs starting with "www." (without // before it, or it'd re-link the ones done above).
replacePattern2 = /(^|[\/])(www\.[\S]+(\b|$))/gim;
replacedText = replacedText.replace(replacePattern2, '$1[url=http://#]$2[/url]');
//Change email addresses to mailto:: links.
replacePattern3 = /(\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,6})/gim;
replacedText = replacedText.replace(replacePattern3, 'a href="mailto:$1" rel="nofollow"$1/a');
return replacedText;
The main problem was that the version of Cordova 2.4 works a bit differently than assumed in the code. Indeed, in version 1.6, for example, everything worked. Although you did not change the code, Appery.io lib renewed, Cordoba was updated to 2.4, and all stopped working.
widget
plugin name="InAppBrowser" value="CDVInAppBrowser"
Did not work. Should this not point to Safari instead of InAppBrowser?
Also your code is missing _blank so how can I change to _system?
In addition it also did not fix problem:
var inputText = value;
var replaceText, replacePattern1, replacePattern2, replacePattern3;
//URLs starting with a href="http://" rel="nofollow"http:///a, a href="https://" rel="nofollow"https:///a, or ftp://
replacePattern1 = /(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~|!:,.;]*[-A-Z0-9+&@#\/%=~|])/gim;
replacedText = inputText.replace(replacePattern1, '$1');
//URLs starting with "www." (without // before it, or it'd re-link the ones done above).
replacePattern2 = /(^|[\/])(www\.[\S]+(\b|$))/gim;
replacedText = replacedText.replace(replacePattern2, '$1$2');
//Change email addresses to mailto:: links.
replacePattern3 = /(\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,6})/gim;
replacedText = replacedText.replace(replacePattern3, '$1');
return replacedText;
Hello! We'll take a look again. Sorry for delay.
I will email support for the code due to format issues here.