I am new to deep linking in iOS and I am trying to make sign-in work with a magic link.
The links that the users would receive in their email inbox would be something like this:
https://subdomain.domain.com/?autoLogin=XXXX...XXXX
I want to extract the auto login token and make sure when users click into this link, it takes the user directly to the app.
What path should I put in the apple-app-site-association file?
Currently I have /?autoLogin= and it's not working.
In your URL, ?autoLogin= is a query item and not part of the path.
In your apple-app-site-association you should just need to set the path to /. The ? is messing it up since it's used to match any single character in the string.
If you want to have a specific path, you'll have to update your url to something like https://subdomain.domain.com/autoLogin?token=XXXX...XXXX, then you could add /autoLogin to apple-app-site-association.
Related
I'm having a problem for deeplinking in iOS when the user haven't installed the app. I can't use universal link because the link that's access by user will be a redirect link to the link that have the AASA file. The link that'll be clicked/accessed by user is "deeplink.example.com/{input}" which will redirect to "api.example.com/api/v3/deeplink/{input}", so I can't use universal link, so that endpoint will redirect to URL Scheme instead, like myApp://deeplink/{input}.
I can't find a solution for this problem when user haven't installed the app while still using url scheme, so I'm thinking instead of redirecting it to url scheme, i'll put the url scheme in branch.io and redirect the endpoint to branch.io, like branchdeeplink.com/{input}.
The problem is, can I pass the the input in branchdeeplink.com/{input} to custom url scheme in myApp://deeplink/{input} using branch.io?
A Branchster here -
Passing in query param in the URI scheme as in the example shared is currently not possible. Since you can already attach custom data to your deep links we don't support query params for URI schemes. When you are creating your links you can add
$deeplink_path = product/123
Since Branch automatically appends URI scheme to your links, when the link would open your application like this -
yourUriScheme://product/123
which you can use for in-app routing.
When the users don't have your app installed, they'd be routed to either App Store or the URL specified under iOS redirects in the Configuration Section of Branch Dashboard.
I was developing Android App that could be opened by url link sent to email. The domain exist but the path not (ex. google.com/abcdefgh1234). Im not an owner of the website so putting AASA file there is not possible. The link also contained jwt with some info that I was handling in the app. I wanted to do the same on ios but what I found, URL schemes doesn't support http and Universal Links need special file on that website. Is there a way to handle this on iOS?
You can check custom URL scheme https://developer.apple.com/documentation/xcode/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app
It will work without adding special file to the server. You need only a special link and after a tap on it, you will be redirected to that app (if it exists on your phone). Maybe this is what are you looking for
I am writing an application that lets the user specify a website URL in a textfield. As I gave the app to testers I noticed that most users will not naturally enter the "http://" or "https://" part of a website url, and when told they need to enter the url scheme before "www..." they get frustrated and some don't even know it.
So, once the user enters the url to a site in the textfield, if they did not specify either "http://" or "https://", I want the app to prefix the url entered by the user with the correct scheme, either "http://" or "https://".
When in an iOS app how can I know the correct scheme the website url needs to have so that I can simply prefix the string entered by the user with the correct url scheme?
So, this was marked as a possible duplicate. I can see how it could be perceived as such. However, my intention is not to make the URL work in a UIWebView, my main goal is to actually detect what the correct scheme is before trying to load the url in a UIWebView. So, the possible duplicate feedback is actually wrong. I want to know how to find the correct scheme without having to load the site through a WebView.
I am an ios app developer. We have implemented a custom URL scheme 'my_app://section_name' or so where if the link is opened in the user's mobile browser, it will redirect the user to a specific section in the app.
We would like to be able to tweet these URLs and have users on their mobile device click on them to open up the app, however it just can click once
(when you click close , maybe you click wrong then you want to click it second but it does not work )
I hope this isn't too silly of a question. Thanks
Make sure to check the tweet body after it have been posted.
This may be due of an URL shortener, especially if the tweet is posted from the iOS 5 Twitter framework.
I'm having a similar issue with url schemes. We can include them in emails and text messages, and they highlight and work properly.
Unfortunately, when we do the same with a tweet, the iOS Twitter client fails to recognise the special URL scheme and so the user cannot tap on it to open our app.
Pretty big oversight, methinks. Anyone else had any joy including special URL scheme links in tweets?
A solution that you should consider involves not sharing the URI scheme directly, but rather creating a page on your web server to handle this. In fact, if you want to be able to share full URI schemes with paths, you're better off building a web server to dynamically generate a page with a URI scheme redirect.
This is a over-simplified representation of what we built at Branch. This includes some code to get you started though the web server will require a bit of setup not described here.
instead of testapp://some.data.here, you'll link to http://yoursite.com/hosted-redirect/some.data.here.
your server should listen at the route /hosted-redirect, grab some.data.here and build the following page (body here):
(source: derrrick.com)
So your server will have to generate and respond with this page, filling in some.data.here, anytime http://yoursite.com/hosted-redirect/some.data.here is requested.
A lightweight node app could do this with a single file.
I added to my iOS application option to detect and response to custom URL schemes to launch application ( http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html ).
Link is working perfectly on different sites (using href), but I'm having problem with Facebook. If I'm trying to post link (using Graph API) which looks like:
myapp://blabla
Facebook return error:
The url you supplied is invalid
And for feed with link return
link URL is not properly formatted.
I can't just post url as a message because it's not being detected as a URL and appear like text only.
Is there any way to post to Facebook wall with custom links?
Edit:
I have an idea, but I don't know if it gonna work. Putting
myapp://blabla directly into address field in mobile browser is launching application so probably accessing an webpage (like http://www.mywebpage/myapp) with only redirection to
myapp://blabla gonna work too, but is Facebook gonna accept that link?
I think your suggestion in the edit is the correct method, and should work. However applications like spotify seem to use an intersticial page which fires the "app link" with javascript, the advantage to this approach is that you can use that page to "sell" the app to users who don't have it and also provide lovely open graph tags for people who want to share it.