Preventing Web Browser–to–Native App Handoff - ios

Let's assume you have a mobile web app under the domain mobile.example.com and a desktop web-app under the domain example.com.
Web Browser–to–Native App Handoff is working and catches all the routes under those domains.
If you manually visit mobile.example.com, all subsequent links under that domain remain within Mobile Safari, as they should. You then encounter a link to example.com which would under normal circumstances, render responsively in Mobile Safari. With Handoff enabled, it opens with the Native app.
Is there a way to work around this behavior and keep it within Mobile Safari?

Related

Access Safari and Chrome cookies for associated domains in iOS app

I have website hosted on domain that is associated with iOS mobile app.
Inside mobile app I want to access cookies from this website, which are stored in Chrome and Safari browsers on iPhone.
Is it even possible? And how it can be done?
If I can’t do it, maybe there is some official way of solving task of accessing some website data from app like webcredentials?

PWA redirects to login page and stuck in 2FA loop

I am working on PWA app using React-Redux. Using Adal for azure login. 2 factor authentication is enabled for the user.
Problem is on iOS when the user gets the Pin for 2 FA and switches away from app to see the pin in the messaging app and comes back to PWA app, PWA refreshes and takes the user to login page.
I have searched everywhere and could not find any answer to this.
iOS 12.2 was just released 2 days agao and it fixed the problem:
PWAs (Progressive Web App) have a new lifecycle and on most normal situations, the state of your app will be saved and restored between sessions.
A link to an external site opens in a “PWA In-App browser” instead of Safari and if the external site links to the PWA’s scope again, the navigation goes back to the PWA. Now we can log in users on external origins within a PWA (such as with OAuth). Credit to Medium article
Try maintaining state using IndexedDB. This will work with a PWA on iOS Safari. Another advantage of using indexedDB is that pages on the same domain that live outside of the PWA can write to IndexedDB and that data can be read, any encryption signature verified, and used by the PWA, which also has access to IndexedDB.

Universal Links not working when default browser is Google Chrome in Outlook?

When I open the mail link with default browser as Google Chrome in Outlook,
it's opening in browser. I am expecting the link to be opened in application.
The way outlook lets users choose chrome as the destination for links effectively disables the universal linking functionality provided by the system. Basically, outlook isn't opening the raw link, which would lead to your app, it is building a mobile chrome URI per chrome's custom scheme. Until iOS provides users a method to choose a different browsers, apps rolling their own solution will continue to break system expectations.

Xamarin iOS Universal Links support for Twitter Auth

So, now twitter from 25 sep supports universal linking, it means that when UIWebView hits https://twitter.com/oauth/authorize?oauth_token link, it tries to open a twitter app, and if it is there, then it redirects me to auth page with auth error, so I wonder, how can I disable it from code, without uninstalling twitter app, or how I can enable universal linking auth in my xamarin ios app? Is it possible at all?
(similar question but for native: Disable Twitter Universal Deep Links)
Unless Twitter removes/updates the apps section of "https://www.twitter.com/apple-app-site-association" to allow a bypass or a secondary oauth that is not in the apple-app-site-association file I do not see how you would do it. These files are signed and iOS handles them at an OS level.
I have not played around very much with the continueUserActivity delegate and the NSUserActivity object that is passed to apps launched from UNI links, but I do not see a way for the launched app (i.e. Twitter) to return control to the original app, and at that point the oauth call-chain would be broken anyway....
Unique. Unlike custom URL schemes, universal links can’t be claimed by other apps, because they use standard HTTP or HTTPS links to your website.
Secure. When users install your app, iOS checks a file that you’ve uploaded to your web server to make sure that your website allows your app to open URLs on its behalf. Only you can create and upload this file, so the association of your website with your app is secure.
Via: https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html

FB Iframe App: Use different stylesheets depending on whether the user views the app through my website or through Facebook

I'm developing a facebook app which can be viewed in an iframe on Facebook itself, or as a standalone site (the line between Facebook Connect and iframe apps seems to have blurred...).
The stylesheet I have now looks good on my site, but doesn't look right when viewed through the FB iframe (probably b/c the browser screen is much bigger than the iframe).
I'd like to use different stylesheets depending on whether the user is actually visiting my website, or accessing the app through Facebook.
How can I do this?
(I'm using Ruby on Rails, and Facebooker2)
When it is viewed as an app facebook sends a bunch of extra request parameters, you can check for those on server side.

Resources