8

I'm working on a standard Action Extension in my iOS app and the Xcode template contains the lines:

@IBAction func done() {
    // Return any edited content to the host app.
    // This template doesn't do anything, so we just echo the passed in items.
    self.extensionContext!.completeRequest(returningItems: self.extensionContext!.inputItems, completionHandler: nil)
}

Here is the documentation for completeRequest.

Questions

  • What is the purpose of passing returningItems to completeRequest?
  • Do apps actually receive edited content from an action extension?
  • If yes, where can I find the API on the receiving end?
  • What are the consequences for me to pass an empty array?
rmaddy
  • 314,917
  • 42
  • 532
  • 579
tombardey
  • 659
  • 3
  • 17

1 Answers1

2

I made small research for other question, that may be found helpful here.

Shortly:

There is callback in UIActivityViewController with parameter:

returnedItems - An array of NSExtensionItem objects containing any modified data. Use the items in this array to get any changes made to the original data by an extension

Artem
  • 331
  • 1
  • 13