Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WWDCに学ぶライブコーディングwithCoreNFC/livecoding_with_wwd...
Search
fromkk
June 30, 2017
Programming
2
3.2k
WWDCに学ぶライブコーディングwithCoreNFC/livecoding_with_wwdc_and_corenfc
LIFULLさんのWWDC - Developer's Livingというイベントで発表した内容です。
fromkk
June 30, 2017
Tweet
Share
More Decks by fromkk
See All by fromkk
note社の全員野球で品質向上活動について / note_qa_challenge #iOS_test_teatime
fromkk
3
1.8k
1年分のデータが見たいと言われてやったこと/yearly_data_with_note
fromkk
0
920
note iOSチームの自動化 ver.2021/automation_with_iOS_team_on_note_ver2021
fromkk
0
1.9k
Bitrise体験会説明資料/bitrise_explore
fromkk
1
1k
noteのiOSアプリで実装したアクセシビリティの全て #iosdc #a /a11y_with_iOS_App_on_note
fromkk
2
3.6k
dSYMのアップロードで SPMを活用する/use_spm_with_upload_dsyms
fromkk
1
2.7k
Bitriseのリモートアクセス機能 #bitrise_meetup/remote_access_of_bitrise
fromkk
1
550
note社でのMagic Pod活用事例 #af_iosdc/magicpod_with_note
fromkk
2
11k
iOSには無いmacOS独自機能をCatalystで実装する #iosdc #d/make_macos_apps_with_catalyst
fromkk
9
2.1k
Other Decks in Programming
See All in Programming
ファインディLT_ポケモン対戦の定量的分析
fufufukakaka
0
940
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
160
Bedrock Agentsレスポンス解析によるAgentのOps
licux
3
930
Rails 1.0 のコードで学ぶ find_by* と method_missing の仕組み / Learn how find_by_* and method_missing work in Rails 1.0 code
maimux2x
1
250
PEPCは何を変えようとしていたのか
ken7253
3
280
クリーンアーキテクチャから見る依存の向きの大切さ
shimabox
5
1.1k
Rubyで始める関数型ドメインモデリング
shogo_tksk
0
140
15分で学ぶDuckDBの可愛い使い方 DuckDBの最近の更新
notrogue
3
680
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
310
ABEMA iOS 大規模プロジェクトにおける段階的な技術刷新 / ABEMA iOS Technology Upgrade
akkyie
1
220
CDKを使ったPagerDuty連携インフラのテンプレート化
shibuya_shogo
0
110
Formの複雑さに立ち向かう
bmthd
1
940
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Typedesign – Prime Four
hannesfritz
40
2.5k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
260
Faster Mobile Websites
deanohume
306
31k
Thoughts on Productivity
jonyablonski
69
4.5k
The Cult of Friendly URLs
andyhume
78
6.2k
Writing Fast Ruby
sferik
628
61k
Scaling GitHub
holman
459
140k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
Mobile First: as difficult as doing things right
swwweet
223
9.5k
Transcript
WWDCʹֶͿϥΠϒίʔ σΟϯά (+CoreNFC) WWDC - Developer's Living 2017/06/30 1
Profile Kazuya Ueoka Timers inc.ͷiOSΤϯδχΞ Twitter: @fromkk Github: fromkk Qiita:
fromkk 2
օ͞Μ͏WWDCͰൃද ͞Εͨ৽ػೳνΣοΫ ͯ͠·͢ΑͶʁ 3
طʹຊޠͰͷࢿྉ͔ ͳΓଟ͍ͷͰԿൃද͢Ε ྑ͍Μͩ 4
͍͔ͭ͘ൃද͖ͯ͠·ͨ͠ 4 Swift 4͔Β࣮͞ΕΔCodable at AKIBA.swift 4 # Type ʹDrag
and Dropͷ࣮Λͯ͠Έͨ at WWDC After Party @Ebisu 4 Depth APIͰ؆қΫϩϚΩʔ߹ at GEEK GARAGE iOS vol3 5
͕ 6
ϥΠϒίʔσΟϯάͬͯ ϋʔυϧߴ͍ 7
۩ମతʹ 4 ొஃͬͯۓு͢Δ 4 ϛε͖ͭͷ 4 ൃද͢Δ͔Βʹ͏·͘Γ͍ͨ 8
ϥΠϒίʔσΟϯά͢Δ࣌ͬͯ 4 Ұ୴खݩͷXcodeͰͤ͞Δ 4 ͍ͨ͠༰ʹԊͬͯଞͷςΩετΤσΟλʹΧοτˍ ϖʔετ 4 ొஃ͢Δ࣌ʹॱ൪ʹίϐϖ Έ͍ͨͳΠϝʔδʢθϩ͔Βॻ͍͍ͯΔํଞͷํ๏ͷํ ͨ͘͞Μ͍Βͬ͠Ό͍·͢ʣ
9
WWDCϥΠϒίʔσΟϯάͰͷൃදͷๅݿ Ή͠Ζ͜ΜͳʹϥΠϒίʔσΟϯάͷൃද͕ଟ͍ΧϯϑΝϨϯ ε͍͠ؾ͕͢Δ 10
ͦͷதͰ 227 Data Delivery with Drag and Drop ͷTanu Singhal͞ΜͷϥΠϒίʔσΟϯάͷํ๏ʹײΛड
͚ͨͷͰհ͠·͢ 11
ख๏؆୯ 12
ίϝϯτʹ൪߸ΛৼͬͯίʔυεχϖοτͷγϣʔτΧοτʹಉ͡൪߸Λৼ͓͚ͬͯͩ͘ 13
Xcodeͷίʔυεχϖοτͷొํ ๏ 4 ͍͔ͭ͋͘Δ͕ઌʹίʔυΛॻ͍ͯίʔυεχϖοτͷ ॴʹυϥοά&υϩοϓ͕؆୯ 4 Completion shortcut Λઃఆ͢Εݺͼग़͠؆୯ 14
͓·͚ 15
CoreNFC 4 WWDCظؒதεέδϡʔϧʹະܝࡌ͕ͩηογϣϯಈը ͷΈެ։ 4 iOS 11͔Βղ์͞ΕͨಡΈऔΓͷػೳͷΈͷframework 4 ରԠܗࣜ: NDEF
4 λά1ʙ5ʹରԠ 4 ݱ࣌ͰiPhone 7ͱ7 PlusͷΈରԠ 16
ར༻ํ๏ 4 iTunes ConnectͰAppIDͷNFC Tag ReadingΛONʹ͢ Δ 17
ར༻ํ๏ 4 EntitlementsʹҎԼΛՃ <key>com.apple.developer.nfc.readersession.formats</key> <array> <string>NDEF</string> </array> 18
ར༻ํ๏ 4 Info.plistʹҎԼΛՃͯ͠ϢʔβʔʹڐՄΛಘΔ <key>NFCReaderUsageDescription</key> <string>Scan NFC tags message!</string> 19
ར༻ํ๏ import CoreNFC let session = NFCNDEFReaderSession(delegate: self, queue: nil,
invalidateAfterFirstRead: true) session.begin() 20
ར༻ํ๏ extension NFCViewController: NFCNDEFReaderSessionDelegate { func readerSession(_ session: NFCNDEFReaderSession, didDetectNDEFs
messages: [NFCNDEFMessage]) { messages.forEach { (message) in message.records.forEach { let payload: String = String(data: $0.payload, encoding: .utf8) ?? "" print("payload", payload) } } } func readerSession(_ session: NFCNDEFReaderSession, didInvalidateWithError error: Error) { print(error) } } 21
Recap 4 ϥΠϒίʔσΟϯάʹXcodeͷίʔυεχϖοτΛ׆༻ ! 4 ίϝϯτʹॱ൪Λهࡌͯ͠ίʔυεχϖοτͷγϣʔτ Χοτͱ߹ΘͤΔͱϛε͠ʹ͍͘" 4 ίϝϯτΛಡΉ͚ͩͰ؆୯ͳઆ໌͕ग़དྷΔ# 4
CoreNFCλάΛಡΉ͚ͩͳΒ؆୯$ 22
͜ΕͰϥΠϒίʔσΟϯάා͘ͳ͍! 23
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠! 24