Use URL scheme to open react-native App - ios

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.

Related

iPhone OAuth login request redirects to App not Browser, doesn't work

My current scenario is:
Running an iPhone on the latest iOS
LinkedIn App is installed and logged in
Web browser is NOT logged into LinkedIn (because I have the app)
Developing a web app with "log in with LinkedIn" functionality
On the iPhone, clicking the "log in with LinkedIn" button redirects me straight the the LinkedIn App, which subsequently does nothing - just shows me my feed. I have verified this same behaviour occurs on a third-party site as well as my own. Note that Android exhibits similar behaviour, though I haven't tested as extensively there.
I've found several workarounds:
If I open the web site in Private Browsing mode clicking the login button asks me if I want to open the App or stay in the browser.
If I long-press and "Open in background tab" the login button it'll open (in the background, of course) instead of redirecting to the app, allowing me to log in.
If I manually type "linkedin.com" into the browser and log in then it seems to work too.
None of these are even vaguely practical for end users, essentially forcing us to remove the option entirely.
I'm fairly sure this is a problem at LinkedIn's end and the solution is either:
Don't redirect to the App for OAuth Authorize requests, or
Make the App correctly handle OAuth Authorize requests.
If I'm incorrect and there's some way we can stop this redirect from the client side I'd be happy to hear, otherwise I hope LinkedIn engineers actually see this...
See the comments in Issues with Linkedin Social connection
LinkedIn already confirmed that it is a problem on their side.

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

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?

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.

Open iOS FB app with URL Schema

I am investigating ways to open the FB app using a URL Schema. I want to open my app directly to the Search Page and automatically fill the search bar. I am not seeing the search page covered in the URL Schemas:
URL Scheme to open a post in facebook app
Currently, my app is able to go to the search page by creating a custom hyperlink through code and launching Safari. However, most people are not logged into FB through Safari so this causes me issues.
Any thoughts?

Resources