Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building apps that play nicely with other apps

Bryan Irace
November 21, 2013

Building apps that play nicely with other apps

Given at the NYC CocoaPods meetup ("Cocoa Kucha") on November 20, 2013.

Bryan Irace

November 21, 2013
Tweet

More Decks by Bryan Irace

Other Decks in Programming

Transcript

  1. + (void)viewBlog:(NSString *)blogName; ! + (void)createTextPost:(NSString *)title body:(NSString *)body tags:(NSArray

    *)tags success:(NSURL *)successURL cancel:(NSURL *)cancelURL; pod install TMTumblrSDK
  2. @implementation TMTumblrActivity ! - (NSString *)activityTitle { return @"Tumblr"; }

    ! - (UIImage *)activityImage { return [UIImage imageNamed:@"UIActivityTumblr"]; } ! - (void)performActivity { // Open Tumblr app or hit API directly } pod install TMTumblrSDK
  3. + (UIDocumentInteractionController *)presentInteractionControllerWithURL:(NSURL *)URL caption:(NSString *)caption tags:(NSArray *)tags fromBarButtonItem:(UIBarButtonItem *)item

    { UIDocumentInteractionController *controller = [UIDocumentInteractionController interactionControllerWithURL:URL]; controller.UTI = @"com.tumblr.photo"; controller.annotation = @{ @"TumblrCaption" : caption, @"TumblrTags" : tags }; ! [controller presentOpenInMenuFromBarButtonItem:item animated:YES]; return controller; } pod install TMTumblrSDK
  4. Publish an official API client Every app is different. Make

    it easy for developers to hit your API directly if they’d prefer.
  5. Subspecs • TMTumblrSDK/URLSchemes ! • TMTumblrSDK/Activity ! • TMTumblrSDK/DocumentInteraction !

    • TMTumblrSDK/APIClient • TMTumblrSDK/APIClient/Authentication Don’t make developers include more code than they want to
  6. Summary You should make it easy for developers to integrate

    with your app ! Providing code via CocoaPods is obviously the best way to do so com/jobs