Sharesheet option in branch.io swift - ios

We are using branch.io for Deep linking in our projects, There is an latest version release on Feb 3. We can’t able to get the latest SDK options
v0.31.4¶ (2020-Feb-03)
Add share sheet option to override placeholder URL. This allows more control over the iOS 13 preview header.
Link:https://docs.branch.io/version-histories/ios-version-history/
When the link is clicked the link will navigate to the App Store for the respective app it’s the current flow. When the link is long pressed it will ask to share via option.
What’s mean by share sheet option here?

Share sheet option provides the user multiple options to share the link from within the app.
This is a Branch share sheet with options of messaging/social apps and also to save the link on the clipboard.
You can refer to our documentation here : https://docs.branch.io/apps/ios/#share-deep-link
Thanks,

Related

How can I open my app directly from the iOS Share Sheet?

Update: don't have time yet to test provided answer, but will keep this answer updated as I try different things.
In the iOS 14 Simulator, when I open the share sheet and click their Share Target, the Apple News app is launched immediately and they check if the shared URL has been added to their index.
My question is how are they launching their app immediately without any user interaction?
A gif is worth about 100,000 words: https://giphy.com/gifs/HPzTNyWGDDMVwASQ9z
I would imagine it may be some combination of registering a Universal Link and then programmatically triggering that from the Share Extension View Controller, but I’m wondering if anyone has any better ideas.
A couple of other places I've asked:
Swift Subreddit
iOS Programming Subreddit
This is just an open URL call to a news app. Prior to iOS 14, it was named as copy to app name.
To achieve this you need to specify the supported document type for your application in plist using key CFBundleDocumentTypes.
Refer to apple documentation for more info:
https://help.apple.com/xcode/mac/current/#/devddd273fdd
There is a change in share sheet option listings.
case 1: When your application doesn't support any kind of extension. And have supported document add to plist. Your application will appear in the share sheet for supporting documents. On tap, your application gets an OpenURL call with the URL of the document shared.
case 2: Your application supports share extension or action extension, then your open URL call option for your application will not appear in the share sheet. if the share extension and action extension activation predicate are not satisfied and the document shared is supported by your application that option will appear the same as case 1. (Summary: if share extension or action extension is listed in share sheet then open URL option will not be listed.)
Note: Limitation of openURL call is, it supports only a single URL. For example, you are sharing multiple files, your application OpenURL option will appear. But on tap, your application will receive only one URL.
If your requirement is sharing only a single URL and your application doesn't have a share extension and action extension. Then key CFBundleDocumentTypes is your friend.

Opening iOS App from Custom URL in QRCode

I want to open my app from a URL from QRScan , which is common when your custom URL looks like this "myappname://productid". my problem is that I want my app to open from a Website type URL which is something like this "https://myappname.com/productid"
How can i achieve this ?
This can be achieve by using universal links. For simplicity and high level implementation I will recommend you to use Firebase's dynamic link product. It is very well documented and more over its free to use.
Before you began I think you might need apple developer account.
Steps
Create a project and an app on the firebase console.
From the left menu under the Grow section select dynamic links.
Create a domain as per your preferences e.g. https://yourapp.page.link
Now goto apple developer portal and edit your app id and enable associated domains for it.
Now open and select your xcode project under the project navigator section on the left side.
Then goto signing and capabilities section and click on add capability
Add the associated domains in you capabilities.
Then Add your created domain in it like this: applinks:yourapp.page.link
Make sure to add your team id and app id in the firebase console.
Now depending on your requirement you can create fixed dynamic link through firebase console or alternatively you can use their api to create links. in case your link is user specific or you want to add unique info in each link.
Now when someone click on the link depending on the platform the link behave accordingly as per the parameters provided during the link creation process.
These are just high level steps for detailed implementation and available options you can always refer to the dynamic link documentation

Firebase dynamic link does not navigate to ios app/ appstore from facebook post in iOS

