Firebase dynamic link: deeplink always empty - ios

I am developing an app in ionic 3 for android and ios platform. For deeplinking, I am using cordova firebase dynamic link plugin.
This is working fine for android platform. But in the ios platform, though it is not throwing any error, it is not working.
My current ionic code.
this.platform.ready()
.then(() => {
return this.firebaseDynamicLinks.onDynamicLink();
}).then((dynamicLink:any) => {
console.log(dynamicLink); // always gives {matchType: "weak", deepLink:""} in ios
}).catch((error: any) => {
console.log(error);
});
The android part working fine. But in ios, the deeplink is always coming as empty.
my manually created dynamic url
https://xxxx.app.goo.gl/?link=<encoded url to mysite>&apn=<android bundle id>&ibi=<ios bundle id>
The provided link is returning HTTP 200 status when opening in the browser.
Testing steps (in ios):
In my iphone (ios9) I have placed this dynamic link in notepad
Then by clicking on the dynamic link the app opens.
In the console, I get
{matchType: "weak", deepLink:""}

Related

Firebase Dynamic Link on iOS TestFlight breaks query, react-native, Expo

My dynamic link from Firebase to TestFlight app recently stopped working.
Link:
{firebase_domain.page.link}/?link={my_site}/?type=password-reset&token={jwt}&ibi={apple_bunle_id}&isi={apple_ID}
Open in Firefox focus. All other options - from embed to separate site to click, or gmail, or safari lead to AppStore by apple_ID of app - and it’s empty, because it’s TestFlight.
The problem is that I receive a malformed link from firebase as:
{apple_bunle_id}://google/link?deep_link_id={my_site}%2F%3Ftype%3Dpassword-reset&lt=DDL_LONG&lid=temp_link_id&utm_medium=dynamic_link&utm_source=firebase
So instead of parsed token I receive nothing.
It was working recently, and works on Android.
Link works on Expo GO if you replace {firebase_domain.page.link} with local expo url. (Universal link probably)
{firebase_domain.page.link}/apple-app-site-association set up properly
{my_site} and {firebase_domain.page.link} added to as associatedDomains without formatting
My iOS config from app.json
"ios": {
"bundleIdentifier": {apple_bunle_id},
"supportsTablet": false,
"googleServicesFile": "./GoogleService-Info.plist",
"buildNumber": "47.9",
"associatedDomains": ["applinks:{my_site}", "applinks:{firebase_domain.page.link}", "applinks:{my_site2}"]
}
My Linking prefixes config:
prefixes: ['{universal_link_name}', Linking.makeUrl({firebase_domain.page.link}), Linking.makeUrl({apple_bunle_id})],

Ionic 4 IOS deeplinks redirect to broswer instead of the actual app

i am trying to set up deeplinks for my ionic 4 ios app, i followed these steps to accomplish the given task:
i uploaded an apple site association file to the web version of the app, i used the actual bundle id and app id prefix from Certificates, Identifiers & Profiles page on apple.com
i verified the website url using https://branch.io/resources/aasa-validator, i got 5/5 green results
i also enabled associated domains in both xcode and on apple.com dev space for the application
inside the code in the app components i used the following code :
const subDeepLinks = this.deeplinks.route({
'/verify/:code': VerifyPage,
'/reset-password/:token': ResetPasswordPage,
}).subscribe((match: any) => {
this.zone.run(() => this.router.navigate([match.$link.path]));
}
});
And here is the list of the deeplink variables from package.json
"ionic-plugin-deeplinks": {
"URL_SCHEME": "<my-domain-name>",
"DEEPLINK_SCHEME": "https",
"DEEPLINK_HOST": "<my-domain-name>"
}
I test this using iPhone simulator, i created a contact with a url that is supposed to lead to the app. But when i click on it i get redirected to the web version of the app.
Any help is appreciated, thanks!
well, it turned out aasa worked. i used my gf's iphone installed the app and checked. so nevermind

Apple Watch screen stays blank telerik

I use Telerik-AppleWatch plugin for cordova.
i followed the instructions and i copied the simplified example from the project.
when i run the project the Built successfully but on the iwatch i see just the name of the app and blank screen.
I didn't receive error on the console.
i use xcode. target is- 8.2
There is not much information on the internet about it
function initAppleWatch() {
applewatch.init(function () {
alert("init");
onAppRequestsUpdate();
onGlanceRequestsUpdate();
});
applewatch.callback.onLoadAppMainRequest = onAppRequestsUpdate;
applewatch.callback.onLoadGlanceRequest = onGlanceRequestsUpdate;
}
can anybody know what can i do?
I work on it all week without success
thanks!:)

App rejected by Apple because Auth0 signUpLink doesn’t open in Cordova InAppBrowser but in system browser (Safari)

Our Ionic 2 mobile app was rejected by apple because of the following reason:
We noticed that the user is taken to Safari to sign in or register for an account, which provides a poor user experience.
Please revise your app to enable users to sign in or register for an account in the app.
The Auth0 Lock provides the user with a sign up button that we configured through the signUpLink option of the Lock. This button opens a registration page in the system browser (Safari) outside of the application, which apparently isn't acceptable for Apple.
Before we upgraded to the latest version of Ionic 2 (Ionic 2 beta 11), the lock would open the link in the InAppBrowser, which is acceptable for Apple. Because of the difference in Ionic 2 version, I imagine this could be an Ionic issue.
I made sure I had the Cordova InAppBrowser plugin installed. It's present in my config.xml as <plugin name="cordova-plugin-inappbrowser" spec="~1.6.1" /> and when I open the .xcproject file in XCode, the plugin is present in the Plugins folder. I have also tested using the InAppBrowser manually using open('https://www.google.com/, '_blank'); which opened the InAppBrowser as it should.
Neither the code regarding the Auth0 Lock, nor the URL to the registration page changed.
Auth0 Lock version: 10.6 (have also tried on 10.11, didn't solve the issue)
Ionic version: 2.1.0
OS: iOS
What could've changed since the Ionic 2 beta 11 that would affect opening the link in the InAppBrowser?
I have come up with a dirty temporary workaround by adding an onclick attribute to the button that opens the link in the window.open function:
this.lock.on('show', () => {
let parent: Element = undefined;
let intervalIndex = 0;
let interval = setInterval(() => {
parent = document.getElementsByClassName('auth0-lock-tabs')[0];
if (parent) {
let item = parent.children.item(1).children.item(0);
item.setAttribute('onclick', `window.open('${AppSettings.registrationUrl}', '_blank'); return false;`);
item.removeAttribute('href');
clearInterval(interval);
}
if (intervalIndex == 20)
clearInterval(interval);
intervalIndex++;
}, 500);
});
With this modification, the sign up link opens in the InAppBrowser and therefore doesn't violate Apple's terms anymore.
Note: this is not a good answer to this problem and is not a guaranteed fix as there is a delay on configuring this onclick attribute on the button.

Issue to open IOS app using costum URL scheme IONIC

I am getting some issue in this Cordova plugin. I do not know where I am doing wrong.
I am not able to call my app in IOS. Android is working fine.
I register my app with mytest://
So my issue is:-
$scope.appOpen = function(){
$scope.finalData.TrustedToken=md5.createHash($scope.finalData.agentid+$sco pe.finalData.Caller+$scope.finalData.key);
var data = JSON.stringify($scope.finalData);
window.open('mytest://'+data, '_system');
}
that code is working fine in Android but in IOS not working.
If I append simple string that is opening my app and also getting that URL there in handler. But above code not able to open other app
window.open('mytest://testData', '_system');
but that code is working fine. so how can i put variable in URL.

Resources