Upgrade to Pro — share decks privately, control downloads, hide ads and more …

詳解 Core NFC - NFC を用いた iOS App 開発のてびき / Demysti...

詳解 Core NFC - NFC を用いた iOS App 開発のてびき / Demystify Core NFC - A guide to iOS App Dev using NFC

詳解 Core NFC - NFC を用いた iOS App 開発のてびき / Demystify Core NFC - A guide to iOS App Dev using NFC

iOSDC Japan 2022 
Day 1
2022/09/11 14:10〜 Track B レギュラートーク(40分)
https://fortee.jp/iosdc-japan-2022/proposal/40f51161-9c44-4330-ba92-e9aa407454c3

https://www.youtube.com/watch?v=RhLszeyR4h0

treastrain / Tanaka Ryoga

September 11, 2022
Tweet

More Decks by treastrain / Tanaka Ryoga

Other Decks in Technology

Transcript

  1. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. USFBTUSBJO5BOBLB3ZPHB

    ৄղ$PSF/'$ 1 /'$Λ༻͍ͨJ04"QQ։ൃͷͯͼ͖ iOSDC Japan 2022 Day 1 #iosdc #b
  2. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. "CPVUNF

    USFBTUSBJO5BOBLB3ZPHB 2 4XJGU J04 XBUDI04 $PSF/'$ 044 ɹɹJU`TNZNPUIFSUPOHVF ɹɹٱ͠ͿΓʹ+BWB4DSJQUʢ("4ʣΛॻ͍ͨΒTXJUDIจͷ ɹɹ֤DBTFઅʹCSFBLΛೖΕ๨Ε͍ͯ͢͜͝ͱʹͳͬͨ! ɹɹɹɹɹɹɹɹɹɹ!USFBTUSBJOɹɹIUUQTUSFUKQ   %F/"$P -UE ɹɹJ04"QQ%FWFMPQFSʢ"QSJM$VSSFOUʣ
  3. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 4

    /'$8JLJQFEJBIUUQTKBXJLJQFEJBPSHXJLJ/'$ɹ$$#:4"
  4. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 5

    /'$8JLJQFEJBIUUQTKBXJLJQFEJBPSHXJLJ/'$ɹ$$#:4"
  5. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 6

    /'$8JLJQFEJBIUUQTKBXJLJQFEJBPSHXJLJ/'$ɹ$$#:4"
  6. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 8

    "QQMFr88%$,FZOPUF:PV5VCFIUUQTXXXZPVUVCFDPNXBUDI WOK9H@//J$"
  7. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 9

    ೔ຊͰJ1IPOF΍"QQMF8BUDIͷ4VJDB΍1"4.0Λ࢖͏"QQMFαϙʔτ ೔ຊ IUUQTTVQQPSUBQQMFDPNKBKQ)5
  8. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ೖؗূɹɹަ௨ܥ*$ΧʔυɹɹύʔΩϯάϝʔλʔɹɹॅຽجຊ୆ாΧʔυ

    ϞόΠϧ΢ΥϨοτɹɹσϏοτΧʔυɹɹػثͷϖΞϦϯάɹɹϨδܾࡁ୺຤ ࣗಈंͷ伴ɹɹӡస໔ڐূɹɹϨϯλϧࣗసंɹɹΫϨδοτΧʔυɹɹ஫ࣹث ϋʔυ΢ΣΞηΩϡϦςΟτʔΫϯɹɹεϚʔτΧʔυɹɹ঎඼ɾࡏݿ؅ཧλά ϓϦϖΠυΧʔυɹɹిؾࣗಈंͷॆిεςʔγϣϯɹɹֶੜূɹɹࢦྠ ϗςϧͷϧʔϜΩʔɹɹεϚʔτϙελʔɹɹύεϙʔτɹɹλϒϨοτ εϚʔτ΢ΥονɹɹମԹܭɹɹࣾһূɹɹΠϠϗϯɹɹ"OESPJE#FBN εϚʔτϑΥϯɹɹࣗಈվࡳػɹɹݸਓ൪߸ʢϚΠφϯόʔʣΧʔυɹɹFUD 10
  9. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. /'$

    /FBS'JFME$PNNVOJDBUJPOʢۙڑ཭ແઢ௨৴ʣ w ʮϞϊͱϞϊΛ͚ۙͮͯ৘ใΛ΍ΓऔΓ͢ΔΞϨʯ w ඇ઀৮Ͱ৘ใΛ΍ΓऔΓͰ͖Δ 11
  10. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. /'$ͷʮͭͷϞʔυʯ

    13 Χʔυ ΤϛϡϨʔγϣϯ Ϧʔμʔɾ ϥΠλʔ ϐΞɾπʔɾϐΞ ϫΠϠϨεॆి /'$5FDIOPMPHZ/'$'PSVNIUUQTOGDGPSVNPSHMFBSOOGDUFDIOPMPHZΛݩʹ࡞੒
  11. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. Χʔυ

    ΤϛϡϨʔγϣϯ /'$ͷʮͭͷϞʔυʯ ΧʔυΤϛϡϨʔγϣϯϞʔυ 14 ηΩϡΞΤϨϝϯτํࣜΧʔυΤϛϡϨʔγϣϯ ϗετΧʔυΤϛϡϨʔγϣϯʢ)$&ʣ /'$5FDIOPMPHZ/'$'PSVNIUUQTOGDGPSVNPSHMFBSOOGDUFDIOPMPHZΛݩʹ࡞੒
  12. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. /'$ٕज़֓ཁ

    w 3'*%ͷҰछ w ൖૹ೾ɹɹɹ୹೾)'ଳʢ.)[ʣ w ௨৴ڑ཭ɹɹ໿DNʢ·ͨ͸DNఔ౓ʣ w ௨৴଎౓ɹɹLCQTʙLCQTɹɹLCQT·ͨ͸LCQT w ిྗ఻ૹɹɹ࠷େ8ʢϫΠϠϨεॆిϞʔυʣ 15 /'$5FDIOPMPHZ/'$'PSVNIUUQTOGDGPSVNPSHMFBSOOGDUFDIOPMPHZΛݩʹ࡞੒
  13. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. #MVFUPPUIWT/'$

    17 w #MVFUPPUI w ௨৴଎౓͕଎͍ w ௨৴Մೳͳ෺ཧతڑ཭͕௕͍ w /'$ w ࣄલͷϖΞϦϯά࡞ۀ͕ෆཁ w ௨৴࣌ͷফඅిྗ͕ང͔ʹগͳ͍ w গ͠ԕ͚͟Δͱ઀ଓ͕੾ΕΔ
  14. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 23ίʔυɾόʔίʔυWT/'$

    18 w 23ίʔυɾόʔίʔυ w ҹ࡮͢Δ͚ͩͰ࢖͑Δ w ΧϝϥͷͨΊͷௐ੔͕ඞཁ w ϐϯτɾ໌Δ͞ɾःṭ෺ͷআڈ w ҹ࡮෺ͷσβΠϯΛ્֐ w /'$ w ͚ۙͮΕ͹௨৴Ͱ͖Δ w ؒʹଟগͷ΋ͷ͕ࡏͬͯ΋Α͍ w ৘ใͷมߋ͕Մೳ w ௨৴ͷͨΊͷ෦඼ ʢίΠϧɾΞϯςφʣ͕ඞཁ
  15. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. J04"QQʹ͓͚Δ/'$͕࢖ΘΕ͍ͯΔ৔໘

    w "QQMF1BZʢίϯλΫτϨεܾࡁʣ w 8BMMFUʹ௥Ճͨ͠ंͷ伴΍ϗςϧͷ෦԰ͷ伴Λ࢖͏ w "QQ$MJQίʔυ w F,:$ɾຊਓ֬ೝ w ిࢠϚωʔʢ෺ཧΧʔυʣͷ࢒ߴɾར༻ཤྺΛ֬ೝ 19
  16. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. /FBS'JFME$PNNVOJDBUJPO

    ۙڑ཭ແઢ௨৴ 20  ࣗ෼͕͜ΕΛ࢖ͬͯ ։ൃ͢Δ͜ͱ͸ແ͍ʜʜʁ
  17. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. /FBS'JFME$PNNVOJDBUJPO

    ۙڑ཭ແઢ௨৴ 20  ࣗ෼͕͜ΕΛ࢖ͬͯ ։ൃ͢Δ͜ͱ͸ແ͍ʜʜʁ ΋͍ͬͨͳ͍ʂ
  18. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. /'$Λ࢖ͬͯԿ͔࡞Ζ͏ʂ

    w ʢ/'$ͷͨΊ͚ͩͷ෦඼ʢΞϯςφͳͲʣ͕ೖ͍ͬͯΔඞཁ͕͋ΔͷͰʣ ίετ͕͔͔Δ w ࠓ͜͜ʹ͍ΔΈͳ͞Μ͕ ͍࣋ͬͯΔJ1IPOFͷ΄΅શͯʹ౥ࡌࡁΈʢͷ͸ͣʣ w ௨৴૬खͱͳΔΧʔυɾλάྨ΋ຕ͸͓ࡒ෍ʹೖ͍ͬͯΔʢ͸ͣʜʜʂʣ w ௥Ճίετ͸͔͔Βͳ͍ʂ w ࣗ෼͕͍࣋ͬͯΔϞϊͷத਎Λ೷͍ͯΈͨ͋͘Γ·ͤΜ͔ʁ 21
  19. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. /'$͸ࠃࡍن֨ͰΦʔϓϯ

    w *40*&$ʢ/'$*1ʣ w *40*&$ʢ/'$*1ʣ ɹʹɹ/'$*1ɹʴɹ*40*&$ɹʴɹ*40*&$ 22
  20. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 23

    ιχʔגࣜձࣾc'FMJ$Bc/'$ʹ͍ͭͯc/'$ͱ'FMJ$Bͷؔ܎IUUQTXXXTPOZDPKQ1SPEVDUTGFMJDB/'$SFMBUJPOIUNM
  21. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 24

    ιχʔגࣜձࣾc'FMJ$Bc/'$ʹ͍ͭͯc/'$ͱ'FMJ$Bͷؔ܎IUUQTXXXTPOZDPKQ1SPEVDUTGFMJDB/'$SFMBUJPOIUNM
  22. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ιχʔגࣜձࣾc'FMJ$Bc/'$ʹ͍ͭͯc/'$ͱ'FMJ$Bͷؔ܎

    IUUQTXXXTPOZDPKQ1SPEVDUTGFMJDB/'$SFMBUJPOIUNM ҉߸ԽΛඞཁͱ͠ͳ͍ΦʔϓϯίϚϯυΛ༻͍ͨΞϓϦ έʔγϣϯͷ৔߹ʹ͸ɺެ։͞Ε͍ͯΔن͚֨ͩͰ։ൃ ͢Δ͜ͱ͕Ͱ͖·͢ɻ(PPHMFࣾͷ"OESPJE΍Ξοϓϧ ࣾͷJ04ͳͲεϚʔτϑΥϯ޲͚04͕/'$ͷػೳΛα ϙʔτ͓ͯ͠ΓɺҰൠͷํ͕։ൃ͞ΕͨిࢠϚωʔͷϏ ϡʔϫʔͳͲ΋ؚΊɺεϚʔτϑΥϯ޲͚ʹ͢Ͱʹ͍͘ ͔ͭͷ/'$ΞϓϦέʔγϣϯ͕ެ։͞Ε͍ͯ·͢ɻ 25
  23. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ιχʔגࣜձࣾc'FMJ$Bc/'$ʹ͍ͭͯc/'$ͱ'FMJ$Bͷؔ܎

    IUUQTXXXTPOZDPKQ1SPEVDUTGFMJDB/'$SFMBUJPOIUNM ҉߸ԽΛඞཁͱ͠ͳ͍ΦʔϓϯίϚϯυΛ༻͍ͨΞϓϦ έʔγϣϯͷ৔߹ʹ͸ɺެ։͞Ε͍ͯΔن͚֨ͩͰ։ൃ ͢Δ͜ͱ͕Ͱ͖·͢ɻ(PPHMFࣾͷ"OESPJE΍Ξοϓϧ ࣾͷJ04ͳͲεϚʔτϑΥϯ޲͚04͕/'$ͷػೳΛα ϙʔτ͓ͯ͠ΓɺҰൠͷํ͕։ൃ͞ΕͨిࢠϚωʔͷϏ ϡʔϫʔͳͲ΋ؚΊɺεϚʔτϑΥϯ޲͚ʹ͢Ͱʹ͍͘ ͔ͭͷ/'$ΞϓϦέʔγϣϯ͕ެ։͞Ε͍ͯ·͢ɻ 26
  24. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ιχʔגࣜձࣾc'FMJ$Bc/'$ʹ͍ͭͯc/'$ͱ'FMJ$Bͷؔ܎

    IUUQTXXXTPOZDPKQ1SPEVDUTGFMJDB/'$SFMBUJPOIUNM ҉߸ԽΛඞཁͱ͠ͳ͍ΦʔϓϯίϚϯυΛ༻͍ͨΞϓϦ έʔγϣϯͷ৔߹ʹ͸ɺެ։͞Ε͍ͯΔن͚֨ͩͰ։ൃ ͢Δ͜ͱ͕Ͱ͖·͢ɻ(PPHMFࣾͷ"OESPJE΍Ξοϓϧ ࣾͷJ04ͳͲεϚʔτϑΥϯ޲͚04͕/'$ͷػೳΛα ϙʔτ͓ͯ͠ΓɺҰൠͷํ͕։ൃ͞ΕͨిࢠϚωʔͷϏ ϡʔϫʔͳͲ΋ؚΊɺεϚʔτϑΥϯ޲͚ʹ͢Ͱʹ͍͘ ͔ͭͷ/'$ΞϓϦέʔγϣϯ͕ެ։͞Ε͍ͯ·͢ɻ 27
  25. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 34

    $PSF/'$c"QQMF%FWFMPQFS%PDVNFOUBUJPOIUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPODPSFOGD
  26. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 35

    $PSF/'$c"QQMF%FWFMPQFS%PDVNFOUBUJPOIUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPODPSFOGD
  27. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. $PSF/'$ͷର৅

    w $PSF/'$Λ࢖͑Δͷ͸J04Ҏ߱ w NBD04ɾUW04ɾXBUDI04Ͱ͸࢖༻Ͱ͖ͳ͍ w J04Ҏ͔߱ͭ/'$ΞϯςφΛੵΜͩJ1IPOFͷΈ 36
  28. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. /'$ΞϯςφΛ౥ࡌͨ͠J1IPOF

    w J1IPOFɾ1MVT w J1IPOFTɾT1MVT w J1IPOFɾ1MVT w J1IPOFɾ1MVT w J1IPOF9 w J1IPOF9㸑ɾ9Tɾ9T.BY 37 w J1IPOFɾ1SPɾ1SP.BY w J1IPOF4&ʢୈੈ୅ʣ w J1IPOFNJOJɾɾ1SPɾ1SP.BY w J1IPOFNJOJɾɾ1SPɾ1SP.BY w J1IPOF4&ʢୈੈ୅ʣ w J1IPOFɾ1MVTɾ1SPɾ1SP.BY
  29. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. $PSF/'$ͷػೳΛ࢖͑ΔJ1IPOF

    w J1IPOFɾ1MVT w J1IPOFTɾT1MVT w J1IPOFɾ1MVT w J1IPOFɾ1MVT w J1IPOF9 w J1IPOF9㸑ɾ9Tɾ9T.BY 39 w J1IPOFɾ1SPɾ1SP.BY w J1IPOF4&ʢୈੈ୅ʣ w J1IPOFNJOJɾɾ1SPɾ1SP.BY w J1IPOFNJOJɾɾ1SPɾ1SP.BY w J1IPOF4&ʢୈੈ୅ʣ w J1IPOFɾ1MVTɾ1SPɾ1SP.BY
  30. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 40

    σόΠεػೳͷཁ݅αϙʔτ"QQMF%FWFMPQFSIUUQTEFWFMPQFSBQQMFDPNKQTVQQPSUSFRVJSFEEFWJDFDBQBCJMJUJFT
  31. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. /'$Λ༻͍ͨ

    "QQMFϓϥοτϑΥʔϜͷ"QQͷ։ൃ J1IPOFҎ߱ରԠͷJ04"QQ։ൃ 41
  32. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. /'$ͷʮͭͷϞʔυʯ

    44 Χʔυ ΤϛϡϨʔγϣϯ Ϧʔμʔɾ ϥΠλʔ ϐΞɾπʔɾϐΞ ϫΠϠϨεॆి /'$5FDIOPMPHZ/'$'PSVNIUUQTOGDGPSVNPSHMFBSOOGDUFDIOPMPHZΛݩʹ࡞੒
  33. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. /'$ͷʮͭͷϞʔυʯͱϑϨʔϜϫʔΫ

    45 Χʔυ ΤϛϡϨʔγϣϯ Ϧʔμʔɾ ϥΠλʔ ϐΞɾπʔɾϐΞ ϫΠϠϨεॆి $PSF/'$ 1SPYJNJUZ3FBEFS 1BTT,JU 8BMMFU ͳ͠ ͳ͠
  34. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. /'$ͷʮͭͷϞʔυʯͱϑϨʔϜϫʔΫ

    45 Χʔυ ΤϛϡϨʔγϣϯ Ϧʔμʔɾ ϥΠλʔ ϐΞɾπʔɾϐΞ ϫΠϠϨεॆి $PSF/'$ 1SPYJNJUZ3FBEFS 1BTT,JU 8BMMFU ͳ͠ ͳ͠
  35. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 46

    $PSF/'$c"QQMF%FWFMPQFS%PDVNFOUBUJPOIUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPODPSFOGD
  36. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. $PSF/'$ͰͰ͖Δ͜ͱ

    w /'$λά͔Β/%&'ͷσʔλΛಡΈऔΔʢJ04 ʣ w "QQ͕όοΫάϥ΢ϯυঢ়ଶͰ/'$λά͔Β/%&'ͷσʔλΛಡΈऔΔ ʢJ04 ɺͨͩ͠J1IPOFɾ1MVTɾɾ1MVTɾ9͸ඇରԠʣ w /'$λά΁/%&'ͷσʔλΛॻ͖ࠐΉʢJ04 ʣ w /'$λάʹಠࣗϑΥʔϚοτͷσʔλΛಡΈॻ͖͢ΔʢJ04 ʣ w 1"$&ʢ伴ڞ༗ར༻ΞΫηε੍ޚʣΛαϙʔτ͍ͯ͠Δλάͷݕग़ʢJ04 ʣ 47
  37. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. $PSF/'$ͰͰ͖ͳ͍͜ͱ

    48 Χʔυ ΤϛϡϨʔγϣϯ Ϧʔμʔɾ ϥΠλʔ $PSF/'$ 1SPYJNJUZ3FBEFS 1BTT,JU 8BMMFU w Χʔυͷʮ;ΓʯΛ͢Δʢ1BTT,JUʣ w 8BMMFUɾ"QQMF1BZͷಛݖ w ʢΧʔυΛ͔ͯ͟͠ʣࢧ෷͍Λ ड͚෇͚Δʢ1SPYJNJUZ3FBEFSʣ w l5BQUP1BZzͰ͔͠࢖͑ͳ͍
  38. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. औΓѻ͏/'$λά

    50 /'$λάͷதͷσʔλܗࣜΛ ࣗ෼ͰܾΊΔ /'$λάͷதͷσʔλܗࣜ͸ طʹܾΊΒΕ͍ͯΔ
  39. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ࣄલʹܾΊ͓ͯ͘͜ͱ

    /'$λάͷதͷσʔλܗࣜΛࣗ෼ͰܾΊΒΕΔ৔߹ w σʔλܗࣜ͸ʮ/%&'ʯ͕͓͢͢Ί w /%&'ʢ/'$%BUB&YDIBOHF'PSNBUʣ w /'$'PSVN͕ࡦఆ w J04ɾ$PSF/'$Ͱ͸/%&'͸ಛผ଴۰ w "QQ͕ϑΥΞάϥ΢ϯυঢ়ଶ͡Όͳͯ͘΋ಡΈऔΕΔ 51
  40. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ࣄલʹܾΊ͓ͯ͘͜ͱ

    /'$λάͷதͷσʔλܗࣜΛࣗ෼ͰܾΊΒΕΔ৔߹ w /'$λάͷʮछྨʯʢҰ෦ʣ w 5ZQF5BHʢ*40*&$ɹ.*'"3&6MUSBMJHIUʣ w 5ZQF5BHʢ*40*&$ɹ+*49ɹ'FMJ$Bʣ w 5ZQF5BHʢ*40*&$ɹ%&4'JSFʣ w 5ZQF5BHʢ*40*&$ʣ 52 /'$5FDIOPMPHZIUUQTOGDGPSVNPSHMFBSOOGDUFDIOPMPHZ
  41. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ࣄલʹௐ͓ࠪͯ͘͜͠ͱ

    /'$λάͷதͷσʔλܗ͕ࣜطʹܾ·͍ͬͯΔ৔߹ w όΠφϦܗࣜʢData΍[Data]ʣͰ৘ใΛ΍ΓऔΓ͢Δ ʢύʔε΋ࣗ෼Ͱߦ͏ʣ w ༻͍Δ͜ͱʹͳΔʮ௨৴ٕज़ʢϓϩτίϧʣʯ͸Կ͔ʁ 53
  42. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ࣄલʹௐ͓ࠪͯ͘͜͠ͱ

    /'$λάͷதͷσʔλܗ͕ࣜطʹܾ·͍ͬͯΔ৔߹ w ௨৴ٕज़ʢϓϩτίϧʣ w /'$"ʢ*40*&$ʣ w /'$#ʢ*40*&$ʣ w /'$'ʢ*40*&$ʣ w /'$7ʢ*40*&$ʣ 54
  43. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 55

    "QQMFr4FQUFNCFS&WFOU:PV5VCFIUUQTXXXZPVUVCFDPNXBUDI W/4UYV@,[M
  44. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 56

    "QQMFr4FQUFNCFS&WFOU:PV5VCFIUUQTXXXZPVUVCFDPNXBUDI W/4UYV@,[M
  45. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 57

    "QQMFr4FQUFNCFS&WFOU:PV5VCFIUUQTXXXZPVUVCFDPNXBUDI W/4UYV@,[M
  46. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 58

    "QQMFr4FQUFNCFS&WFOU:PV5VCFIUUQTXXXZPVUVCFDPNXBUDI W/4UYV@,[M
  47. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 60

    ೥݄೔ࡱӨ ૯຿লࢦఆ.*$,4
  48. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 61

    4VJDB΍1"4.0Λ"QQMF΢ΥϨοτʹ௥Ճ͢Δ"QQMFαϙʔτ ೔ຊ IUUQTTVQQPSUBQQMFDPNKBKQ)5
  49. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 62

    4VJDB΍1"4.0Λ"QQMF΢ΥϨοτʹ௥Ճ͢Δ"QQMFαϙʔτ ೔ຊ IUUQTTVQQPSUBQQMFDPNKBKQ)5 J1IPOFͷ/'$͸୺຤ͷ্ଆʂ എ໘ͷ"QQMFϩΰͷ෦෼Ͱ͸͋Γ·ͤΜ
  50. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ࣮૷ͷྲྀΕ

    w εΩϟϯͷͨΊͷηογϣϯΛ࡞Δ w ηογϣϯΛ։࢝͢Δ ʢJ04ଆͰΞΫγϣϯγʔτ͕දࣔ͞ΕΔʣ w λάͷݕ஌ΛσϦήʔτͰड͚औΔ w ಡΈॻ͖Λߦ͏ w ηογϣϯΛऴྃ͢Δ 68
  51. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. εΩϟϯͷͨΊͷηογϣϯΛ࡞Δ

    w NFCNDEFReaderSession w NFCTagReaderSession w NFCVASReaderSession 69
  52. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. εΩϟϯͷͨΊͷηογϣϯΛ࡞Δ

    w NFCNDEFReaderSession w NFCTagReaderSession w NFCVASReaderSession 70
  53. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ηογϣϯΛ࡞Δ

    /%&'ܗࣜͷ৔߹ 71 import CoreNFC class MyNDEFReaderWriter { var session: NFCNDEFReaderSession? func beginScanning() { guard NFCNDEFReaderSession.readingAvailable else { return } } }
  54. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ηογϣϯΛ࡞Δ

    /%&'ܗࣜͷ৔߹ 72 import CoreNFC class MyNDEFReaderWriter { var session: NFCNDEFReaderSession? func beginScanning() { guard NFCNDEFReaderSession.readingAvailable else { return } session = NFCNDEFReaderSession( delegate: self, queue: nil, invalidateAfterFirstRead: false ) } }
  55. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ηογϣϯΛ࡞Δ

    /%&'ܗࣜͷ৔߹ 73 import CoreNFC class MyNDEFReaderWriter { var session: NFCNDEFReaderSession? func beginScanning() { guard NFCNDEFReaderSession.readingAvailable else { return } session = NFCNDEFReaderSession( delegate: self, queue: nil, invalidateAfterFirstRead: false ) session?.alertMessage = "Place the tag on a flat surface (avoid metallic surfaces) and rest you iPhone on the tag.” } }
  56. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ηογϣϯΛ࡞Δ

    /%&'ܗࣜͷ৔߹ 74 import CoreNFC class MyNDEFReaderWriter { var session: NFCNDEFReaderSession? func beginScanning() { guard NFCNDEFReaderSession.readingAvailable else { return } session = NFCNDEFReaderSession( delegate: self, queue: nil, invalidateAfterFirstRead: false ) session?.alertMessage = "Place the tag on a flat surface (avoid metallic surfaces) and rest you iPhone on the tag." session?.begin() } }
  57. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͷ৔߹ 75 extension MyNDEFReaderWriter: NFCNDEFReaderSessionDelegate { func readerSession(_ session: NFCNDEFReaderSession, didDetectNDEFs messages: [NFCNDEFMessage]) { // ... } func readerSession(_ session: NFCNDEFReaderSession, didDetect tags: [NFCNDEFTag]) { // ... } }
  58. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͷ৔߹ 76 extension MyNDEFReaderWriter: NFCNDEFReaderSessionDelegate { func readerSession(_ session: NFCNDEFReaderSession, didDetectNDEFs messages: [NFCNDEFMessage]) { let message = messages.first! // print(message.records) } func readerSession(_ session: NFCNDEFReaderSession, didDetect tags: [NFCNDEFTag]) { // ... } }
  59. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͷ৔߹ 77 extension MyNDEFReaderWriter: NFCNDEFReaderSessionDelegate { func readerSession(_ session: NFCNDEFReaderSession, didDetectNDEFs messages: [NFCNDEFMessage]) { let message = messages.first! // print(message.records) } func readerSession(_ session: NFCNDEFReaderSession, didDetect tags: [NFCNDEFTag]) { // ... } }
  60. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͷ৔߹ 78 extension MyNDEFReaderWriter: NFCNDEFReaderSessionDelegate { func readerSession(_ session: NFCNDEFReaderSession, didDetect tags: [NFCNDEFTag]) { Task { let tag = tags.first! try await session.connect(to: tag) // ಡΈऔΓ let message = try await tag.readNDEF() // print(message.records) // ॻ͖ࠐΈ let ndefMessage: NFCNDEFMessage = // .. try await tag.writeNDEF(ndefMessage) // ऴΘͬͨΒ session.alertMessage = "Done!" session.invalidate() // ࣦഊͨ͠Β // session.invalidate(errorMessage: "Error!") } } }
  61. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͷ৔߹ 79 extension MyNDEFReaderWriter: NFCNDEFReaderSessionDelegate { func readerSession(_ session: NFCNDEFReaderSession, didDetect tags: [NFCNDEFTag]) { Task { let tag = tags.first! try await session.connect(to: tag) // ಡΈऔΓ let message = try await tag.readNDEF() // print(message.records) // ॻ͖ࠐΈ let ndefMessage: NFCNDEFMessage = // .. try await tag.writeNDEF(ndefMessage) // ऴΘͬͨΒ session.alertMessage = "Done!" session.invalidate() // ࣦഊͨ͠Β // session.invalidate(errorMessage: "Error!") } } }
  62. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͷ৔߹ 80 extension MyNDEFReaderWriter: NFCNDEFReaderSessionDelegate { func readerSession(_ session: NFCNDEFReaderSession, didDetect tags: [NFCNDEFTag]) { Task { let tag = tags.first! try await session.connect(to: tag) // ಡΈऔΓ let message = try await tag.readNDEF() // print(message.records) // ॻ͖ࠐΈ let ndefMessage: NFCNDEFMessage = // .. try await tag.writeNDEF(ndefMessage) // ऴΘͬͨΒ session.alertMessage = "Done!" session.invalidate() // ࣦഊͨ͠Β // session.invalidate(errorMessage: "Error!") } } }
  63. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. εΩϟϯͷͨΊͷηογϣϯΛ࡞Δ

    w NFCNDEFReaderSession w NFCTagReaderSession w NFCVASReaderSession 81
  64. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ηογϣϯΛ࡞Δ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ 82 import CoreNFC class MyTagReaderWriter: NSObject { var session: NFCTagReaderSession? func beginScanning() { guard NFCTagReaderSession.readingAvailable else { return } let pollingOption: NFCTagReaderSession.PollingOption = [ .iso14443, // Type 2 Tag, Type 4 Tag (ISO/IEC 14443) (MIFARE) …etc. .iso18092, // Type 3 Tag (ISO/IEC 18092, JIS X 6319-4) (FeliCa) .iso15693, // Type 5 Tag (ISO/IEC 15693) ] session = NFCTagReaderSession(pollingOption: pollingOption, delegate: self, queue: nil) session?.alertMessage = "Place the tag on a flat surface (avoid metallic surfaces) and rest you iPhone on the tag." session?.begin() } }
  65. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ηογϣϯΛ࡞Δ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ 83 import CoreNFC class MyTagReaderWriter: NSObject { var session: NFCTagReaderSession? func beginScanning() { guard NFCTagReaderSession.readingAvailable else { return } let pollingOption: NFCTagReaderSession.PollingOption = [ .iso14443, // Type 2 Tag, Type 4 Tag (ISO/IEC 14443) (MIFARE) ...etc. .iso18092, // Type 3 Tag (ISO/IEC 18092, JIS X 6319-4) (FeliCa) .iso15693, // Type 5 Tag (ISO/IEC 15693) ] session = NFCTagReaderSession(pollingOption: pollingOption, delegate: self, queue: nil) session?.alertMessage = "Place the tag on a flat surface (avoid metallic surfaces) and rest you iPhone on the tag." session?.begin() } }
  66. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ηογϣϯΛ࡞Δ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ 84 import CoreNFC class MyTagReaderWriter: NSObject { var session: NFCTagReaderSession? func beginScanning() { guard NFCTagReaderSession.readingAvailable else { return } let pollingOption: NFCTagReaderSession.PollingOption = [ .iso14443, // Type 2 Tag, Type 4 Tag (ISO/IEC 14443) (MIFARE) ...etc. .iso18092, // Type 3 Tag (ISO/IEC 18092, JIS X 6319-4) (FeliCa) .iso15693, // Type 5 Tag (ISO/IEC 15693) ] session = NFCTagReaderSession(pollingOption: pollingOption, delegate: self, queue: nil) session?.alertMessage = "Place the tag on a flat surface (avoid metallic surfaces) and rest you iPhone on the tag." session?.begin() } }
  67. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ηογϣϯΛ࡞Δ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ 85 import CoreNFC class MyTagReaderWriter: NSObject { var session: NFCTagReaderSession? func beginScanning() { guard NFCTagReaderSession.readingAvailable else { return } let pollingOption: NFCTagReaderSession.PollingOption = [ .iso14443, // Type 2 Tag, Type 4 Tag (ISO/IEC 14443) (MIFARE) ...etc. .iso18092, // Type 3 Tag (ISO/IEC 18092, JIS X 6319-4) (FeliCa) .iso15693, // Type 5 Tag (ISO/IEC 15693) ] session = NFCTagReaderSession(pollingOption: pollingOption, delegate: self, queue: nil) session?.alertMessage = "Place the tag on a flat surface (avoid metallic surfaces) and rest you iPhone on the tag." session?.begin() } }
  68. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ 86 extension MyTagReaderWriter: NFCTagReaderSessionDelegate { func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { Task { let tag = tags.first! // ... } } // ... }
  69. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ 87 extension MyTagReaderWriter: NFCTagReaderSessionDelegate { func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { Task { let tag = tags.first! try await session.connect(to: tag) // ... } } // ... }
  70. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ 88 extension MyTagReaderWriter: NFCTagReaderSessionDelegate { func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { Task { let tag = tags.first! try await session.connect(to: tag) switch tag { case .feliCa(let feliCaTag): // Type 3 Tag (FeliCa) try await tagReader(session: session, didConnect: feliCaTag) case .iso7816(let iso7816Tag): // ISO/IEC 7816 ʹରԠͨ͠ Type 2 TagɺType 4 Tag ͳͲ try await tagReader(session: session, didConnect: iso7816Tag) case .iso15693(let iso15693Tag): // Type 5 Tag try await tagReader(session: session, didConnect: iso15693Tag) case .miFare(let miFareTag): // Type 2 TagɺType 4 Tag (MIFARE) try await tagReader(session: session, didConnect: miFareTag) } } } // ... }
  71. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ 89 extension MyTagReaderWriter: NFCTagReaderSessionDelegate { func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { Task { let tag = tags.first! try await session.connect(to: tag) switch tag { case .feliCa(let feliCaTag): // Type 3 Tag (FeliCa) try await tagReader(session: session, didConnect: feliCaTag) case .iso7816(let iso7816Tag): // ISO/IEC 7816 ʹରԠͨ͠ Type 2 TagɺType 4 Tag ͳͲ try await tagReader(session: session, didConnect: iso7816Tag) case .iso15693(let iso15693Tag): // Type 5 Tag try await tagReader(session: session, didConnect: iso15693Tag) case .miFare(let miFareTag): // Type 2 TagɺType 4 Tag (MIFARE) try await tagReader(session: session, didConnect: miFareTag) } } } // ... }
  72. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 'FMJ$B

    w ೔ຊ w ަ௨ܥ*$Χʔυ w ͓ళͰ࢖͑ΔిࢠϚωʔ w ߳ߓɾΠϯυωγΞͳͲΞδΞݍͰ࢖ΘΕ͍ͯΔ 90 ιχʔגࣜձࣾc'FMJ$Bc๏ਓͷ͓٬༷cಋೖࣄྫIUUQTXXXTPOZDPKQ1SPEVDUTGFMJDBCVTJOFTTDBTFTUVEZ
  73. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 'FMJ$B

    w ෳ਺ͷʮγεςϜʯΛ࣋ͭ͜ͱ͕Ͱ͖Δ w ຕͷ෺ཧλάͷதʹෳ਺ͷػೳΛ࣋ͯΔ w γεςϜΛ۠ผ͢ΔͨΊͷʮγεςϜίʔυʯ 91
  74. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 'FMJ$Bͷதͷσʔλߏ଄

    ͬ͘͟Γͱͨ͠Πϝʔδ 92 'FMJ$BΤϦΞͳͲͷ֓೦Λলུ w γεςϜίʔυ αʔϏείʔυ ϒϩοΫ w γεςϜίʔυΛબ୒ʢ1PMMJOHʣ͠ɺ αʔϏεΛ༻͍ͯϒϩοΫʹΞΫηε w ϒϩοΫ͋ͨΓόΠτ w Y'$ʢγεςϜίʔυʣ w YʢαʔϏείʔυʣ w YʢϒϩοΫʣ w YʢϒϩοΫʣ w YʢαʔϏείʔυʣ w YʢϒϩοΫʣ w YʢϒϩοΫʣ w ộ
  75. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 'FMJ$BγεςϜίʔυΛ*OGPQMJTUʹྻڍ

    w J04"QQͰ࢖͏'FMJ$BγεςϜίʔυΛ*OGPQMJTUʹྻڍ͓ͯ͘͠ w ϫΠϧυΧʔυʢ͢΂ͯͷ'FMJ$BγεςϜίʔυΛ࢖͏ʣ͸ෆՄ 93
  76. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ 95 extension MyTagReaderWriter: NFCTagReaderSessionDelegate { func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { Task { let tag = tags.first! try await session.connect(to: tag) switch tag { case .feliCa(let feliCaTag): // Type 3 Tag (FeliCa) try await tagReader(session: session, didConnect: feliCaTag) case .iso7816(let iso7816Tag): // ISO/IEC 7816 ʹରԠͨ͠ Type 2 TagɺType 4 Tag ͳͲ try await tagReader(session: session, didConnect: iso7816Tag) case .iso15693(let iso15693Tag): // Type 5 Tag try await tagReader(session: session, didConnect: iso15693Tag) case .miFare(let miFareTag): // Type 2 TagɺType 4 Tag (MIFARE) try await tagReader(session: session, didConnect: miFareTag) } } } // ... }
  77. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ 95 extension MyTagReaderWriter: NFCTagReaderSessionDelegate { func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { Task { let tag = tags.first! try await session.connect(to: tag) switch tag { case .feliCa(let feliCaTag): // Type 3 Tag (FeliCa) try await tagReader(session: session, didConnect: feliCaTag) case .iso7816(let iso7816Tag): // ISO/IEC 7816 ʹରԠͨ͠ Type 2 TagɺType 4 Tag ͳͲ try await tagReader(session: session, didConnect: iso7816Tag) case .iso15693(let iso15693Tag): // Type 5 Tag try await tagReader(session: session, didConnect: iso15693Tag) case .miFare(let miFareTag): // Type 2 TagɺType 4 Tag (MIFARE) try await tagReader(session: session, didConnect: miFareTag) } } } // ... } *OGPQMJTUʹॻ͍ͨ γεςϜίʔυ  Y"""" Y#### 'FMJ$Bλά͕͍࣋ͬͯΔ γεςϜίʔυ  Y%%%% Y&&&&
  78. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ 95 extension MyTagReaderWriter: NFCTagReaderSessionDelegate { func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { Task { let tag = tags.first! try await session.connect(to: tag) switch tag { case .feliCa(let feliCaTag): // Type 3 Tag (FeliCa) try await tagReader(session: session, didConnect: feliCaTag) case .iso7816(let iso7816Tag): // ISO/IEC 7816 ʹରԠͨ͠ Type 2 TagɺType 4 Tag ͳͲ try await tagReader(session: session, didConnect: iso7816Tag) case .iso15693(let iso15693Tag): // Type 5 Tag try await tagReader(session: session, didConnect: iso15693Tag) case .miFare(let miFareTag): // Type 2 TagɺType 4 Tag (MIFARE) try await tagReader(session: session, didConnect: miFareTag) } } } // ... } *OGPQMJTUʹॻ͍ͨ γεςϜίʔυ  Y"""" Y#### 'FMJ$Bλά͕͍࣋ͬͯΔ γεςϜίʔυ  Y%%%% Y&&&& $PSF/'$ͷ ͲͷσϦήʔτϝιου΋ ݺ͹Εͳ͍
  79. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ʢ'FMJ$Bʣ 96 extension MyTagReaderWriter { func tagReader(session: NFCTagReaderSession, didConnect feliCaTag: NFCFeliCaTag) async throws { let mode = try await feliCaTag.requestResponse() // ... session.alertMessage = "Done!" session.invalidate() } }
  80. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ 97 extension MyTagReaderWriter: NFCTagReaderSessionDelegate { func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { Task { let tag = tags.first! try await session.connect(to: tag) switch tag { case .feliCa(let feliCaTag): // Type 3 Tag (FeliCa) try await tagReader(session: session, didConnect: feliCaTag) case .iso7816(let iso7816Tag): // ISO/IEC 7816 ʹରԠͨ͠ Type 2 TagɺType 4 Tag ͳͲ try await tagReader(session: session, didConnect: iso7816Tag) case .iso15693(let iso15693Tag): // Type 5 Tag try await tagReader(session: session, didConnect: iso15693Tag) case .miFare(let miFareTag): // Type 2 TagɺType 4 Tag (MIFARE) try await tagReader(session: session, didConnect: miFareTag) } } } // ... }
  81. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. *40*&$

    w ΫϨδοτΧʔυ w ύεϙʔτɾ਎෼ূ໌ূ 98
  82. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. *40*&$

    w "QQMJDBUJPO1SPUPDPM%BUB6OJUʢ"1%6ʣ w λά্ͷΞϓϦέʔγϣϯͷࣝผࢠɹ"*% w J04"QQͰ࢖͏"*%Λ*OGPQMJTUʹྻڍ͓ͯ͘͠ 99
  83. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ 101 extension MyTagReaderWriter: NFCTagReaderSessionDelegate { func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { Task { let tag = tags.first! try await session.connect(to: tag) switch tag { case .feliCa(let feliCaTag): // Type 3 Tag (FeliCa) try await tagReader(session: session, didConnect: feliCaTag) case .iso7816(let iso7816Tag): // ISO/IEC 7816 ʹରԠͨ͠ Type 2 TagɺType 4 Tag ͳͲ try await tagReader(session: session, didConnect: iso7816Tag) case .iso15693(let iso15693Tag): // Type 5 Tag try await tagReader(session: session, didConnect: iso15693Tag) case .miFare(let miFareTag): // Type 2 TagɺType 4 Tag (MIFARE) try await tagReader(session: session, didConnect: miFareTag) } } } // ... }
  84. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ 101 extension MyTagReaderWriter: NFCTagReaderSessionDelegate { func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { Task { let tag = tags.first! try await session.connect(to: tag) switch tag { case .feliCa(let feliCaTag): // Type 3 Tag (FeliCa) try await tagReader(session: session, didConnect: feliCaTag) case .iso7816(let iso7816Tag): // ISO/IEC 7816 ʹରԠͨ͠ Type 2 TagɺType 4 Tag ͳͲ try await tagReader(session: session, didConnect: iso7816Tag) case .iso15693(let iso15693Tag): // Type 5 Tag try await tagReader(session: session, didConnect: iso15693Tag) case .miFare(let miFareTag): // Type 2 TagɺType 4 Tag (MIFARE) try await tagReader(session: session, didConnect: miFareTag) } } } // ... } *OGPQMJTUʹॻ͍ͨ "*%  % /'$λά͕͍࣋ͬͯΔ "*%  %
  85. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ 101 extension MyTagReaderWriter: NFCTagReaderSessionDelegate { func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { Task { let tag = tags.first! try await session.connect(to: tag) switch tag { case .feliCa(let feliCaTag): // Type 3 Tag (FeliCa) try await tagReader(session: session, didConnect: feliCaTag) case .iso7816(let iso7816Tag): // ISO/IEC 7816 ʹରԠͨ͠ Type 2 TagɺType 4 Tag ͳͲ try await tagReader(session: session, didConnect: iso7816Tag) case .iso15693(let iso15693Tag): // Type 5 Tag try await tagReader(session: session, didConnect: iso15693Tag) case .miFare(let miFareTag): // Type 2 TagɺType 4 Tag (MIFARE) try await tagReader(session: session, didConnect: miFareTag) } } } // ... } *OGPQMJTUʹॻ͍ͨ "*%  % /'$λά͕͍࣋ͬͯΔ "*%  % $PSF/'$ͷ ͲͷσϦήʔτϝιου΋ ݺ͹Εͳ͍
  86. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ʢ*40ʣ 102 extension MyTagReaderWriter { func tagReader(session: NFCTagReaderSession, didConnect iso7816Tag: NFCISO7816Tag) async throws { let apdu = NFCISO7816APDU(instructionClass: 0x00, instructionCode: 0xB0, p1Parameter: 0x00, p2Parameter: 0x00, data: Data(), expectedResponseLength: 16) let (response, sw1, sw2) = try await iso7816Tag.sendCommand(apdu: apdu) // ... session.alertMessage = “Done!" session.invalidate() } }
  87. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουͰड͚औΔ

    /%&'ܗࣜͰ͸ͳ͍σʔλͷ৔߹ 103 extension MyTagReaderWriter: NFCTagReaderSessionDelegate { func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { Task { let tag = tags.first! try await session.connect(to: tag) switch tag { case .feliCa(let feliCaTag): // Type 3 Tag (FeliCa) try await tagReader(session: session, didConnect: feliCaTag) case .iso7816(let iso7816Tag): // ISO/IEC 7816 ʹରԠͨ͠ Type 2 TagɺType 4 Tag ͳͲ try await tagReader(session: session, didConnect: iso7816Tag) case .iso15693(let iso15693Tag): // Type 5 Tag try await tagReader(session: session, didConnect: iso15693Tag) case .miFare(let miFareTag): // Type 2 TagɺType 4 Tag (MIFARE) try await tagReader(session: session, didConnect: miFareTag) } } } // ... }
  88. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. $PSF/'$Λ࢖ͬͨ։ൃͷϙΠϯτ

    w /'$λάʹΑͬͯ͸ ಡΈऔΓࣦഊ͕ଓ͘ͱϩοΫ͞Εͯ͠·͏΋ͷ͕͋Δ w ϩοΫ݊໘ͷݟͨ໨͕มΘΔ͜ͱ͸ͳ͍ʢҹ࡮ͳͷͰʣ w ͨͩͦΕΛ/'$Λհͨ͠ػցͰಡΈऔΔ͜ͱ͕Ͱ͖ͳ͘ͳΔ w ࣮ߦ͸৻ॏʹ 104
  89. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. $PSF/'$Λ࢖ͬͨ։ൃͷϙΠϯτ

    w $PSF/'$ͷ௨৴ηογϣϯ͸࠷େඵͷ੍࣌ؒݶ͕͋Δ 105
  90. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. $PSF/'$Λ࢖ͬͨ։ൃͷϙΠϯτ

    w #SFBLQPJOUΛࠩͯ͠σόοά͸͓͢͢Ί͠ͳ͍ w Ұ࣌ఀࢭத΋͜ͷʮ࠷େඵͷ੍࣌ؒݶʯ͸ଘࡏ͍ͯ͠Δ w QSJOUʹΑΔσόοά͕͓͢͢Ί 106
  91. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. $PSF/'$ͷ͕ͭ͜͜Β͍

    w J04ʹ͓͚ΔαʔυύʔςΟ"QQ޲͚ͷ/'$ͷ࢓༷͸ɺ"OESPJEͱൺֱ ͢Δͱେ੍͖͘ݶ͞Ε͍ͯΔ w 'FMJ$BγεςϜίʔυ΍"*%Λ͋Β͔͡Ί੩తʹࢦఆ͓ͯ͘͠ඞཁ w λάΛ͔͔ͯ͟͠ΒσϦήʔτϝιουʹ ͦͷ৘ใ͕౉ͬͯ͘Δ·Ͱʹ͕͔͔࣌ؒΔύλʔϯ͕͋Δ 107
  92. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. σϦήʔτϝιουʹͳ͔ͳ͔৘ใ͕͜ͳ͍

    'FMJ$Bͷྫ w Y'&ͱ͍͏γεςϜίʔυͷΈΛ࣋ͬͨλά w Y'&Λʮ*UFNʯͷ࠷ޙʹهड़ w ͦΕΑΓ΋લʹʮ*UFNʯΛ૿΍͍ͯ͘͠ 108
  93. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 109

    'FMJ$B͕஗͍͠ϑϧεΩϟϯ΋ෆՄೳޙฤʲJ04$PSF/'$ʳ2JJUBIUUQTRJJUBDPNUSFBTUSBJOJUFNTGCD
  94. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 109

    'FMJ$B͕஗͍͠ϑϧεΩϟϯ΋ෆՄೳޙฤʲJ04$PSF/'$ʳ2JJUBIUUQTRJJUBDPNUSFBTUSBJOJUFNTGCD
  95. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. $PSF/'$ͷ͕ͭ͜͜Β͍

    w /'$ͷڍಈ͕ෆ҆ఆͳJ1IPOFͷػछ͕͋Δͱ͍͏੠΋ w J1IPOFγϦʔζʜʁ 110
  96. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. $PSF/'$ͷ͕ͭ͜͜Β͍

    w ґવͱͯ͠৘ใ͕গͳ͍ w ʮࣗ෼ͷ࣮૷ʯʮ$PSF/'$ʯͷͲ͕ͬͪѱ͍ͷ͔ෆ໌ͳͱ͖͕͋Δ w ݕূ༻ʹ/'$ʢ'FMJ$BʣΛੵΜͩ"OESPJE୺຤Λ͓࣋ͬͯ͘ͱָ w ΋͘͠͸8JOEPXT1$ /'$ϦʔμʔϥΠλʔ w /'$ͷίϚϯυ࢓༷ࣗମ͸ͲͷϓϥοτϑΥʔϜͰ΋ڞ௨ w "OESPJEͷίʔυʢ+BWBɾ,PUMJOʣ΋ൺֱతࢀߟʹͳΔ 111
  97. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ιχʔגࣜձࣾc'FMJ$Bc/'$ʹ͍ͭͯc/'$ͱ'FMJ$Bͷؔ܎

    IUUQTXXXTPOZDPKQ1SPEVDUTGFMJDB/'$SFMBUJPOIUNM ҉߸ԽΛඞཁͱ͠ͳ͍ΦʔϓϯίϚϯυΛ༻͍ͨΞϓϦ έʔγϣϯͷ৔߹ʹ͸ɺެ։͞Ε͍ͯΔن͚֨ͩͰ։ൃ ͢Δ͜ͱ͕Ͱ͖·͢ɻ(PPHMFࣾͷ"OESPJE΍Ξοϓϧ ࣾͷJ04ͳͲεϚʔτϑΥϯ޲͚04͕/'$ͷػೳΛα ϙʔτ͓ͯ͠ΓɺҰൠͷํ͕։ൃ͞ΕͨిࢠϚωʔͷϏ ϡʔϫʔͳͲ΋ؚΊɺεϚʔτϑΥϯ޲͚ʹ͢Ͱʹ͍͘ ͔ͭͷ/'$ΞϓϦέʔγϣϯ͕ެ։͞Ε͍ͯ·͢ɻ 112
  98. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ͓·͚

    /'$͸୺຤ͱϦΞϧͷੜ׆Λ݁ͼ͚ͭΔຐ๏ͷΑ͏ͳ΋ͷ 113
  99. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ͦͷଞ

    ࢀߟࢿྉ w $PSF/'$c"QQMF%FWFMPQFS%PDVNFOUBUJPOIUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPODPSFOGD w 1BTT,JU "QQMF1BZBOE8BMMFU c"QQMF%FWFMPQFS%PDVNFOUBUJPOIUUQTEFWFMPQFSBQQMFDPN EPDVNFOUBUJPOQBTTLJU w 1SPYJNJUZ3FBEFSc"QQMF%FWFMPQFS%PDVNFOUBUJPOIUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPO QSPYJNJUZSFBEFS w *$"0%PD.BDIJOF3FBEBCMF5SBWFM%PDVNFOUT &JHIUI&EJUJPO  ɹ*OUFSOBUJPOBM$JWJM "WJBUJPO0SHBOJ[BUJPO w ӡస໔ڐূٴͼӡస໔ڐূ࡞੒γεςϜ౳࢓༷ॻʢ࢓༷ॻόʔδϣϯ൪߸ɿʣɹܯ࡯ிަ௨ہӡస໔ڐ՝ w ૯຿লి೾ར༻ϗʔϜϖʔδʛి೾؀ڥʛߴप೾ར༻ઃඋͷ֓ཁIUUQTXXXUFMFTPVNVHPKQKTZTPUIFST IJHIGSF w ιχʔגࣜձࣾ'FMJ$BΧʔυϢʔβʔζϚχϡΞϧൈਮ൛7FSTJPO 114
  100. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ͦͷଞ

    ໔੹ࣄ߲ w ຊτʔΫͷ಺༰ɾεϥΠυʹهࡌ͞Ε͍ͯΔࣄ߲͸ɺҰൠʹެ։͞Ε͍ͯΔ΋ͷͱɺͦΕΒΛ༻͍ͯ։ൃΛ ߦͬͨൃදऀͷ஌ݟʹج͍ͮͨ΋ͷͰ͢ɻ w ຊτʔΫͷ಺༰ɾεϥΠυʹهࡌ͞Ε͍ͯΔࣄ߲͸ɺ؆ུԽͷͨΊʹҰ෦ٕज़తʹਖ਼֬Ͱ͸ͳ͍දݱΛؚΜ Ͱ͍Δ৔߹͕͋Γ·͢ɻ w ຊτʔΫͷ಺༰ɾεϥΠυʹهࡌ͞Ε͍ͯΔࣄ߲͸ɺকདྷʹΘͨͬͯ಺༰Λอূ͢Δ΋ͷͰ͸͋Γ·ͤΜɻ w ຊτʔΫͷ಺༰ɾεϥΠυʹهࡌ͞Ε͍ͯΔձ໊ࣾɺ੡඼໊౳͸Ұൠʹ֤ࣾͷ঎ඪ·ͨ͸ొ࿥঎ඪͰ͢ɻ w ຊτʔΫͷ಺༰ɾεϥΠυʹهࡌ͞Ε͍ͯΔࣄ߲͸ɺຊτʔΫதʹڍ͛ΒΕͨձࣾɾஂମ౳͕ޙԉɾࢧԉ౳͠ ͍ͯΔ΋ͷ͸ແ͘ɺൃදऀ΋ؚΊͦΕΒͱ͸Ұ੾ؔ܎͕͋Γ·ͤΜɻ w ຊτʔΫͷ಺༰ɾεϥΠυΛࢀর͢Δ͜ͱʹΑͬͯੜͨ͡ଛ֐౳ʹ͍ͭͯɺൃදऀ͸Ұ੾ͷ੹೚Λෛ͍·ͤ Μɻ 115
  101. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. )BQQZUBHSFBEJOHɹɹɹɹɹɹɹɹɹɹɹɹɹIUUQTUSFUKQɹ⏩

    ৄղ$PSF/'$ 116 /'$Λ༻͍ͨJ04"QQ։ൃͷͯͼ͖ iOSDC Japan 2022 Day 1 #iosdc #b