How to get listed in the share menu? - ios

I'm creating a messaging app and I would like to enable other apps to share text to my app via the share menu option.
How do I get my app listed in there?
This is the menu I would like to get listed in:

In iOS 8, Apple has now enabled a way for you to add your application to a user's Share Sheet as one of many features of Extensibility, which aims to make your app available to the user even when closed.
You can read a lot more about share extensions here, or go straight to Apple's pre-release documentation to dive into the code.
Update: Above link of Apple documentation is not working, check here App Extension Programming Guide: Share

You can do this by adding a few entries into your apps info.plist.
Here's a post that should answer this for you.
slashdot post
also here another link

You can't automatically be added to the UIActivityViewController in other apps. The only things that appear on that "share menu" are a few predefined apps that Apple has added support for, as well as any other app specific activities an app decides to add.
You can setup your app to appear in a list of apps for opening a file but that is not the same as what you are asking for here.

Related

Tracking app installation and campaign details without Third-party APIs

For my iOS App, I am using Campaign Links from App Store Connect for advertisement purposes, and sometimes use Branch links.
Is it possible to get Campaign details inside app after installation is done natively without using any third party SDKs?
I would like to know from which campaign the installation came from with apple provided technology.
Is it possible to get the details inside the app programatically?
I have heard that In Android, they can achieve the functionality using InstallReferrerClient of the library com.android.installreferrer:installreferrer
Do we have any similar option for iOS?
Please guide, Thank you.

Firebase Dynamic Links for iOS work for my device and simulators, but do not work for users after release

So I have implemented Firebase Dynamic Links in my app. I thought that I had them set up correctly, because they work for my own personal device and the simulators perfectly. I released the update to the app, but when two of my friends tried to open them after updating to the new version, it takes them to the Firebase website citing an error. I click the same link and it opens my app and handles the link.
Firebase has added the apple app site association to my domain prefix, I have added the a--link in my app's capabilities, I am truly at a loss as to why this may be. Even if they click the link from notes, it does not give them the option to open the link with my app like it will for me.
Is there anything that I could be overlooking? Happy to supply any relevant details but I feel like I have to be missing something.
App Links:
applinks:share.***.app
URL Type is set up in Target Info.
Custom Dynamic Domain is set in info.plist.
For others that come across this, it seems to be an open Apple bug: http://www.openradar.me/radar?id=4999496467480576
After several days, the user's apps downloaded the proper AASA and the deep links began to work. There doesn't seem to be a workaround with Google Dynamic Links, but Branch.io offers forced URI redirect mode to avoid this issue.

How to receive sharing content in my app?

I would like to add my app to the UIActivityViewController in other apps. How can I add/register my app to allow other apps to send content to my app? How should I receive this content?
Thank you very much to all of you that answered to my question.
With your answers I realized I have to use a Shared Extension. I have found a really nice video that explains how I have to handle the received information: https://www.youtube.com/watch?v=TBC2m8BbcCE. Maybe it could be useful for somewhere in the future.
In your Xcode project, go to file > new > target and select "Share Extension".
Your Share Extension is the extension that will provide an option in the share sheet inside other apps.
To learn more about share extensions, check out Apple's guide.

How to make your app available in UIActivityViewcontroller listed activities

How to make your app available in UIActivityViewcontroller listed activities.
Im unable to find the exact name of this feature.
Here is what I wanna do. My app is a social app where whenever other apps will share the content in UIActivityViewController I want my app to appear in the activities list.
I Apologise that I have no idea about what it is called. Anyone can please help me out.
it's called App Extension, you can use share extensions to share the data between the extension and your app. For more information refer the App Extensions Guide

Is it possible to add an app to the native share dialog?

I am assuming it is not possible to add apps to the native share dialog, like the one used in the Camera Roll. However I see screenshots around with different apps in the dialog.
Is it only apps that are integrated in the OS that can be in this dialog? Or is it possible with some scheme or something?
I have researched the possibilities of UIDocumentInteractionController mentioned by 'The Tiger' and came to the conclusion that it is not possible.
I have looked at the Apple Documentation, declaring the Document Types in the info.plist works for other apps but not for Mail, Images / Camera Roll / etc; the native share dialogs.
Edit:
I really don't get the downvotes....
Here are some references that say it is not possible:
https://devforums.apple.com/thread/140939?tstart=0
why-cant-i-register-my-ios-application-to-handle-the-image-file-type
register-app-to-open-image-files
associate-audio-and-video-types-with-iphone-app
add-a-file-association-with-tiff-files-on-ios
associate-image-file-types-utis-with-ios-app-doesnt-show-open-in-in-m
You need to subclass UIActivity to achieve this.
Theres an example for Dropbox:
https://github.com/goosoftware/GSDropboxActivity
Register your app as supporting the file types that you want to open and add the code to open them. See Document Interaction Programming Topics.

Resources