2

I'm developing an application that has a share extension target. The app allows photo upload to a server which makes some analysis on the photo. When the analysis is done, which may take few seconds, a notification (with a banner) appears to notify the user.

The share extension allows to send photos for analysis directly from the Photo app. But once the photo posted, the extension disappears and I cannot notify the user that the task is over.

Do you know if this is achievable or not? If yes, any hint?

Thanks a lot.

radar
  • 500
  • 1
  • 6
  • 24
  • Is it a push notification? – Losiowaty Apr 16 '17 at 23:05
  • Not a push notifications. The app should receive a rest 200 response and display something, like an alert, on the screen. – radar Apr 17 '17 at 06:21
  • I would consider switching to push notifications in your place. I can imagine a few scenarios were either your app gets killed before the server responds or the server takes much more time (more complicated image, a lot of requests to the server) to do its work. Also, this would solve your extension issue, since the notification would be independent from what happens on the device. – Losiowaty Apr 17 '17 at 08:23
  • Hi, what about having a progress bar like in WhatsApp share extension, which displays an upload progress bar and an "abort" button. – radar Apr 25 '17 at 16:15

1 Answers1

1

Finally, I managed to do it. But I needed to use a custom view instead of the initial SLComposeServiceViewController view. The code is the following :

class ShareViewController: UIViewController {
...
}

Note that I have to provide the code to dismiss the view.

radar
  • 500
  • 1
  • 6
  • 24