Reputation: 3977
I'm having trouble getting my head around app links for Facebook. I am using the Facebook app link tool so I can host my link on Facebook. The first step where is says Register a Custom URL Scheme for iOS the screenshot is not clear at all
"Custom URLs are defined in the info.plist file for your project. Under URL Types, add a new custom scheme of your choice in the URL Schemes array. For example, you can enter myBestApp as the URL Scheme. You can then enter myBestApp:// into your mobile browser to open your app."
If my choice of scheme is mySuperApp
do I need to add mySuperApp
or mySuperApp://
to the info.plist?
There is then a section that says:
URL with custom scheme
A url with a custom scheme that will open your app. e.g. myapp://sample
What do I need to put here? mySuperApp://
? I don't understand why they have sample at the end. Do I need to add it? What does it mean?
Also I tried to create a link and I lost it. Is there anywhere you can view previously saved links and edit them?
Any pointers would be really appreciated, having trouble getting this working and want to make sure I understand what I'm doing properly. Not loving the Facebook docs.
Upvotes: 1
Views: 197
Reputation: 1162
Think of your URI scheme as analogous to http for the browser. iOS and Android browsers have registered http as their URI scheme in their plist, so that any time a link is clicked for http://, the browser app will open up. You need to register for a similar type scheme, like myapp, so that any time someone clicks myapp://, your app will open.
Here's a quick tutorial on how to setup your plist file:
Just a heads up, the service I helped build, branch.io, makes hosting your Facebook AppLinks really easy. We've got a fully functional dashboard to manage all of the previously created links as well.
Upvotes: 1
Reputation: 15662
Have a look at the sample apps that ship with the SDK, they all register some form of custom schemes in order to use the SDK features.
In short, if your custom scheme is mySuperApp://
then you should add mySuperApp
to your info.plist.
There's no good way to view previously created links yet, we're working on that. For now, just create a new app link host url.
Upvotes: 1