Deep Linking not working when app is in background?
I am using following method to implement deep linking.
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation
When app is in background this method is not calling when I came from browser?.
I have added all required procedures to implement deep linking.
How to solve this ?
ios objective-c deep-linking openurl
add a comment |
I am using following method to implement deep linking.
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation
When app is in background this method is not calling when I came from browser?.
I have added all required procedures to implement deep linking.
How to solve this ?
ios objective-c deep-linking openurl
Try implementing this one insteadapplication:continueUserActivity:restorationHandler:
– Evgeniy
Nov 15 '18 at 6:48
Tried but that method not calling.What should I do to get called that method ?
– Uday Kumar Eega
Nov 15 '18 at 6:52
Here's a good tutorial, covering both iOS and backend parts of it. medium.com/@abhimuralidharan/…
– Evgeniy
Nov 15 '18 at 8:25
add a comment |
I am using following method to implement deep linking.
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation
When app is in background this method is not calling when I came from browser?.
I have added all required procedures to implement deep linking.
How to solve this ?
ios objective-c deep-linking openurl
I am using following method to implement deep linking.
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation
When app is in background this method is not calling when I came from browser?.
I have added all required procedures to implement deep linking.
How to solve this ?
ios objective-c deep-linking openurl
ios objective-c deep-linking openurl
edited Nov 15 '18 at 6:49
rmaddy
243k27321382
243k27321382
asked Nov 15 '18 at 6:38
Uday Kumar EegaUday Kumar Eega
80112
80112
Try implementing this one insteadapplication:continueUserActivity:restorationHandler:
– Evgeniy
Nov 15 '18 at 6:48
Tried but that method not calling.What should I do to get called that method ?
– Uday Kumar Eega
Nov 15 '18 at 6:52
Here's a good tutorial, covering both iOS and backend parts of it. medium.com/@abhimuralidharan/…
– Evgeniy
Nov 15 '18 at 8:25
add a comment |
Try implementing this one insteadapplication:continueUserActivity:restorationHandler:
– Evgeniy
Nov 15 '18 at 6:48
Tried but that method not calling.What should I do to get called that method ?
– Uday Kumar Eega
Nov 15 '18 at 6:52
Here's a good tutorial, covering both iOS and backend parts of it. medium.com/@abhimuralidharan/…
– Evgeniy
Nov 15 '18 at 8:25
Try implementing this one instead
application:continueUserActivity:restorationHandler:
– Evgeniy
Nov 15 '18 at 6:48
Try implementing this one instead
application:continueUserActivity:restorationHandler:
– Evgeniy
Nov 15 '18 at 6:48
Tried but that method not calling.What should I do to get called that method ?
– Uday Kumar Eega
Nov 15 '18 at 6:52
Tried but that method not calling.What should I do to get called that method ?
– Uday Kumar Eega
Nov 15 '18 at 6:52
Here's a good tutorial, covering both iOS and backend parts of it. medium.com/@abhimuralidharan/…
– Evgeniy
Nov 15 '18 at 8:25
Here's a good tutorial, covering both iOS and backend parts of it. medium.com/@abhimuralidharan/…
– Evgeniy
Nov 15 '18 at 8:25
add a comment |
2 Answers
2
active
oldest
votes
try this.
func application(_ application: UIApplication, continue userActivity: NSUserActivity,
restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
guard let dynamicLinks = FIRDynamicLinks.dynamicLinks() else {
return false
}
let handled = dynamicLinks.handleUniversalLink(userActivity.webpageURL!) { (dynamiclink, error) in
print(error as Any)
}
return handled
}
add a comment |
#define App_Scheme @"yourbundleappschme"
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
if ([[url scheme] isEqualToString:App_Scheme])
{
NSLog(@"Calling Application Bundle ID: %@", sourceApplication);
NSLog(@"URL scheme:%@", [url scheme]);
NSLog(@"URL query: %@", [url query]);
return YES;
}
return NO;
}
Also Add in Delegate
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options {
//handle here
if ([[url scheme] isEqualToString:App_Scheme])
{
NSLog(@"URL scheme:%@", [url scheme]);
NSLog(@"URL query: %@", [url query]);
return YES;
}
return FALSE;
}
Also add
Project - > Target - > Capabilites -> Associated Domains -> Add your domain with
App links: domain here
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53313752%2fdeep-linking-not-working-when-app-is-in-background%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
try this.
func application(_ application: UIApplication, continue userActivity: NSUserActivity,
restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
guard let dynamicLinks = FIRDynamicLinks.dynamicLinks() else {
return false
}
let handled = dynamicLinks.handleUniversalLink(userActivity.webpageURL!) { (dynamiclink, error) in
print(error as Any)
}
return handled
}
add a comment |
try this.
func application(_ application: UIApplication, continue userActivity: NSUserActivity,
restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
guard let dynamicLinks = FIRDynamicLinks.dynamicLinks() else {
return false
}
let handled = dynamicLinks.handleUniversalLink(userActivity.webpageURL!) { (dynamiclink, error) in
print(error as Any)
}
return handled
}
add a comment |
try this.
func application(_ application: UIApplication, continue userActivity: NSUserActivity,
restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
guard let dynamicLinks = FIRDynamicLinks.dynamicLinks() else {
return false
}
let handled = dynamicLinks.handleUniversalLink(userActivity.webpageURL!) { (dynamiclink, error) in
print(error as Any)
}
return handled
}
try this.
func application(_ application: UIApplication, continue userActivity: NSUserActivity,
restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
guard let dynamicLinks = FIRDynamicLinks.dynamicLinks() else {
return false
}
let handled = dynamicLinks.handleUniversalLink(userActivity.webpageURL!) { (dynamiclink, error) in
print(error as Any)
}
return handled
}
answered Nov 15 '18 at 12:49
Swati DesaiSwati Desai
114
114
add a comment |
add a comment |
#define App_Scheme @"yourbundleappschme"
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
if ([[url scheme] isEqualToString:App_Scheme])
{
NSLog(@"Calling Application Bundle ID: %@", sourceApplication);
NSLog(@"URL scheme:%@", [url scheme]);
NSLog(@"URL query: %@", [url query]);
return YES;
}
return NO;
}
Also Add in Delegate
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options {
//handle here
if ([[url scheme] isEqualToString:App_Scheme])
{
NSLog(@"URL scheme:%@", [url scheme]);
NSLog(@"URL query: %@", [url query]);
return YES;
}
return FALSE;
}
Also add
Project - > Target - > Capabilites -> Associated Domains -> Add your domain with
App links: domain here
add a comment |
#define App_Scheme @"yourbundleappschme"
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
if ([[url scheme] isEqualToString:App_Scheme])
{
NSLog(@"Calling Application Bundle ID: %@", sourceApplication);
NSLog(@"URL scheme:%@", [url scheme]);
NSLog(@"URL query: %@", [url query]);
return YES;
}
return NO;
}
Also Add in Delegate
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options {
//handle here
if ([[url scheme] isEqualToString:App_Scheme])
{
NSLog(@"URL scheme:%@", [url scheme]);
NSLog(@"URL query: %@", [url query]);
return YES;
}
return FALSE;
}
Also add
Project - > Target - > Capabilites -> Associated Domains -> Add your domain with
App links: domain here
add a comment |
#define App_Scheme @"yourbundleappschme"
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
if ([[url scheme] isEqualToString:App_Scheme])
{
NSLog(@"Calling Application Bundle ID: %@", sourceApplication);
NSLog(@"URL scheme:%@", [url scheme]);
NSLog(@"URL query: %@", [url query]);
return YES;
}
return NO;
}
Also Add in Delegate
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options {
//handle here
if ([[url scheme] isEqualToString:App_Scheme])
{
NSLog(@"URL scheme:%@", [url scheme]);
NSLog(@"URL query: %@", [url query]);
return YES;
}
return FALSE;
}
Also add
Project - > Target - > Capabilites -> Associated Domains -> Add your domain with
App links: domain here
#define App_Scheme @"yourbundleappschme"
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
if ([[url scheme] isEqualToString:App_Scheme])
{
NSLog(@"Calling Application Bundle ID: %@", sourceApplication);
NSLog(@"URL scheme:%@", [url scheme]);
NSLog(@"URL query: %@", [url query]);
return YES;
}
return NO;
}
Also Add in Delegate
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options {
//handle here
if ([[url scheme] isEqualToString:App_Scheme])
{
NSLog(@"URL scheme:%@", [url scheme]);
NSLog(@"URL query: %@", [url query]);
return YES;
}
return FALSE;
}
Also add
Project - > Target - > Capabilites -> Associated Domains -> Add your domain with
App links: domain here
answered Nov 16 '18 at 13:20
9to5ios9to5ios
3,15522052
3,15522052
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53313752%2fdeep-linking-not-working-when-app-is-in-background%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Try implementing this one instead
application:continueUserActivity:restorationHandler:
– Evgeniy
Nov 15 '18 at 6:48
Tried but that method not calling.What should I do to get called that method ?
– Uday Kumar Eega
Nov 15 '18 at 6:52
Here's a good tutorial, covering both iOS and backend parts of it. medium.com/@abhimuralidharan/…
– Evgeniy
Nov 15 '18 at 8:25