25

I have an iOS 8 share extension for posting content from a web browser. Users need to be prompted to login if they've never logged in via the containing app.

Pinterest appears to support fast-switching to the containing app (I'm assuming they've implemented a share extension).

iOS documentation suggests that only Today extensions can open containing apps.

Is there a way to fast-switch to the containing app via a share extension for authentication?

kfateem
  • 323
  • 2
  • 8
  • Until now, there is no way to do that! You can use NSUserDefault (with suitname for appGroup) to set sessionKey when user login success in containing app. When user use share extension --> check if sessionKey is existed or alert that they must open containing app and login before use share extension. Another way, You can show dialog with text input for user input account &pass then perform authentication flow inside share extension like "500px" app (in iTunes) – hahv Nov 19 '14 at 07:10
  • 1
    Have you looked at Pinterest? It appears to support this hence the question. – kfateem Nov 19 '14 at 07:39
  • 2
    Sorry, I just test Pinterest and it work well when fast-switch to containing app. I think they must do some special trick to achieve this. I also wait for solution for this problem. If you can find out any solution, please share. Thank guy. – hahv Nov 19 '14 at 08:00
  • Dropbox and Maps.me both are also able to open their apps upon using the sharing extension.. There must be a way... – Tycho Pandelaar Jan 04 '15 at 11:10
  • 1
    Doesn't it seem likely they just ask the system to open a URL that their app is registered to handle? – kwerle Apr 14 '15 at 16:24

0 Answers0