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
320
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
560
iOS at Tumblr
irace
2
1.4k
Building Tumblr for iOS
irace
0
580
Modularity in mobile applications
irace
0
120
When the iOS SDK says “Jump,” ask “How High?”
irace
7
1.3k
Don't be "an Objective-C" or "a Swift Developer"
irace
5
780
Tumblr iOS architecture
irace
5
510
Node.js for mobile developers
irace
1
130
Introduction to Objective-C and Cocoa Touch
irace
7
570
Other Decks in Programming
See All in Programming
PHPはいつから死んでいるかの調査
chiroruxx
1
400
Site Reliability Engineering for GMO
pyama86
8
1k
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
150
TYPO3 v13 – The road to LTS: What's new and new APIs
luisasofie_xoxo
0
210
スキーマ駆動開発による品質とスピードの両立 - 私達は何故、スキーマを書くのか
kentaroutakeda
0
170
What We Can Learn From OSS
inouehi
0
420
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
380
デフォルトにして至高、RubyMineの大好きな所
ruzia
0
430
AWS CDKコントリビュートTIPS / aws-cdk-contribution-tips
gotok365
2
220
TCAとKMPを用いた新規動画配信アプリ 「ABEMA Live」の設計
tomu28
1
110
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
680
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
7
940
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
31
46k
Statistics for Hackers
jakevdp
789
220k
Building a Modern Day E-commerce SEO Strategy
aleyda
17
6.4k
YesSQL, Process and Tooling at Scale
rocio
164
13k
The Invisible Customer
myddelton
114
12k
Teambox: Starting and Learning
jrom
128
8.4k
Become a Pro
speakerdeck
PRO
11
4.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
322
20k
GitHub's CSS Performance
jonrohan
1025
450k
KATA
mclloyd
15
12k
RailsConf 2023
tenderlove
4
540
GraphQLとの向き合い方2022年版
quramy
32
12k
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