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
「シェア機能」について考えてみた
Search
PKPK-Carnage
October 23, 2019
Programming
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
「シェア機能」について考えてみた
PKPK-Carnage
October 23, 2019
More Decks by PKPK-Carnage
See All by PKPK-Carnage
iOSアプリを堅牢にデザインするために知っておくべきたった1つのこと
pkpkcarnage
0
520
アプリへの導線の増やし方.pdf
pkpkcarnage
0
760
リリースビルドでのみ起こる謎のバグに見舞われた話
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
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
140
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
1.1k
phperだってパンチカードでコーディングしたい
o0h
PRO
0
350
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
790
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
770
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
630
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
3.9k
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
Next.js: The final boss of Web Performance
guaca
0
280
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
160
Featured
See All Featured
Accessibility Awareness
sabderemane
1
250
KATA
mclloyd
PRO
35
16k
Building AI with AI
inesmontani
PRO
1
1.3k
The Cult of Friendly URLs
andyhume
79
7k
Docker and Python
trallard
47
4.2k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
360
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
730
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Transcript
ʮγΣΞػೳʯʹ͍ͭͯߟ͑ͯΈͨ 1 2019/9/17 ͋Δ͋ΔLTʙiOSΞϓϦ։ൃΤϯδχΞʙ Vol.7 Tomosuke Okada
About me • Tomosuke Okada • iOSྺ3 • ອըͷΞϓϦΛ࡞ͬͯ·͢ •
SNS • Qiita → @fr0g_fr0g • Github → Frog-Frog • Twitter → @fr0g_fr0g • μϒϧϑϩοά
iOSͰγΣΞػೳͱݴ͑ʁ 3
UIActivityViewController 4
• ࣮͕؆୯ • Πϯετʔϧ͞Ε͍ͯΔΞϓϦ ͕ࣗಈతʹදࣔ͞ΕΔ • ग़͢ΞϓϦΛϢʔβʔ͕Χελ ϚΠζͰ͖Δ UIActivityViewControllerͱɾɾɾ 5
UIActivityViewController͍͢͝ 6
͓͠·͍ 7
͍ɺͪΐͬͱͯ 8
ͦΜͳΛ͠ʹ͖ͨΜ͡Όͳ͍ 9
10 Netflix Spotify
γΣΞࣗ࡞Ͱ࣮ͯ͠Δ 11
12 Netflix Spotify
13 Netflix Spotify
InstagramετʔϦʔζͱɾɾɾʁ • Instagram্ͷߘํ๏ͷҰछ • 24࣌ؒͰߘ͕ফ͑Δ • ߘը໘Ͱଟ࠼ͳฤूΛߦ͑Δ • ςΩετ •
ελϯϓ • ͦͷଞ৭ʑʢΞϯέʔτɺΫΠζɺ࣭ͳͲʣ 14
UIActivityViewController͔ΒγΣΞͰ͖ͳ͍ 15
ͭ·Γɾɾɾʁ • InstagramετʔϦʔζ͔ͳΓࣗ༝͕ߴ͍γΣΞΛߦ͏͜ͱ͕Ͱ͖Δ • NetflixSpotifyͷΑ͏ͳίϯςϯπϏδωεΛߦ͏ୈҰઢͷαʔϏεͰ ɺͦΕΛߦ͏ͨΊʹOSඪ४ͷUIActivityViewControllerΛ͋͑ͯΘͣ ʹࣗ࡞͍ͯ͠Δ • γΣΞ͢ΔࡍͷϢʔβʔମݧΛ্ͤ͞Δ͜ͱ͕ॏཁͩͱߟ͑ΒΕ͍ͯ Δ
16
17
࣮ͯ͠Έͨ 18 final class StoriesSharer { private let urlScheme =
URL(string: "instagram-stories://share")! func share() { guard UIApplication.shared.canOpenURL(self.urlScheme) else { return } let item: [String: Any] = [ "com.instagram.sharedSticker.backgroundImage": UIImage(named: "StoryBackgroundImage")!.pngData()!, "com.instagram.sharedSticker.stickerImage": UIImage(named: "StoryStickerImage")!.pngData()! ] let options = [UIPasteboard.OptionsKey.expirationDate: Date().addingTimeInterval(60 * 5)] UIPasteboard.general.setItems([item], options: options) UIApplication.shared.open(self.urlScheme, options: [:], completionHandler: nil) } }
ΊͪΌͪ͘Ό؆୯ 19
(PPE #BE 20 • ࣗ࡞ͰಋઢΛ࡞Δඞཁ͕͋Δ • എܠɺεςοΧʔͷ४උ͕͍Δ • ετʔϦʔζ͔ΒΞϓϦʹඈ ͢ʹInstagramଆʹਃ͕ඞཁ
• ࣮͕͔ͳΓ؆୯ • ࠓ࣌ͷएऀʹਓؾ • ଞΞϓϦͷγΣΞΑΓࣗ༝͕ߴ͍ • ΞϓϦެࣜΠϯελάϥϜΞΧϯ τͱ͔Γ্͛ΕΔ
·ͱΊ • NetflixSpotifyͷΑ͏ͳίϯςϯπϏδωεͷୈҰઢͷαʔϏεγΣΞͷ ϢʔβʔମݧΛ্ͤ͞ΔͨΊʹInstagramετʔϦʔζΛ׆༻͍ͯ͠Δ • ͦΕΒͷαʔϏε͕ͦͷͨΊʹࣗ࡞ͰγΣΞը໘Λ࣮͢Δ΄Ͳॏཁࢹ͞Ε ͍ͯΔ • ࣮͢Δ͜ͱࣗମͱͯ؆୯ͳͷͰΔՁ͕͋Δ •
γΣΞը໘Λࣗ࡞͢Δ͜ͱ͕ελϯμʔυʹͳΔະདྷ͕དྷΔ͔͠Εͳ͍ 21
͓͠·͍ 22