I have to implement navigation from facebook post to my native iOS app or app store if the app is not installed. For that, I have tried Facebook APP Link feature but it did not work. Then I created Firebase Dynamic link and post it on facebook app directly. After tapping on posted link, it shows one pop up saying "Leave Facebook? This webpage is trying to open an app outside of Facebook. Are you sure you want to open it?"
After tapping on Yes, it does nothing. I have cross verified the created link with https://app_id.app.goo.gl/apple-app-site-association It shows associated bundle id, team id, app store id.
Can anyone please suggest me the proper pathway to implement deep linking with facebook post to the app?
Also, can we test deep linking with the app which is not on the App Store?
Thanks in advance.
Facebook doesn't like users to leave their app. They stopped supporting App Links in their iOS app almost a year ago, and have never supported Universal Links (which is what Firebase Dynamic Links uses).
The only workaround is to send users to a landing page with a CTA button, and put another deep link behind that button (on a different domain than the one on which you're hosting this landing page). It's an extra step for the user, but currently the only option. Branch.io (full disclosure: I'm on the Branch team) does this via the Deepviews feature. Dynamic Links currently doesn't have an equivalent, so you'd need to build something yourself.

Universal Links opened in unsupported apps, are they completely lost?

I am trying to implement Branch marketing links in my app. I want for example to be able to create a link to share with users that will route them to a particular screen in the app. I noticed from the Branch docs that for some apps the link just opens the app store and not the actual app (even if it is installed). Being based in Asia I have the feeling that most of our customers will be wanting to share the link via an unsupported app such as Line. If a user is redirected to the app store via the link and then taps “open app”, what happens? Is the link meta data lost? Does the meta data only remain if the link is opened in an app such as mail or notes?
Alex from Branch.io here:
This list in the Branch documentation gives a partial list of apps that support Universal Links, but unfortunately it is not complete. We've tried to cover the most common apps.
Line is using a custom webview (not SFSafariViewController). It doesn't support Universal Links for the initial click, but this is one of the edge cases where Branch can detect the originating app and do some custom behavior. For Line, we trigger your app's URI scheme. This means the behavior your users see when clicking a Branch link from within Line is the same as Universal Links, even though Universal Links isn't actually the protocol being used.
If you want to handle other apps where Branch doesn't have a workaround like this, you could try enabling the deepviews feature. This will cause the link to open a content preview with a button to launch the app (or forward to the App Store if not installed).
When a user with the app already installed clicks the Open button on the App Store page, all the meta data is preserved and they will still be deep linked. Branch doesn't know (or care!) what happens between when the user clicks the link and the app launches, so that gives you plenty of flexibility.
Universal Links have some restrictions - not from Branch but from Apple's implementation. One of these restrictions is Universal Links cannot be opened from SFSafariViewController.
From Branch's docs, Line is not explicitly mentioned but other popular messaging apps may be of interest. I don't have Line myself but whether Line launches websites in it's own browser or the Safari app may give you a clue.
Facebook Messenger - works conditionally
WeChat - works conditionally
Twitter - works conditionally
LinkedIn - works conditionally
Any app using SFSafariViewController - works conditionally

How to control list of apps displayed at "Open In" at iOS

As we know, at iOS, we could use UIDocumentInteractionController to display the "Open in" menu where a list of third party apps which could handle the document. User could pick one app to open the document at that app.
We are looking for if we could only display a partial list at the "Open In" menu so we could apply security control here. With UIDocumentInteractionController, somehow we didn't find a way to do this. Is this possible at iOS?
since no one is answering this question, I am going to answer myself. Based on current research, there is no way to do this at iOS 6. However at the iOS 7, there seems a new feature added to manage open in per these 2 links although I haven't got chance to look into API yet.
http://www.pcmag.com/article2/0,2817,2424581,00.asp (open in management)
http://www.maas360.com/products/mobile-device-management/apple-ios/ (Manage open in)

Resources