JAY RAPARKA JAY RAPARKA - 25 days ago 6
Objective-C Question

how to implement Deferred deeplink using HOKO Links?

I have implement smart link using HOKO in my iOS app.

And it works fine, when my app is installed than the link get into the app

HOKDeeplink *deeplink = [HOKDeeplink
deeplinkWithRoute:@"ViewController/:product_id"
routeParameters:@{@"product_id": @"2"}
queryParameters:@{@"referrer": @"jax1"}
metadata:@{@"coupon": @"20"}];
[[Hoko deeplinking] generateSmartlinkForDeeplink:deeplink success:^(NSString *smartlink)
{
NSLog(@"smartLink == %@",smartlink);

//[[Social sharedInstance] shareProduct:self.product link:smartlink];
}
failure:^(NSError *error)
{
NSLog(@"Error = %@",error.description);

// Share web link instead
//[[Social sharedInstance] shareProduct:self.product link:self.product.webLink];
}];


By using above code i create my link inside the app

and when i tap on link it will redirect me to the app

[[Hoko deeplinking] mapRoute:@"ViewController/:product_id"
toTarget:^(HOKDeeplink *deeplink)
{
NSString *productId = deeplink.routeParameters[@"product_id"];
NSString *referrer = deeplink.queryParameters[@"referrer"];

NSLog(@"Product Id = %@ && Refferer = %@",productId,referrer);

// Do something when deeplink is opened
NSLog(@"HERE in app did finish launching..");

}];


By using above code in my
appDelegate
which receive the link and do what you want.

But now i want to implement deferred link using this,

I read all document but did not getting any solution still
In document and it's example in GitHub i did not get any solution.

I want some code sample to implement it.
because there explanation more extra features in document but i have not time to read whole features.

so please help me in this if anybody done this before

Any solution will be appreciate

And please tell me the another way to test that deferred link without doing it live because for testing i have upload the app in live but right now its in developing phase so in testing there has to create more versions of the app.

Thank you!

Answer

The above code is working with live i have tested. link are working very good and deferred link also working.

but i still confuse in the referrer key in queryParameter is must or you can use any string key?

Disadvantage

deferred link by hokolinks is too complex to test because you have to test it with live version so you can not perfect code for navigation without testing

For that you must have to make your app live. I did not found any other way to test this.

Yes i know your link work same as simple smart link but developer must have to test that once with live app.

And if any developer are confusing and make logs and alert for testing this than he/she must have to release at least 2 new version and also wait till the app is in review by the appstore.

and document also a very big and no proper example code for this that can be easily understandable because developers are not come from any fixed territory they can be anyone so the terms they follow are different in programming so its little bit complex to understand.

other wise the above code is work fine with live I have tested it with live everything are perfect.

Thank you!