Building apps that play nicely with other apps

3770c1b6a421c8d4de4177356911a829?s=47 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.

3770c1b6a421c8d4de4177356911a829?s=128

Bryan Irace

November 21, 2013
Tweet

Transcript

  1. 6.
  2. 13.

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

    *)tags success:(NSURL *)successURL cancel:(NSURL *)cancelURL; pod install TMTumblrSDK
  3. 15.

    @implementation TMTumblrActivity ! - (NSString *)activityTitle { return @"Tumblr"; }

    ! - (UIImage *)activityImage { return [UIImage imageNamed:@"UIActivityTumblr"]; } ! - (void)performActivity { // Open Tumblr app or hit API directly } pod install TMTumblrSDK
  4. 17.

    + (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
  5. 18.

    Publish an official API client Every app is different. Make

    it easy for developers to hit your API directly if they’d prefer.
  6. 19.

    Subspecs • TMTumblrSDK/URLSchemes ! • TMTumblrSDK/Activity ! • TMTumblrSDK/DocumentInteraction !

    • TMTumblrSDK/APIClient • TMTumblrSDK/APIClient/Authentication Don’t make developers include more code than they want to
  7. 20.

    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