Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
アプリへの導線の増やし方.pdf
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
PKPK-Carnage
December 24, 2019
Programming
760
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
アプリへの導線の増やし方.pdf
PKPK-Carnage
December 24, 2019
Transcript
27 slides
؆୯ʹͰ͖Δʂ ΞϓϦͷಋઢͷ૿͠ํ Tomosuke Okada 2019/12/24 ͋Δ͋ΔLTʙ ΫϦεϚεͩΑʂAndroid & iOS߹ಉ େLTେձ
ʙ Vol.9 1
About me • Tomosuke Okada • iOSྺ3 • ອըͷΞϓϦΛ࡞ͬͯ·͢ •
SNS • Qiita → @fr0g_fr0g • Github → Frog-Frog • Twitter → @fr0g_fr0g • μϒϧϑϩοά
ΞϓϦ։ൃऀͷئ͍ɾɾɾ 3
ΞϓϦΛͬͯཉ͍͠ʂʂ 4
ಋઢΛ૿͞ͳ͖Όʂ 5
ΞϓϦΛ։ͨ͘Ίͷํ๏ͬͯͳʹ͕͋ΔͩΖ͏ʁ • ϗʔϜ • AppStore • ϓογϡ௨ • URLεΩʔϜ •
ϢχόʔαϧϦϯΫ • TodayExtension • Spotlightݕࡧ 7
SpotlightݕࡧΛհ͍ͨ͠ 8
Spotlightݕࡧͬͯͳʹʁ 9
10
͜͜ʹࣗͷΞϓϦͷίϯςϯπΛද͍ࣔͨ͠ 11
12 CoreSpotlight.frameworkͱMobileCoreServices.frameworkΛՃ͢Δ
13 struct Movie { /// өըݻ༗ͷࣝผ൪߸ let id = 0
/// ໊લ let title = "εύΠμʔϚϯ" /// ͋Β͢͡ let summary = "ฏຌͳগɺϐʔλʔɾύʔΧʔ์ࣹೳԚછ͞Εͨᥨʹט·Εͨ͜ͱͰɺਓతͳ ೳྗΛಘͯ͠·͏ɾɾɾ" /// ը૾ let thumbnail = UIImage(named: "spider") /// ऀ໊ͷྻ let actorNames = ["τϏʔɾϚάϫΠΞ", "ΩϧεςΟϯɾμϯετ", "δΣʔϜζɾϑϥϯί"] }
14 import Foundation import CoreSpotlight import MobileCoreServices final class SpotlightManager
{ func save(_ movie: Movie) { let attributeSet = CSSearchableItemAttributeSet(itemContentType: kUTTypeData as String) // ᶃλΠτϧ attributeSet.title = movie.title // ᶄઆ໌จ attributeSet.contentDescription = movie.summary // ᶅը૾ attributeSet.thumbnailData = movie.thumbnail?.pngData() // Ωʔϫʔυʢදࣔ͞Εͳ͍͕ɺλΠτϧઆ໌จʹೖͬͯͳ͍จݴΛ͜͜ʹೖΕ͓͚ͯɺݕࡧͨ࣌͠ʹҾ͔͔ͬΔΑ͏ʹͳΔʣ attributeSet.keywords = movie.actorNames /* uniqueIdentifierAppDelegateͰऔΓग़͢͜ͱ͕Ͱ͖ΔͷͰɺ Spotlightݕࡧܦ༝ͰΞϓϦΛ։͍ͨ࣌ͷͨΊͷURLεΩʔϜΛೖΕ͓ͯ͘ */ let item = CSSearchableItem( uniqueIdentifier: "my-app://open/movie?id=\(movie.id)", domainIdentifier: "my-app", attributeSet: attributeSet ) CSSearchableIndex.default().indexSearchableItems([item], completionHandler: nil) } }
15
16
ͨͬͨ͜Ε͚ͩͷίʔυͰදࣔͰ͖Δʂ 17
18 import CoreSpotlight extension AppDelegate { func application(_ application: UIApplication,
continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { // SpotlightͰ։͔Ε͔ͨͲ͏͔ΛνΣοΫ͢Δ switch userActivity.activityType { case CSSearchableItemActionType: return self.openApplicationFromSpotlight(userActivity) default: return false } } private func openApplicationFromSpotlight(_ userActivity: NSUserActivity) -> Bool { // userActivity͔ΒURLεΩʔϜΛऔಘ͢Δ guard let urlScheme = userActivity.userInfo?[CSSearchableItemActivityIdentifier] as? String else { return false } // URLεΩʔϜΛ։͍ͨ࣌ͷॲཧΛ࣮͢Δ return true } }
࣮ࡍʹͱ͋ΔΞϓϦͰೖΕͯΈͨ 19
શવΘΕͯͳ͍ 21
ͦΜͳʹ൵؍తʹͳΔ͜ͱͰͳ͍ 22
͜͏ࢥͬͨ 27 • ͦͦͦΜͳʹΘΕΔͱࢥͬͯͳ͍ • ίϯςϯπϏδωε(ອը)ΛߦͬͯΔ • ڝ߹ΞϓϦ͕ͻ͠Ί͖߹ͬͯΔ • Spotlightݕࡧʹ࡞໊Λೖྗ͢ΔϢʔβʔɺྔ͕ߴ͍ͣ
• ͦ͏͍ͬͨϢʔβʔ͕ΞϓϦΛ։͖͔͚ͬ͘Λ࡞Δ͜ͱ͕Ͱ͖Δ
·ͱΊ • Spotlightݕࡧ͔ͳΓ؆୯ʹ࣮Ͱ͖Δ • ͦΜͳʹେྔʹΘΕΔػೳͱ͍͏Θ͚Ͱແ͍ • SpotlightݕࡧʹίϯςϯπΛද͓ࣔͤͯ͘͜͞ͱʹҙຯ͕͋Δ • ࣮ʹؔͯ͠Qiitaʹৄ͘͠ॻ͍ͨ 31
32
Qiitaͱ͍͑ɾɾɾ 33
and factory Advent Calendar 2019 34
35
͓ΘΓ 36
More Decks by PKPK-Carnage
See All by PKPK-Carnage
iOSアプリを堅牢にデザインするために知っておくべきたった1つのこと
pkpkcarnage
0
530
「シェア機能」について考えてみた
pkpkcarnage
0
130
リリースビルドでのみ起こる謎のバグに見舞われた話
pkpkcarnage
0
240
Any型をprotocolにキャストする時に 気をつけた方がいい話
pkpkcarnage
0
320
今日から使える! Optionalをいい感じに扱うtips
pkpkcarnage
0
1.4k
もっと早く教えて欲しかった画面遷移
pkpkcarnage
0
380
iOSの通信処理を簡潔に書く
pkpkcarnage
0
330
Other Decks in Programming
See All in Programming
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
110
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
150
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
680
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
190
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
340
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
1
470
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
350
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
270
あなたはMCPの機能を、まだ知らない。
4geru
1
380
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
330
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
990
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
260
Featured
See All Featured
Bash Introduction
62gerente
615
220k
A designer walks into a library…
pauljervisheath
211
25k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
680
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
370
Mind Mapping
helmedeiros
1
440
Evolving SEO for Evolving Search Engines
ryanjones
0
360
Building AI with AI
inesmontani
PRO
1
1.4k
Highjacked: Video Game Concept Design
rkendrick25
PRO
2
580
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k