URL scheme is not opening up the app for users but works for me - ios

My app initiates an OAuth2 flow and and uses URL scheme for the redirect URI to redirect users back to my app.
When I install the app from the app store and start OAuth2 flow, it successfully opens the app at the end.
But on users devices it doesn’t recognize the URL scheme and prompts an error message : Safari cannot open the page because the address is invalid.
I am using Branch.io for universal links but I don't think that could affect anything and I can't think of anything else that could break url scheme.
Does anyone have any suggestions or ideas?

Related

iOS app using OAuth2 with Google and Safari presents open page dialog

I have finally got my iPhone app to authenticate and return back to my app with the authorisation code. The main problem was that the reverse client id did not get picked up by my app. I had to add an url scheme of my bundle id instead of the reverse client id.
Anywho, the problem is post authenticating in Safari I am presented with a open 'app name' page dialog. If the user clicks open it works fine. If they leave it for just a few seconds it redirects them to the Google homepage and they have to start all over again. If they are using two factor authentication by any other method than phone call I think it fails too.
How can I avoid this open page dialog?
The solution I found was to use the official Google library for iOS. This does not involve Safari like the AeroGear library I was using does.

How to create the deeplink for my iOS app for use in Facebook?

I would like to link to my iOS app from the Facebook main button of my business page.
However this seems very tricky.
This is from the documentation of Facebook:
https://developers.facebook.com/docs/applinks/ios
The example is in Objective-C. Does anyone have some guidance how to do that in Swift?
Assuming you have a URL scheme configured in your app, this actually doesn't require any additional code work to implement. Here would be the steps:
Go to your app page on Facebook and edit the button.
Under the iOS Settings section, open the dropdown menu and select App
In the next section, enter a URI using your app's custom URI scheme and a fallback website URL to use if your app is not installed (perhaps a page on your website, or a link directly to the iTunes store page)
Note: using the custom URI scheme only works acceptably in this case because Facebook is providing fallback functionality for another destination when the app is not installed. In any other place, if you opened your app's URI scheme without it being installed, you would instead get an ugly 'address could not be found' error. Obviously this is bad for user experience, so if you want to do conditional linking like this anywhere else, you can use a tool like Branch.io (full disclosure: I'm on the team) to handle it.

Use URL scheme to open react-native App

I am working on a react-native app that uses the Spotify api.
Long story short, I had to use the LiknkingIOS Library to open the auth page in the Safari app and get the necessary tokens and all works, I even got to redirect to my app one the user is successfully authenticated using a custom URL scheme.
The only problem is that a prompt saying "Open in 'myApp'?" appears.
I need help figuring out a way to avoid the prompt from appearing or using another component to open Spotify's auth page without leaving the app.

Link to Ionic page from external website

I'm integrating an Ionic app with a 3rd party web authentication framework. The framework requires that the user visit a web page to authenticate and then receive several authentication token cookies.
I plan to open a link to the external login page, have the user authenticate, and then be redirected back to the Ionic app.
I need a URL to the homepage of my app so that the login page can redirect the user back after logging in. How do I generate a a URL for a location in the Ionic app?
why not just use the in app browsers plugin so that the user never has to leave the app in the first place.
https://github.com/apache/cordova-plugin-inappbrowser
Our app has a blog and we use this
$scope.readMore = function (index) {
$scope.link = $scope.articles[index].WebLink;
window.open($scope.link, '_blank', 'transitionstyle=crossdissolve,toolbarposition=top');
};
by using the option _blank we can have the user open up a webpage inside the app not have to have the navigate away from the app in order to access a url, i also looks way better than a iframe.

Conditional deep link or url in email

Is it possible to send an (HTML) email with links, so that if the user is reading the email in his iPhone, the links will take him to our app, but if he's reading the email in a computer, the links will open up in the browser?
Our app already has deep linking implemented. Any hacky workaround will be appreciated too :)
Your best bet is to link to a URL on your own server, which attempts to open the app if you’re on an iPhone. It requires a roundtrip through Safari, but it will work. You can have the page attempt to open the app, and if Safari is still open after 2 seconds, assume it failed and redirect to the mobile site. That redirect trick is from this answer.

Resources