0

Buffer app for iOS 8 got a feature that lets you send an image from the new iOS 8 Share Menu to their app. The flow is like this:

  1. Open iOS Photos app
  2. Select an image and tap the share icon
  3. Select Buffer from the menu (you may need to enable it first)
  4. Buffer app opens and the image is automatically attached in the composer window

How did they manage the part to invoke their full app without using a small widget like most of the other apps do?

AstroCB
  • 12,337
  • 20
  • 57
  • 73
Matt
  • 2,981
  • 5
  • 23
  • 33

2 Answers2

1

iOS Developer at Buffer here. So we make use of iOS 8's new extensions using a share app extension as detailed in the types here... https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ We actually do invoke just an extension rather than the full app.

We use the same composer code within the app itself and the extension by having our own Cocoapod set up which is then set up as a dependency of the app and the extension target. That way we only have 1 codebase and it shares the same familiar look and feel.

To set up a share extension you can follow along with Apple's guide here... https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionCreation.html#//apple_ref/doc/uid/TP40014214-CH5-SW1

Happy to answer any other questions.

AndyDev
  • 1,409
  • 10
  • 17
-1

I had that problem last week, check this documentation from Apple.

https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ShareSheet.html

dizzyboy
  • 370
  • 6
  • 19
  • also this link helped me https://www.ibm.com/developerworks/community/blogs/mobileblog/entry/ios-8-share-extension-photos-ibm-bluemix?lang=en – dizzyboy Mar 17 '15 at 20:45
  • Thanks but do you know of a way to invoke the "full" installed app instead of the small share dialog? – Matt Mar 18 '15 at 17:11
  • like opening the app when you share an image to it? check this one https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html – dizzyboy Mar 18 '15 at 17:40
  • Yes, the flow of the "Open In" menu but for the Share Menu. The docs you linked have nothing to do with the Share Menu though. – Matt Mar 18 '15 at 18:59
  • Try to add this on your Info.plist CFBundleDocumentTypes CFBundleTypeName Image LSHandlerRank Alternate LSItemContentTypes public.image – dizzyboy Mar 18 '15 at 19:21
  • then on your AppDelegate you will handle the file coming in - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation – dizzyboy Mar 18 '15 at 19:22
  • Again, that has nothing to do with the Share Menu. Your code is to handle the "Open In" and NOT the "Share" menu feature of iOS. – Matt Mar 18 '15 at 19:27
  • lol, sorry about that. It seems that buffer has the same implementation with tumblr's share extension with modally displaying the shareviewcontroller. It's a long read but hopefully this is what you're looking for https://github.com/tumblr/ios-extension-issues – dizzyboy Mar 18 '15 at 19:57