How to make your app available in UIActivityViewcontroller listed activities - ios

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

Related

How to get the source app from a iOS share extension? The reminder app knows the text is shared from the notes app

When I share a note from iOS notes app into Reminders, the reminders is able to know that it is from the notes app, and display the notes app icon.
I have looked at NSExtensionContext etc and couldn't figure this out. Is this specific only to Apple Apps?
I am implementing a share extension that others can share to, however, I can't figure out how to get that I am getting a share from notes vs other apps.

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.

My App Inside WhatsApp's Share Extension

Hello when i am in WhatsApp and i want share a image, its going to open Share Extension with many apps like Slack. And when i am in App Photos and i want share a image, its going to opens Share Extension with apps like Flicker but isn't Slack. So my question is, can i add my own app to Whatsapp's Share Extension? and How can i catch it in my own app with Swift?
Yes, you can. So actually it will not be your main app,but it will be an extension to your main app.
Share extensions are made for the exact same purpose.
Kindly check for "Share Extension"
Following link may help you.
https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Share.html#//apple_ref/doc/uid/TP40014214-CH12-SW1

Image sharing in iOS

In iOS I noticed you can select a photo in your Photo app and then share it using other apps (eg. Whatsapp, Telegram, etc.). I would like to implement the same functionality in my app, but I don't know where to start. Can you help me? The things I don't understand are:
how my app can be listed between the apps that can share images;
how my app "knows" what to do when a user selects an image;
I know this is basic, maybe trivial, but I searched a little maybe using the wrong keywords, I dunno.
Any help is appreciated.
Here is a reference on accessing images iOS:
Open gallery with photos and videos
Here are some references on sharing images with iOS:
Sharing and Actions
App Extension Essentials

How to get listed in the share menu?

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.

Resources