JSQMessagesViewController custom link not working - ios

I'm trying to implement the answer and code here which is also on the Github fork. I'm having many glitches. First, random other messages are becoming links without a '#'. When I scroll up and down those links appear and disappear, but the 'real' '#' links stay. Also, the regular internet links are recognized as links but do not work (send to safari). Could anyone tell me what's causing these and how to fix them?
Screenshot:
Scroll Down:
scroll back up:
Notice the change in links from the top and bottom pictures. The messages that shouldn't be links change back and forth from links and the links that should be links stay. Also the google.com link does not work.

Related

iOS 9 Universal links Forward button breaks deep linking forever until I erase phone settings

Before anyone marks this question as a duplicate please read the extra section at the bottom that sites differences between this question and other similar questions out there
I'm utilizing Universal Links for my deep linking needs. Two example use cases are:
1.) Safari/Chrome Browser on iPhone with my app installed: When click on a link on my web site on their iPhone I'm deep linking them into my app if installed on their phone.
2.) With my app installed, running my app but using an in-app-UIWebView. My app also has an in-app UIWebView, when you tap a button it deep links them somewhere in the application.
After you deep link into the app, there are two buttons in the navigation bar. A Back button (top left) and a Forward button (top right).
My problem
If the user presses the forward button (top right) it forwards them to my web page and then will forever break my deep linking so that any time in the future when the user clicks on that link to deep link it always goes to my web page instead of deep linking into the app (which was the original intention). How can I prevent this? My concern here is that my app has close buttons in the top right corner and if the user is trying to hit hte close button they could accidentally hit the forward button and forever break deep linking. I've tried clearing my browsers caches, I've tried deleting and re-installing my app. But nothing will "fix" deep linking after it's been permanently disabled by the forward button. The only way I can get it working again is by doing a complete device reset and Erasing all Content and Settings.
Here is an image of the back and forward buttons after deep linking into the application.
Difference between my question and similar questions on SO:
Similar SO question But here they are saying that the user can long-press on the "universal link" and and action sheet pops up asking you to "open in ". I've tried this for above case 1.) and my app isn't showing up in the options. See attached screenshot below. And this doesn't work at all for above case 2.). How do you get a Universal link to work with an iOS WebViewController? Do I have to use the SafariViewController? I don't want to use SafariViewController in my app for this case because I don't want to have that top navigation bar that SafariViewController has.
You're absolutely right: the forward button is horrible UI/UX. It's one of the big flaws with Universal Links identified in this blog post. There is no way to disable the forward button, and once it's triggered, you're screwed.
The easiest way to re-enable Universal Linking behavior after it is turned off is to long-press on the link. But that doesn't work if your link is being disabled by the system based on some other criteria (more details below). Your best bet at getting a clean shot is to paste the Universal Link URL into the stock Notes app and try long-pressing it from there.
To answer a few of your other questions:
Universal Links do work within UIWebView (per Apple's docs). A SafariViewController is not necessary.
Universal Links are disabled at the system level in certain situations. There's a list here, but this the main one that comes to mind as potentially applicable in this situation:
Universal Links will not work with a user driven element click on the same domain. Example: if there is a Universal Link on google.com pointing to a different Universal Link on google.com, it will not open the app.
Your second example image is from Chrome. Universal Links should work (conditionally) in Chrome, but is the link pointing at the same domain as the page you've already loaded? If so, that's why you aren't seeing the Open in [app] option.
You cannot disable the button to open the website, but you can create a path in the other direction: Use a smart banner on the website, and when users tap "Open" (or the localized equivalent), they will be taken back to your app, and this will also reset the default to opening universal links in your app instead of Safari.

jQuery Mobile panel smooth scrolling

This is not a question about JQM panels scrolling independently of the page, though that is an issue I've had trouble with and almost overcome, this is about making the panel scroll smoothly and ignore the device browser's edge event (or whatever the correct term is, I'll explain below).
Basically, I'm trying to replicate the menu on Google's mobile site, which naturally isn't using JQM like us common folk. I've got it pretty close, but the scrolling animation is very rigid. I need it be momentum-based rather than fixed to your finger.
Also, when you reach the top or bottom of the menu, it's considered the extremes of the document so the browser moves the whole document up or down to indicate the edge of the page. Instead, the page should never move while the panel is open and the menu should take on this behaviour within the panel.
Since I've set the panel height to 100%, this forces the address bar on iOS Safari to come down when the menu is open. This seems to be exactly what happens on Google, but if there's a way around this I'd love to hear it.
Finally, one downside of the way I've emulated independent scrolling is to just set the content wrap as fixed when the panel is open. However, this means the page always scrolls to the top when the panel opens. Any alternatives for this would be appreciated. I suppose I could just set the page top as scrollTop or something.
To summarise:
Panel menu needs to scroll smoothly (momentum rather than direct touch)
Elastic edge on menu rather than window
iOS Safari address bar interfering with height
Page fixed at top when panel open
If any of my descriptions don't make sense, just visit google.com on your phone and check out their menu.
ScrollFix seems to have solved all my issues.

Two Page Curl Effect in iPad

I am using the Leaves project to move from one pdf page to another it is working fine. Now the page curl is from left to right and from right to left like a note book. Now the effect was to turn a single page but i want to turn the two pages .one page has to display in left side and another page has to display in right side.
You should probably use UIPageViewController, unless you're trying to support iOS 4. UIPageViewController supports having the spine in the middle of the screen so you can see two pages at once. I don't know if Leaves is relevant anymore since there's a better solution built right into iOS 5 and up.

links not working in ipad /iphone

We're trying to put a fixed navigation to scroll the different sections of a page.
i have 3 links to link to different sections of the same page. and the position of the div containing this links are fixed.i am caling a function when that link clicked.
We're using jquery scrollTo().to scroll.it is wrking fine on desktop applications.
Only on ipad, the first click pass without problem, but after this one, the on the navigation seems to be disabled. If we scroll, even a little bit, with the hand, then the link's work again.
I used:
$(window).scrollTop($(window).scrollTop() + 1);
$(window).scrollTop($(window).scrollTop() - 1);
ofter scrollto but no luck....
Please help me
Jquery mobile anchor linking will prevent you from doing that. you might have to write a custom js to do the scroll.
More here -
https://forum.jquery.com/topic/jquery-mobile-anchor-linking

XCode: UIWebView Mail Links Not Working?

I have a webpage which I am navigating UIWebView to and that page has images and links which use the "mailto:" tag. Unfortunately, when you tap on them, nothing happens. If you hold the links, there is an option to email them though.
How can I fix this issue? I've searched around and couldn't find anything on it.
myWebView.dataDetectorTypes=UIDataDetectorTypeAddress;

Resources