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
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
More Decks by PKPK-Carnage
See All by PKPK-Carnage
iOSアプリを堅牢にデザインするために知っておくべきたった1つのこと
pkpkcarnage
0
520
「シェア機能」について考えてみた
pkpkcarnage
0
130
リリースビルドでのみ起こる謎のバグに見舞われた話
pkpkcarnage
0
230
Any型をprotocolにキャストする時に 気をつけた方がいい話
pkpkcarnage
0
320
今日から使える! Optionalをいい感じに扱うtips
pkpkcarnage
0
1.3k
もっと早く教えて欲しかった画面遷移
pkpkcarnage
0
370
iOSの通信処理を簡潔に書く
pkpkcarnage
0
330
Other Decks in Programming
See All in Programming
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
1
310
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
160
ActionController meets Protocol Buffers
sorah
0
220
golang-bob.pdf
iwatsukayura
0
130
速習iPhone Duo対応
yuukiw00w
2
980
Workers Cache を知る
syumai
0
350
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.4k
プロダクトコードからライブラリの境界を見つける
elmetal
PRO
0
110
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
6k
mrbgem 三角測量 開発
ogom
0
240
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
370
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
Featured
See All Featured
Designing Powerful Visuals for Engaging Learning
tmiket
1
600
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
460
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Git: the NoSQL Database
bkeepers
PRO
433
67k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
630
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
370
Code Reviewing Like a Champion
maltzj
529
40k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
740
Making the Leap to Tech Lead
cromwellryan
135
10k
Transcript
؆୯ʹͰ͖Δʂ ΞϓϦͷಋઢͷ૿͠ํ 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