I have a strange redirect to app issue with our login system in iOS 9 only.
Now, I already have abitrary payload allowed and my url schemes are setup properly in my plist file.
What happens is this:
Now, if the user closes the SFSafariViewController, comes back to our in app login page and attempt to login again a 2nd time, the redirect to the app works every time from there and the openUrl AppDelegate method is called each time.
Do note that on iOS9, we previously redirected outside the app to Safari to complete the login process (instead of using a SFSafariViewController) and had the same issue whereas the "open in App" popup to redirect to the app would only be shown on the 2nd login attempt and up.
This is all happening on iOS 9 only. On iOS 8, this issue does not appear and our users are always redirected to the app after login in.
The redirect url sent to the app after the OAuth login is the same on the first login attempt and up.
Has anyone gotten such a problem on iOS 9?
Universal links are available in iOS version 9 and above, and work even when the app isn't installed on a user's device. When tapping a link to your website without the app installed, the user will then be linked to your website in Safari. So, both your website and your app work for one URL.
Deep links send mobile device users directly to relevant pages in your app rather than your website. Users click on ads and go directly to your app pages. You can use deep links in many Google Ads products, including App campaigns for engagement, App dynamic remarketing, and Search, Shopping, and Display campaigns.
As you have mentioned regarding Facebook, so
First, guess you are missing the call of FBSDKApplicationDelegate's application:openURL:sourceApplication:annotation:
from UIApplicationDelegate's application:openURL:options:
You may be missing this line NSURL *url = [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey];
in UIApplicationDelegate's didFinishLaunchingWithOptions
Cross check that you have followed the setup as mentioned in this https://developers.facebook.com/docs/ios/ios9
If the device is Jailbreak then in iOS 9.0.2 it will cause the url scheme issue.
Solution that worked for me is the below lines of code, as I have both FB /G+ integrated in my app same as yours:-
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options {
return [[FBSDKApplicationDelegate sharedInstance] application:app
openURL:url
sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
annotation:options[UIApplicationOpenURLOptionsAnnotationKey]]
|| [[GIDSignIn sharedInstance] handleURL:url
sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
annotation:options[UIApplicationOpenURLOptionsSourceApplicationKey]];
}
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
return [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation
] ||
[[GIDSignIn sharedInstance] handleURL:url
sourceApplication:sourceApplication
annotation:annotation];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With