Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Building apps that play nicely with other apps
Search
Bryan Irace
November 21, 2013
Programming
1
330
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
Share
More Decks by Bryan Irace
See All by Bryan Irace
Practical iOS application modularity
irace
1
580
iOS at Tumblr
irace
2
1.4k
Building Tumblr for iOS
irace
0
610
Modularity in mobile applications
irace
0
130
When the iOS SDK says “Jump,” ask “How High?”
irace
7
1.4k
Don't be "an Objective-C" or "a Swift Developer"
irace
5
780
Tumblr iOS architecture
irace
5
520
Node.js for mobile developers
irace
1
130
Introduction to Objective-C and Cocoa Touch
irace
7
610
Other Decks in Programming
See All in Programming
『ドメイン駆動設計をはじめよう』中核の業務領域
masuda220
PRO
5
990
実践 Advanced CallKit 〜快適な通話の実現に向けて〜
mot_techtalk
3
140
Android開発以外のAndroid開発経験の活かしどころ
konifar
2
970
Crafting Cross-Platform Adventures: Building a Game Engine with Kotlin Multiplatform
dwursteisen
0
100
Modular Monolith Go Server with GraphQL Federation + gRPC
110y
1
580
僕が思い描くTypeScriptの未来を勝手に先取りする
yukukotani
9
2.4k
メモリ最適化を究める!iOSアプリ開発における5つの重要なポイント
yhirakawa333
0
410
Prolog入門
qnighy
4
1k
事業フェーズの変化に対応する 開発生産性向上のゼロイチ
masaygggg
0
200
Perl 5 OOP機構30年史 - Perl 5's OOP Mechanism over the past 30 years
moznion
0
110
Swiftコードバトル必勝法
toshi0383
0
150
AndroidアプリのUIバリエーションをあの手この手で確認する / Check UI variations of Android apps by various means
tkmnzm
1
140
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Build The Right Thing And Hit Your Dates
maggiecrowley
30
2.3k
The Pragmatic Product Professional
lauravandoore
31
6.2k
Web Components: a chance to create the future
zenorocha
308
42k
Principles of Awesome APIs and How to Build Them.
keavy
125
16k
Why Our Code Smells
bkeepers
PRO
334
56k
Code Reviewing Like a Champion
maltzj
517
39k
Writing Fast Ruby
sferik
623
60k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
190
16k
A better future with KSS
kneath
235
17k
What's new in Ruby 2.0
geeforr
340
31k
Transcript
Building apps that play nicely with other apps Bryan Irace
Intents Contracts
…URLs?
URLs have shortcomings Like manually, explicitly defining all interactions between
apps
We can fix some of these shortcomings • Documentation !
• Discovery
We can fix some of these shortcomings • Time spent
writing client code ! • Bugs
CocoaPods
It’s OK to be selfish Provide code that helps others
integrate with you
Tumblr iOS SDK github.com/tumblr/ TMTumblrSDK
x-callback-url.com [scheme]://x-callback-url/ [action]?[x-callback parameters]&[action parameters] Used in Byword, Drafts, Instapaper,
Google Maps, Google Chrome, TextExpander, and many more
Please actually implement the “callback” part
URLs tumblr://x-callback-url/blog? blogName=bryan&postID=43724939726 ! tumblr://x-callback-url/text? title=Title&body=Body&tags=gif&tags=lol Hope others both find
and properly implement them
+ (void)viewBlog:(NSString *)blogName; ! + (void)createTextPost:(NSString *)title body:(NSString *)body tags:(NSArray
*)tags success:(NSURL *)successURL cancel:(NSURL *)cancelURL; pod install TMTumblrSDK
UIActivityViewController
@implementation TMTumblrActivity ! - (NSString *)activityTitle { return @"Tumblr"; }
! - (UIImage *)activityImage { return [UIImage imageNamed:@"UIActivityTumblr"]; } ! - (void)performActivity { // Open Tumblr app or hit API directly } pod install TMTumblrSDK
UIDocumentInteractionController
+ (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
Publish an official API client Every app is different. Make
it easy for developers to hit your API directly if they’d prefer.
Subspecs • TMTumblrSDK/URLSchemes ! • TMTumblrSDK/Activity ! • TMTumblrSDK/DocumentInteraction !
• TMTumblrSDK/APIClient • TMTumblrSDK/APIClient/Authentication Don’t make developers include more code than they want to
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