Sharing an image/link to my app in IOS - ios

I'm trying to find out how I can add sharing support to my app using React Native. I've found documentation for displaying the action sheet from within my app but nothing on how I can add support for users to share images/links to my app. I'm not even sure what Apple calls this feature so it's possible I may not be searching with the right keywords.
e.g.
On #1 if you press the share button at the bottom middle of the safari app it will bring up a popup where you can choose an app e.g. Facebook, then if you press on Facebook it will open Facebook with a url to the page you want to share from safari where you can add a comment about the link. I want to replicate this behavior but within my own app. I want my app to be available to choose when I press the share button on the safari app which I will then open a popup window that displays the link the user wants to share allowing them to add a comment before posting the link. Is this possible with react native? I see that I have the option share with other apps (my fidelity app, sears shop your way, etc so It seems like you can have a non system app do this.

They are called Share extensions and they are part of the Extensibility features. They are system-wide Share Sheets. Not to be mistaken with Action Extensions.
Share extensions have colored icons.
Action extensions use monochromatic icons.
Anyway the links do not display UNTIL you have clicked the app in the share sheet.
Editor > Add Target > iOS > Application Extension > Share Extension
Configure the App Group for your app target.
On the Capabilities tab, turn on the App Groups switch and select the group you created. (if you want to enable code sharing between the extension and container app you can put the code in a framework and link to it)
Expand the group you created and you will see a storyboard file, an entitlements file, a view controller and a plist file under the Supporting Files group.
You can use the storyboard file to create a custom interface or do it programatically but Share extensions come with a default compose view that looks like the Facebook and Twitter views.

Related

Xcode swift: How to add a share screen where you can share your own app

I would like to add a share button to my Xcode project which, like for example by WhatsApp (if you press the share button there), displays a screen where you can share this app with a link to the AppStore (for example to share this app with your friends). Would this function also work if you have not yet published your app in the AppStore? Or do you have to publish the app first and then bring an update directly where this function has been added because otherwise, you won't get the app link?
How would that work?
I would be very happy to get help!
Warm greetings
The way I do it is by using firebase and dynamic links, its like getting your URL from apple but also being able to edit what page they see when they click on the link to go to your app.
if you go to the firebase website they have easy documentation and videos to set it up.

How to get listed in the share menu of the Photo App?

I know that in order to get my App listed under the share menu all I have to do is add the Document Types my App supports but it does not work for the "Photos App" for some reason, my App is never shown under this menu.
But if I send an image to my Email and then open it, then tap on Share and my App is right there, what type of document is required for the Photos App then? I added this so far:
public.content
public.jpeg
public.png
public.heic
public.image

Switching between apps with URL Schemes (iOS)

I'm developing an iPhone app with Swift which acts on certain file types (.xml &.zip). I've added these filetypes to the project file as a UTI (Uniform Type Identifiers). When accessing these sorts of files, usually from my email, I press and hold the file and a menu pops up from below. I choose my app icon that says "Open in MyApp". Is there a way that I can return to the email which triggered this event from within the app?
I've done some research on this and found that URL Schemes are the best way for inter - app communication, but you cannot arbitrarily open an app just to open it.
https://developer.apple.com/library/mac/documentation/Miscellaneous/Reference/UTIRef/Introduction/Introduction.html
The vision I have in mind is sort of how Google apps communicate with each other. For example, when opening a link from gmail, it switches apps to chrome. When chrome loads, the page back navigator is in Chrome displays the text similar to "back to gmail"
In iOS 9 the system implements this automatically, as seen in this screenshot here.

How can I show my app in the menu that is displayed when text is selected in another iOS app?

Let's say I am in Safari and I select some text on a web page. A menu pops up that shows "Copy" and possibly other options.
How can I show my app in that menu?
(The purpose would be to send that text to my app in a custom url scheme.)
Edit:
I thought I saw this behavior in safari, but I was mistaken. It was in an app called Equipd.
Here is an example:
![enter image description here][2]
Is this due to a collaboration between Equipd and Pleco? Or can Equipd just do this because it knows about Pleco's custom url scheme? Or is something else going on here?
It's not possible to edit this kind of menu without using jailbreak-methods. But Apple won't allow these kind of methods in their App Store apps.
But you can use the new App Extensions which Apple introduced with iOS 8. You should check the App Extension Programming Guide Apple provides.
There are different extension-types. What you will need is the Share Extension.

How to add my app on share menu on iOS8?

I need my app to be added on the list on the share menu like Evernote.
I have only managed to add in on the list by adding CFBundleDocumentTypes and it is added on the list with "Open in.." with it.
The problem is that I want to know how to implement it the same as Evernote because on the first screen shot I'm using Voice Memos app(default iOS) that doesn't include my app on it, but when I used another app downloaded from the store it shows my app with "Open In.." with it.
I have managed to implement this functionality with Using an iOS 8 share extension to upload a photo to IBM Bluemix . Just disregard the IBM Bluemix implementation.

Resources