The roads to friendship
-
Upload
acvivo -
Category
Presentations & Public Speaking
-
view
349 -
download
0
description
Transcript of The roads to friendship
![Page 1: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/1.jpg)
Hello
![Page 2: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/2.jpg)
Who$am$I?• Antonio'Cabezuelo'Vivo
• Freelance'iOS'developer'since'2008.
• Camera+,'Kiosko.net,'FunBox,'and'many'others.
![Page 3: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/3.jpg)
The$roads$to$friendship
![Page 4: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/4.jpg)
The$roads$to$friendshipmaking'your'apps'be0er'ci2zens'using'Inter6app'communica2on
![Page 5: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/5.jpg)
What%is%Inter,app%communica2on?
“Is$the$process$by$which$two$apps$in$the$same$device$talk$to$each$other$to$share$data$or$to$perform$ac8ons$relevant$to$the$context$of$
both$apps.”
—"me
![Page 6: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/6.jpg)
Friendship*ways• Family(ma)ers
• Lendings
• Smart(friends
• Fluent(conversa8ons
![Page 7: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/7.jpg)
Family• Apps%from%the%same%developer
• Use%a%shared'keychain1
• Use%an%app%group%NSUserDefaults-initWithSuiteName:
1"Example"at"h,p://shaune.com.au/ios6keychain6sharing6data6between6apps/
![Page 8: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/8.jpg)
Lending• Apps%that%send/receive%data%to/from%other%apps
• Mul7ple%ways
• Via%"Open&in…"
• Via%Document&Provider%extensions
• Custom%URL&schemes%using%UIPasteboard
• Via%AppLinks
![Page 9: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/9.jpg)
"Open&in…"• Allows'to'send/receive'files'to/from'other'apps.
• Use'UIActivityViewController'to'send.
• Set'CFBundleDocumentTypes'in'Info.plist'to'support'receiving'files
• Test'for'file:'url'scheme'in'UIApplica>onDelegate'method'
.applica1on:openURL:sourceApplica1on:annota1on:
![Page 10: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/10.jpg)
Document)Provider• Allows'other'apps'to'access'the'documents'managed'by'your'app.
• Allows'your'app'to'access'documents'from'other'apps
• Accessed'by'any'app'using'a'UIDocumentPickerViewController
• Example'at'http://www.macstories.net/tutorials/implementing-ios-8-document-pickers/
![Page 11: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/11.jpg)
Custom'URL'schemes2
• Every'app'can'add'support'for'mul$ple'custom'url'schemes.
• Configured'in'Info.plist'inside'URL*Types'sec:on
• To'launch'the'other'app'use:[[UIApplication sharedApplication] openURL:url];
• Send'data'via'url'parameters'or'UIPasteboard
2"h$p://handleopenurl.com
![Page 12: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/12.jpg)
UIPasteboard
• Create'a'private'UIPasteboard
• Make'it'persistent
• Add,data'to'pasteboard'0ed'to'a'UTI
• Launch'friend'app'via'custom,URL,scheme'indica0ng'pasteboard'name
• Read,data'from'pasteboard'inside'friend'app
![Page 13: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/13.jpg)
AppLinks3
• Cross&pla*orm,-open-source,-and-simple-mobile-deep&linking.
• A-way-to-link-app-content-from-outside-the-app.
• Promoted-by-Facebook
• Reference-implementaAon-in-Bolts4
4"h$ps://github.com/BoltsFramework/Bolts:iOS
3"h$p://applinks.org/documenta8on/
![Page 14: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/14.jpg)
The$smart$friends
Offer%custom%func.onality%to%other%apps.
• Via%extensions
• Audio%apps%can%use%Inter*app-audio5%or%Audiobus6
6"h$p://audiob.us
5"h$ps://developer.apple.com/library/ios/samplecode/InterAppAudioSuite/Introduc<on/Intro.html
![Page 15: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/15.jpg)
Ac#on&extensions• Allows'ac*ons'to'be'applied'to'different'content
• Through'UIActivityViewController
• Can'have'custom'UI'or'not.
![Page 16: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/16.jpg)
Photo%extensions
• Allows'edi+ng'photos'inside'Photos.app'
• Can'only'be'one'for'each'type'(photo,'video)'in'a'containing'app.
• Photos.app'provides'original+adjustments'or'current'version'
• Must'support'both'device'orienta,ons
![Page 17: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/17.jpg)
Fluent'conversa.ons
Apps$communicate$back&forth$using$URLs$with$custom$URL$schemes.
• Both&apps&must&know&the&protocol&used.
• Be5er&using&x"callback"url
• Much&be5er&and&easier&using&the&IAC-framework
![Page 18: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/18.jpg)
x"callback"url7
Provide(a(standardized(means(for(iOS(developers(to(expose(and(document(the(methods(they(make(available(to(other(apps
URL$Structure
[scheme]://x-callback-url/[action]?[x-callback parameters]&[action parameters]
7"h$p://x)callback)url.com."Directory"at"h$p://philgr.com/library"
![Page 19: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/19.jpg)
x"callback(parameters
• x"source"The"friendly"name"of"the"source"app"calling"the"ac6on
• x"success"URL"to"open"to"return"to"the"source"app"on"success
• x"error"URL"to"open"to"return"to"the"source"app"on"error
• x"cancel"URL"to"open"to"return"to"the"source"app"on"cancel
![Page 20: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/20.jpg)
IAC$Framework
The$easiest$way$to$add$x"callback"url$support$to$your$app.
• Forget(about(parsing(complicated(URLs
• Use(Objec9ve;C(classes(with(callback(blocks
• Create(custom(classes(for(integra9ng(in(other(apps
h"ps://github.com/tapsandswipes/InterAppCommunica9on
![Page 21: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/21.jpg)
Example
Adding&a&url&to&Instapaper&from&your&app.
Without'IAC
NSString *instapaperURL = [NSString stringWithFormat:@"x-callback-instapaper://x-callback-url/add?url=%@", [@"http://tapsandswipes.com" urlEncodedString];
NSUrl *url = [NSUrl urlWithString:instapaperURL];
if ([[UIApplication sharedApplication] canOpenURL:url]) { [UIApplication sharedApplication] openURL:url];}
![Page 22: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/22.jpg)
With%IAC
[[InstapaperIACClient client] add:@"http://tapsandswipes.com"];
![Page 23: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/23.jpg)
DEMO
![Page 24: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/24.jpg)
"Other"!waysThere%are%ways%to%be%friendship%not%accepted%by%the%Mother'Ship
• Via%reminders
• Via%custom,contact%in%address%book
![Page 25: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/25.jpg)
The$future$of$friendship(specula)ons)
• Open&Extensions&to&other&document&types&and&apps
• Standarize&x7callback7url&through&custom&interfaces
• Two&apps&on&screen&communica?ng&via&standard&APIs
![Page 26: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/26.jpg)
Conclusions
![Page 27: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/27.jpg)
Should'my'app'be'friendly?YES
“The%only%way%to%have%a%friend%is%to%be%one”
—"not"me
![Page 28: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/28.jpg)
Should'my'app'be'friendly?YES
“The%only%way%to%have%a%friend%is%to%be%one”
—"Ralph"Waldo"Emerson
![Page 29: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/29.jpg)
Why?• Makes'your'app'be.er.
• Adds'more'uses'to'your'app.
• Helps'other'apps'to'be'be.er.
![Page 30: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/30.jpg)
Don’t&forget&to&always&add
CommonSense.frameworkto#all#your#projects
![Page 31: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/31.jpg)
Thank&you
![Page 32: The roads to friendship](https://reader035.fdocuments.us/reader035/viewer/2022062514/557d5da5d8b42aba3d8b4daa/html5/thumbnails/32.jpg)
Contact'info
Twi$er:(@acvivo
e"mail:([email protected]
web:%h"p://tapsandswipes.com
Github:(h"p://github.com/tapsandswipes