0

How to share text-message, Links, Images, Audio Etc., one app to another App.

Like in Whats app for forward and like to share the content its shows

Suggestions We will have list of items (Notes, skype, trello, linkedin etc...,).

How can I include when share content from other application like whatsApp to current MyApp.

And also when selected s

I used Share Extension Target to my project.., I have no clue how to go foward from there.

NSExtensionActivationSupportsImageWithMaxCount.

 Number  2

When I open PhotoLibary and selected photo its not showing MyApp CustomUI Screen.
Also its dismisses the selected Image and PhotoLibary got struct.

And also

When run the target with selected sharedExtension open what's app and try to share text got App crashed.

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'

Will be highly appreciated for your feeds

Thanks In advance

kiran
  • 4,285
  • 7
  • 53
  • 98
  • have a look i think [this may help you ](https://stackoverflow.com/questions/33497578/how-to-add-my-app-to-the-share-sheet-action) – Awais Mobeen Oct 31 '19 at 13:54

1 Answers1

0

One way to share data between different apps or an extension and the app is to use NSUserDefaults and to access the same UserDefault source by using a suite.

First, you have to put the apps you want to share the same UserDefaults into the same App Group. You can easily do this by enabling the App Group entitlement and provide a group name.

Then, call NSUserDefaults with initWithSuiteName, provide a common database name for all the apps in the App Group. Here's the documentation.

And, you can save data to that NSUserDefaults object by calling set or get, as detailed here.

More details are available on this documentation page in the Sharing Data with Your Containing App section.

;)