cnbecom
cnbecom

Reputation: 166

Document Sharing in iOS with Multiple Files

I need an iOS solution that allows other applications, such as the Files or Photos app, to be able to share any number of declared document types into my host application.

After declaring needed CFBundleDocumentTypes in my info.plist and implementing the application(_:open:options:)in the app delegate, I have observed that I can successfully obtain the url when one item is shared. However, I am unclear on how to handle when more than one file is being shared, especially when the delegate method references only one file.

I know it can be done. For example, if I go to my Photos application and attempt to share multiple photos to Twitter, they all are handled appropriately in Twitter.

Upvotes: 1

Views: 1287

Answers (1)

cnbecom
cnbecom

Reputation: 166

The way to solve this appears to be via the Share Extension. For more information: https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/Share.html and here's a nice tutorial: https://medium.com/macoclock/ios-share-extension-swift-5-1-1606263746b

Upvotes: 0

Related Questions