Share my objects using a link - ionic3 - ionic-framework

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.

Related

TWA bases app sometime showing URL and sometime working, even Assetlink.json uploaded properly

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.

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.

How do I open any app from my web browser (Chrome) in Android, automatically?

I am struggling a little bit. I have a common url like www.domain.com/test.html
and i want Android users to get my app open if "test" is included, otherwise if they don't have the app their should be directed to the play store. I got everything implemented and it works with mozilla browser. But using chrome on Android it should be forbidden to automatically open the app if it is available!?. Now if the user enters www.domain.com/test.html and i recognize he is using Android and Chrome i tried the intent stuff in a script in a redirected www.domain.com/android_chrome.html:
<script> window.open("intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;S.browser_fallback_url=http%3A%2F%2Fzxing.org;end","_self")
</script>
But the App won't open automatically. If i use a regular Link:
Take a QR code
it works. But i want to let it open automatically!
Google restricted starting intents from javascript apps, that's why it isn't working. Security reasons I guess. You should just display nice big link to let user switch to your app instead of website - or let him continue if he doesn't want to launch the app.
Forcing users into using app is bad, IMO. Splash screen suggesting to use it is okay, but don't push it.

Tracking Download for enterprise iPhone/iPad application through itms-services

I am using itms-services to download enterprise iPhone/iPad application. We want to track who has downloaded what application when the user clicks Download button.
As prompt to Cancel/ Download is coming from itms-services not by our application, we are finding difficulties to track that download click event. Can anybody give any way out to solve this problem.
As far as I know there is no way to intercept the Cancel/Download from this IOS prompt. The only way to ensure that you know that a download has occurred would be to have the file server detect the download of the entire file. Even then, it is possible that a user could "cancel" the download near the end, or if the file was built incorrectly (i.e., profile is invalid) that the load to springboard is incomplete.
If you use a system like EASE (Enterprise App Services Environment) [http://www.apperian.com/ease], it provides this type of information based on the completion of file downloading and has reporting. EASE is free to developers using ad-hoc deployment so if you are trying to distribute apps this might be an option for you.
Can you check your web access log of .ipa? It'll give you rough idea of how many downloads.
You could write JavaScript code that:
contacts google's tracking services, and then
changes the window.location to your iTMS-services link.
Had the same problem, here is my working solution. This logs the enterprise download click to google analytics.
<!-- Users click on this install link -->
Install App
<script>
var trackOutboundLink = function (url) {
ga('send', 'event', 'Download Page', 'User Clicked Install', url, {'hitCallback': function () {
window.location.href = url;
}
});
};
</script>

Get itunes link for app before submitting

I read in another post that you can submit the app without the binary but I based on what I have seen this is no longer possible. It seems you cannot submit without the binary and the binary is submitted through the application loader. Is there any other known way to get the itunes/app store link to my app before I submit the binary?
The manual way:
Your should copy your "Apple ID" from iTunes connect and use this link:
http://itunes.apple.com/us/app/APPNAME/idXXXXXXXXX
Would open the US store ("APPNAME" is that app name and XXXXXXXXX is the "Apple ID". You can use more general method (Recommended):
http://itunes.apple.com/app/idXXXXXXXXX
and replace "XXXXXXXXX" with your "Apple ID" (from iTunes connect - after creating the app there).
Pay attention that those would open safari if you won't preprocess them, You could also use itms:// to open iTunes directly.
The easiest way to do this now is through iTunes Connect. Once you create an app there is a link to 'View in App Store'. Even if you haven't uploaded a binary yet you can click this link to get your App Store link.
The other answers work too but this generates your url for you. This is the URL it creates with my info removed (replace app-name and the numbers after /id with your own):
https://itunes.apple.com/us/app/app-name/id12345678?ls=1&mt=8
Once you create application in iTunes for submission under App Information tab click in View on App Store you will get app link.
Option 2: (In new update this is no longer available) you can create as below
https://itunes.apple.com/in/app/your-appname/id123456?mt=8
Note : Just replace app name and numbers after /id with your app-id in above link
Use this url example and just change your Apple ID at the end! Replace only the numbers!
https://itunes.apple.com/app/id111111111
You can find the value of your Appple ID by login into your App Store Connect and navigating to 'My Apps' under the 'App Information' -> 'General Information' -> 'Apple ID'
This url format works always and it is particularly helpful if you need the link before you publish your app
The standard URL is:
http://itunes.com/apps/yourlowercaseappname
As of today and for reference, I would say the best option is #"http://itunes.apple.com/app/%#/id%#?mt=8", inserting:
your application lowercase name,
your application ID.
In fact, this is essentially the link you can get for your application on your app's page in iTunes Connect (iTunes Connect > Manage Your Apps > Your App > View in App Store). Minus some parameters (which seems - between other unidentified things - to link to a precise country).
I thinks it's better than the itms://... one because this one redirects you to the iTunes Store on your device, which is not the App Store. You're then redirected, etc. The http://... link seems to be directly hooked to the App Store app.
I ended up using - itms://itunes.apple.com/app/id?mt=8
This seems to be what I was looking for.
Remember http://itunes.apple.com/app/id[Apple_ID] is gone. It will work for the old links and it should work fine for new ones too maybe, but to be safe use the new https://apps.apple.com/app/id[Apple_ID]
You can get application link before uploading your binary file on iTunes Connect.
You just need to upload your meta data using iTunes Connect. And after submitting these data you will get Apple ID. And by this ID you can get the URL for your application.
e.g. http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=appID
where appID="Your application ID when you submit the meta data"
Please check this. It is working here. And If you still have any problem then please let me know. I will help you out to solve the problem.
According to Apple's iTunes Connect documentation the View on App Store link is only available if at least one version of the app has had it's status set to Ready for Sale.
Having said that you can still see what the actual link will be, you just will not be able to load the page.
Best way to get app link is
login to itunes connect
Go to My Apps -> create app record if
you don't have any.
select your app -> go to App Information
section
At bottom of the page check additional information
section, there is a link called "View on App Store". Click on the
link and you will get exact URL for your app.Copy-Paste and Enjoy.
Apple has a documentation for creating easy-to-read app links. If your app name is specified, creating your links with this way is much more clear.
It seems the app id is now the Apple ID in the itunesconnect page. Go to App Information and scroll down until you see Apple ID. That is your app id.
http://itunes.apple.com/app/id[Apple_ID]
Go to https://itunesconnect.apple.com,
if not yet created, create a new App.
Open it and in the first screen (AppStore -> App information -> General) there is a field called "Apple ID" with the id number.
Copy and use it. Is this one.
If AdWords does not allow a link to iTunes, this will solve it...
If you use the link generated at the bottom of iTunesConnect, and you are selling internationally, you will find /us/ or /gb/ or /de/ etc that indicates the language of the relevant store. Adwords will not approve a link with the language indicated.
Why?
Because Adwords does not accept redirects and unmatched URLs. If the link is to the USA store, but the Adword test originates in Germany, then a redirect is detected. Of course, this behavior is correct because no matter what the link says the user will go to her local app store.
Solution: Edit the link from iTunes Connect. Strip out unneeded info. Simply match the display and final URL, disregarding any message about length in the display URL warning text.
URL copied from iTunes:
https://itunes.apple.com/us/app/this-is-my-app-name/id1111111111?ls=1&mt=8
Edited URL suitable for AdWords
DISPLAY URL
itunes.apple.com/app/id111111111
FINAL URL
http://itunes.apple.com/app/id111111111
notes:
- appstore.com is a redirect
- itunes.apple.com by itself is a redirect. Only in full as above does it go directly to your app page.
- When one URL - no matter how valid - redirects, then the result is mismatched URLs.
/gb
1- Go > https://appstoreconnect.apple.com/
2- My Apps > Select Your App
3- App Store > App Information > View On App Store
The best simple link is
http://itunes.apple.com/app/idXXXXXXXXX.
You can get id from your App Information in http://itunesconnect.apple.com.