UIActivityViewController Tutorial: Sharing Data | raywenderlich.com

In this UIActivityViewController tutorial, you’ll learn all about giving your users the ability to export their data and share it with others.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/813044-uiactivityviewcontroller-tutorial-sharing-data

Hi, thanks for the tutorials.

How can I add share to Instagram Direct Message in UIActivityViewController? currently I have some trouble here, my fellow Android dev can share to Instagram Direct Message but I haven’t found any solution for iOS.

regards,

@owenb Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hi @irillll,
I’m not familiar with Instagram Direct Message, but by clicking the Share’s ‘More’ button you can enable additional apps to share to. If it’s not in the more list, then it may be because the app doesn’t support it. There is nothing you can do in your app’s code to cause other’s app to show up in the list.

If i share the object to the Messages app, the link doesn’t respond to a tap on the receiving side. Is this solvable? When I added public.archive to public.data, it caused a sheet to open but then you had to click the share icon after that. Is there a way to make the file icon go directly to the app icons from Messages?

@owenb Do you have any feedback about this? Thank you - much appreciated! :]

Hi bfras33,
Be sure the UTI (com.raywenderlich.BookTracker.btkr) is listed in both the Document Types section and Exported Type UTI’s of the plist file. Also check that the receiving iPhone has your app installed.

I don’t fully understand your question about the sheet and file icon/app icons.

I appreciate the knowledge you share. I followed this tutorial, and was unsuccessful at doing anything more than getting my app to come into focus when clicking on a document. I downloaded, compiled, installed and ran your finished app, and discovered that your app will not perform the document import either. I’m fairly sure there may be some new permissions issue that wasn’t present when your tutorial was created, as I’m on iOS 13 (developer beta 3). Any thoughts as to what that may be?

Thank you for this tutorial. It was very helpful. Is it possible to save the file to iCloud and create a link to the file so it can be shared? I’d like to do this programmatically using swift?

Thank you.

@owenb Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hi ellip50,
When the UIActivity share view appears you can select Save to Files and then iCloud Drive. This will put it in iCloud and then you can manually share it with people but I don’t know of a way to programmatically create an iCloud share link.

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!