Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Universal Link on iOS
Search
Tachibana Kaoru
April 27, 2016
Programming
1
190
Universal Link on iOS
Tachibana Kaoru
April 27, 2016
Tweet
Share
More Decks by Tachibana Kaoru
See All by Tachibana Kaoru
GeoLocationAnchor and MKTileOverlay
toyship
0
350
Custom Group Activities
toyship
3
1.4k
Synchronized iPhones, Again!
toyship
2
1.6k
ARKit4.pdf
toyship
1
2.2k
Custom Gesture Recognizer on iOS
toyship
3
1.4k
HEVC Video with Alpha Channel
toyship
1
1.2k
RealityKit & Reality Composer
toyship
3
640
ARKit3
toyship
4
7.4k
UIViewPropertyAnimator and Easing
toyship
2
1.1k
Other Decks in Programming
See All in Programming
テストやOSS開発に役立つSetup PHP Action
matsuo_atsushi
0
160
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
500
React Native New Architecture 移行実践報告
taminif
1
150
バックエンドエンジニアによる Amebaブログ K8s 基盤への CronJobの導入・運用経験
sunabig
0
160
エディターってAIで操作できるんだぜ
kis9a
0
730
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
190
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
390
【Streamlit x Snowflake】データ基盤からアプリ開発・AI活用まで、すべてをSnowflake内で実現
ayumu_yamaguchi
1
120
マスタデータ問題、マイクロサービスでどう解くか
kts
0
100
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
160
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
3
740
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
350
Featured
See All Featured
Statistics for Hackers
jakevdp
799
230k
Typedesign – Prime Four
hannesfritz
42
2.9k
Speed Design
sergeychernyshev
33
1.4k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Optimizing for Happiness
mojombo
379
70k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Bash Introduction
62gerente
615
210k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
730
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.3k
Transcript
Universal Link 2016/04/20 @TachibanaKaoru
ࣗݾհ ौ୩ͷVOYAGE GROUPͰiOSΤϯδχ ΞΛ͍ͯ͠·͢ɻ Twitter/Vainglory : @TachibanaKaoru Blog : http://www.toyship.org/
Bouldering : 4ڃ ே࣌ؒ.jpͱ͍͏ΞϓϦΛͩͯ͠·͢ɻ
Universal Linkͱ from iOS9 » ࣗͷΞϓϦଞͷΞϓϦΛىಈ͢ΔεΩʔϜɻ » iOS෦ͷʢઃఆͨ͠ʣURL Link͔ΒΞϓϦΛىಈ͢Δ͜ͱ͕Ͱ͖ Δɻ
» ࠓ·ͰͷΧελϜURLεΩʔϜΛ͓͖͔͑Δػೳɻ » URL Schemeͷ߹ʹͦΕͧΕͷΞϓϦ͕͖ͳͷΛઃఆͰ͖Δ ͷͰɺΞϓϦؒͷॏෳͷةݥੑ͕͕͋ͬͨɺUniversal Linkͷ߹ʹ ɺDomain໊ʹґଘ͢ΔͨΊɺҰҙੑ͕୲อͰ͖Δɻ
Universal Link from Memo
Universal Link from Mail
Universal Link ΞϓϦ͕Πϯετʔϧ͞Ε͍ͯΔ߹ɺ ΞϓϦͰ։͘ɻ
Universal Link ΞϓϦ͕Πϯετʔϧ͞Ε͍ͯͳ͍ ߹ɺMobile SafariͰ։͘ɻ
ଞͷΞϓϦ͔Βͷ Universal Link » openURLͰىಈͨ͠߹ʹɺUniversal Link͕༗ޮʹͳΓ·͢ɻ » ͨͩ͠ɺurlΛ։͘ࡍʹSFSafariViewControllerɺWKWebViewɺ UIWebViewΛ͏ͱUniversal LinkແޮʹͳΓ·͢ɻ
» ҙࣝͷߴ͍ΞϓϦͩΊɻ
ࣗͷΞϓϦ͔Βͷ Universal Link ࣗͷΞϓϦ͔ΒopenURLΛͯ͠Universal Link͕༗ޮʹͳΓ· ͤΜɻʢMobile SafariͰ։͘ʣ
Mobile Safari͔Β » Mobile SafariͷΞυϨεόʔʹURLΛೖྗͨ͠߹ɺMobile SafariͷϦϯΫ͔ΒҠಈͨ͠߹ʹUniversal Link͖͖·ͤ Μɻ » GoogleͳͲͷݕࡧ݁Ռ͔ΒUniversal
Link͕༗ޮʹͳΓ·͢ɻ
ϢʔβʔͷબΛอଘ » ΞϓϦͰ։͔͘ɺMobile SafariͰ։͔͘બͰ͖Δػೳ͕͋Δɻ
ϢʔβʔͷબΛอଘ Mobile SafariͰUniversal LinkରԠͷ ϦϯΫΛݕࡧ݁Ռʹදࣔͯ͠ΈΔɻ
ϢʔβʔͷબΛอଘ Ұ୴Universal Linkͱͯ͠ΞϓϦͰ ։͔ΕΔ͕ɺӈ্ʹSafariͷϦϯΫΛ දࣔ͢Δɻ
ϢʔβʔͷબΛอଘ SafariͷϦϯΫΛબ͢ΔͱSafariͰ ։͖ɺҎޙSafariͰ։͘Α͏ʹͳΔɻ
Smart App Bannerͱͷҧ͍ » Universal LinkɺSmart App Bannerͱత͕ҟͳΔͨΊɺ྆ ํ࣮͢Δඞཁ͕͋Γ·͢ɻ »
Smart App BannerͰɺΞϓϦ͕Πϯετʔϧ͞Ε͍ͯͨΒΞϓϦ ͕ىಈ͞ΕɺΞϓϦ͕Πϯετʔϧ͞Ε͍ͯͳ͔ͬͨΒApp Store͕ ىಈ͢Δɻ <meta name="apple-itunes-app" content="app-id=400435286, app-argument=https://asajikan.jp/topics/">
Smart App BannerͱUniversal LinkͷӅΕ ͨؔ » Smart App Bannerͷcontentͷapp-argumentࢦఆ͕Universal LinkʹରԠ͍ͯ͠Δ͔Ͳ͏͔ͰUI͕มΘΔɻʢԼهͷϦϯΫΛ
Mobile SafariͰνΣοΫͯ͠Έ͍ͯͩ͘͞ʣ » https://asajikan.jp/ (Universal LinkରԠ) » https://asajikan.jp/topics/ (Universal LinkඇରԠ)
Smart App Banner Universal LinkରԠͷ߹ɺΞϓϦͰ Universal Linkͱͯ͠։͘ɻʢBanner খ͞Ίʣ
Smart App Banner Universal LinkରԠͷ߹ɺΞϓϦͷ τοϓΛ։͘ɻʢBannerେ͖Ίʣ
࣮ํ๏ » Server » Client
࣮ํ๏ (Server) » server root(/)ʹ apple-app-site-association ͱ͍͏໊শͰjson ϑΥʔϚοτͷઃఆϑΝΠϧΛஔ͘ɻ » ʢ͜ͷϑΝΠϧʹॺ໊Λ͔͚Δඞཁ͕͋Δͱ͍͏ใ͕͚͋ͬͨ
Ͳɺ͔͚Δඞཁ͋Γ·ͤΜɻʣ » iOS9.3.1Ҏ্Ͱɺapple-app-site-associationͷϑΝΠϧαΠζ 128KBʹ੍ݶ͞Εͯ·͢ɻ(9.3Ͱൃੜ͍ͯͨ͠ΫϥογϡͷݪҼ ͩͬͨΒ͍͠)
apple-app-site-association format » Bundle IdentifierͱUniversal LinkʹରԠ͍ͤͨ͞pathΛهड़ɻ { "applinks": { "apps":
[], "details": [ { "appID": "9JA89QQLNQ.com.apple.wwdc", "paths": [ "/wwdc/news/", "/videos/wwdc/2015/*"] }, { "appID": "ABCD1234.com.apple.wwdc", "paths": [ "*" ] } ] } }
࣮ํ๏ (Server) » ઃఆϑΝΠϧͷஔ͖ॴɺ9.3͔Β /.well-known/ αϙʔτ͢Δ Α͏ʹͳΓ·ͨ͠ɻ » Technical Q&A
QA1919 » Incoming requests for /.well-known/apple-app-site- association file https://developer.apple.com/library/ios/qa/qa1919/ index.html#//appleref/doc/uid/DTS40016874
apple-app-site-association format asajikan.jpͷݱࡏͷઃఆ { "applinks": { "apps": [], "details": [
{ "appID": "94VJUJ8B7P.jp.asajikan.www", "paths": [ "/", "/article/*", "/recipe/*" ] } ] } }
apple-app-site-association format » ࣮ɺࠓͷϑΥʔϚοτҎલʹΘΕ͍ͯͨݹ͍ϑΥʔϚοτ͋Γ ·͢ɻʢͦͷ͏ͪແޮʹͳΔͱࢥ͏ͷͰΘͳ͍΄͏͕Α͍ʣ { "applinks": { "apps": [],
"details": { "94VJUJ8B7P.jp.asajikan.www": { "paths": [ "/", "/article/*", "/recipe/*" ] } } } }
apple-app-site-association format » ?͕Ұจࣈɺ*͕ෳจࣈ » NOTΛͬͯର֎pathͷઃఆͰ͖Δ͕ɺݹ͍iOSͰඇରԠ ʢ9.2.1ͰOKɺ9.1ͰNGʣ » "paths": [
"/wwdc/news/", "NOT /videos/wwdc/2010/", "/ videos/wwdc/201?/"] » ͜͏͢Δͱɺwwdc/201*/ҎԼͷϑΝΠϧwwdc/2010Λͷ͍ͧ ͯUniversal LinkରԠͱͳΔɻ
App Search API Validation Tool » formatͷvalidation checkΛ͢Δ͜ͱ͕Ͱ͖·͢ɻ » https://search.developer.apple.com/appsearch-validation-
tool
None
࣮ํ๏ (Client) » ProjectͷCapabilityʹAssociated DomainsΛઃఆ » ྫʣDomains: applinks:asajikan.jp
None
࣮ํ๏ (Client) » ىಈ͞Εͨ࣌ͷϋϯυϦϯάॲཧ » UIApplicationDelegate » application:continueUserActivity:restorationHandler: » ʢCore
SearchHandoffʹΑΔىಈϋϯυϦϯά͢Δʣ
func application(application: UIApplication, continueUserActivity userActivity: NSUserActivity, restorationHandler: ([AnyObject]?) -> Void)
-> Bool{ if userActivity.activityType == "com.apple.corespotlightitem" { // Core SearchͷॲཧΛهड़ } else if userActivity.activityType == NSUserActivityTypeBrowsingWeb { let url : NSURL? = userActivity.webpageURL // Universal LinkͷॲཧΛهड़ } return true }
·ͱΊ » Web Site࿈ܞΞϓϦUniversal Linkಋೖ͖͢ » Smart App Banner࿈ܞͤ͞Δͱϕλʔ »
Universal LinkରԠpathࡉ͔͘ઃఆͰ͖Δ͕ɺiOSͷόʔδϣϯ ʹΑͬͯಈ࡞͕ҟͳΔ͜ͱʹҙ