TWA bases app sometime showing URL and sometime working, even Assetlink.json uploaded properly - progressive-web-apps

I have website (https://www.kriscent.com/product/kart-supermarket/). I created PWA of that after that I uploaded it on Play store by using TWA(Trusted Web Activities), App URL is https://play.google.com/store/apps/details?id=in.kriscent.kartlite.
The URL of website always show in app, So I uploaded the assetlink.json (URL: https://www.kriscent.com/.well-known/assetlinks.json).
After uploading the assetlinks.json, When I run my app, the website URL disappeared but when I switched on other link in the app then the URL shows again.
I don,t know what is happening. Please help me if anybody has idea to resolve this issue.
enter image description here
enter image description here

The problem is that, when navigating to a product detail page, you are using a different origin than the one used to open the Trusted Web Activity and that doesn't have Digital Asset Links setup:
When the application is started, it opens https://www.kriscent.com/, which is correctly validated.
When clicking on a product, the user is take to https://kriscent.com/ (without www), which is a different origin, and is not validated in the Android app.
It is possible to get the Trusted Web Activity to work with multiple origins but, in this case, I'd recommend using a single origin for the initial URL and the navigations, as you will be able to take advantage of using the same service worker, browser storage, etc.

Related

App Store/Play Store redirection if App is not installed on ionic App

I have implemented deeplink for my ionic v1 application and also implemented universal link for same. I also checked so many links to implement App store redirection functionality.
Most of the link suggest to implement javascript code which first check device and based on ios/adnroid/window it will redirect to particular store but let say I will create that javascript code look like below
const iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
if (iOS) {
window.location.href = "temp://itunes.apple.com/us/app/...";
}
but where should I put this file so when user click on deeplink it should redirect to particular this file and redirect to App Store/Play Store?
Let say I want to give my deeplink to some other server for which i don't have any access then what?
is there any other param or attribute we can set like fallback url by which when app is not installed it will automatically going to that particular link?
Any answer would be great help.
Thanks.
Usually it works that way:
You place a link on the website where you want to advertise your app. That link has a click tracking domain that points to your server. e.g. click.example.com/....
Upon clicking, if the app is installed, Universal Links would ensure that the app is opened. This is done by iOS (only if you configured Universal Links correctly, see https://developer.apple.com/ios/universal-links/). If the app is not installed, a redirect is done to your click tracking domain. This is where your Javascript logics should apply, so basically you need to reply to the request with a 302 redirect to an HTML file that contains the redirection logics (as in the example above). In that server response you can handle any fallback URL you want to use.
By the way, to make Universal Links work, anyway you had to host the AASA file, so you probably already created a server, so you can use it for the case where the app is not installed.

Share my objects using a link - ionic3

I'm imagining this situation: I have my app opened on my device. I've just created a new element (object) in my app, for example a new Film like this
film = {
title: 'Shark 3',
subtitle: 'the revenge',
date: '12-11-2019',
plot: '...'
};
and I've saved it in my local storage. Now I want to share it on socials (WhatsApp, Facebook...) generating a link to this object. By clicking on this link I want my app (or the app store if it is not installed) to open. In case my app is installed, it should display a page with the film's information.
Is it possible? How to do this in ionic?
The data you want to present is stored within the app and so available on every device your app is installed, I guess? Or is it data loaded from a backend?
What you want to do is called a Deep Link. This means clicking on a links opens your app and redirects the user to a specific page depending on the link.
This is possible with Ionic and the DeepLink native plugin.
But there need to be done other things outside your app to make it work. You need to register and verify your domain with Google and/or Apple.
And be aware testing this is very uncomfortable. It will only work with signed packes. So just running ionic cordova run android won't work, you will have to go the whole way creating a signed package as you need to do when you're going to publish it.
Here is a Blog article describing the functionality.

Firebase SimpleLogin (Facebook) Failing with Ionic on iPhone

I've configured Facebook Login, and it works on desktop browsers. However, when using an actual iPhone connected to my laptop, two things happen:
the first time I enter my login details (with Cordova in-app browser), Facebook gives me this page: http://cl.ly/image/0n3Z083o2H0j
after I close and reopen the app, I look in GapDebug and see a request to something like https://auth.firebase.com/auth/facebook/callback?code=YDFasdfjsdfh893&fb_redirect_uri%22%3A%22file... with an error message "Failed to load resource: You do not have permission to access the requested resource."
It looks like the fb_redirect_uri is trying to get a file path instead of a URL -- is that right? Do I have a data access problem or what?
Not sure exactly what was going on, but I updated AngularFire and FirebaseSimpleLogin and then it worked.

Facebook App : This must be derived from Canvas URL, Secure Canvas URL

Hi I wan't to create a facebook app to use it for the auth in my new site locally installed(my machine),but from yesterday I don't succeed to install it and use it, all time I have this very strange error when I wan't write a domain in the "App Domains" :
This must be derived from Canvas URL, Secure Canvas URL, Site URL, Mobile Site URL, Page Tab URL or Secure Page Tab URL. Check and correct the following domains
the domain of my application is http://localhost/project/app_dev.php/ it dosn't work I change it by a real url such as : http://www.exemple.com/,but I had the same error,and just I notice that I see this error when I create an app with new look of facebook (yesterday)...
In my case the problem was I hadn't completed the "+ Add Platform > Website" section. Once I did that the contents of App Domains became valid and the error went away.
I had this same problem yesterday, the stackoverflow answers that helped me the most were
Make local development work with Facebook/Google APIs and Canvas URL / Secure Canvas URL error message ( Also checkout How to handle OmniAuth callbacks in multiple environments?)
The Facebook developer UI has changed a bit. I'm writing this answer to consolidate all the info that helped me.
1. Make local.host Point to Your Computer
First thing you need to do is (as answered in the first link), facebook won't take localhost as a valid callback site, because it confuses localhost with a top level domain (com org etc.) in other words there is not dot . in your domain name. So change your /etc/hosts to add the entry
127.0.0.1 local.host
Now youcan access your app at http://local.host/... (this will take effect as soon as you save /etc/hosts file, no need to restart anything)
2. Add local.host as the Site URL on the facebook Dev Console
The second thing you need to do is add local.host as the site url on the facebook page
Now don't use your production app. Add a dummy app on your https://developers.facebook.com account Because your production app will have to set the site URL to your production URL and not local.host
Configure the dummy app as shown in the screenshot. But that website section(shown in the screenshot) won't be visible on the Basic settings page from the beginning.
First you will have to click + Add Platform button at the bottom, and select Website.
Notice I added http://local.host:3000/. That's where my ruby server runs in dev mode.
Also, be sure to use App Id and App Secret for the dummy app when running your webapp in dev mode.
HTH.
My problem was that logging in with facebook wasn't working for my app.
It turned out that I just needed to fill in the "Valid OAuth redirect URIs" field on the "Advanced" tab.
e.g. http://example.com/auth/google/callback
I'd a similar problem, Facebook have changed now on left pane file login (After selecting you app from top left corner) -> Valid OAuth redirect URIs
If you work on desktop app like WPF or winforms and use a WebBrowser Control to log in with the Facebook SDK.
You have to set to yes the Embedded Browser OAuth Login in Advance Tab of your facebook apps setting.
hope I help
Chose "Add platform" at the bottom and give your localhost url. "http://localhost:port/".
After this step. Facebook allows you to add localhost:port as your domain url.
After these 2 steps you can test "login with facebook" without any trouble.

Define URL from a web server on iphone

I am working on an iphone app. now i am messed up with a issue. I want to link a file download path URL with a button, so when user click that button, it downloads file from URL at back. Problem is that URL changes so frequently for which i am thinking of doing such that first it seeks for URL online & then downloads. Can anyone help me with that ? So that i just change URL online anytime behind the back of that button in App. If i make static URL at the back of that button, its not gonna work because client says that URL changes almost every 4 days.
Thanks in advance for help.
Example:
just as 2 days ago, URL was : tv.cinstedac.com/iphone/stream.m3u8
but now URL is tv.cinstedac.com/iphone/stream1.m3u8
All i want is to do such that when a person click on that button it downloads file at url, but what will be solution of changing URL ? So that i change it online & it gets updated on App as well !
the easyest way is to have a static url to a webserver that will return the proper url i suppose. But your question is not 100% clear as of where this url could be found.
EDIT
Your edit confirmed my guess, you will need to have a page that is always at the same adress (for example tv.cinstedac.com/iphone/giveStreamUrl.php). which will give only one line of output:
tv.cinstedac.com/iphone/stream1.m3u8
you could get this url from a database for example. If you want example code i will need some more info about where you will get this url from (database, txt file, etc).