meetup_201910.pdf

 meetup_201910.pdf

8bd326566d5bfb6e2d8371a0b85d6a15?s=128

kamui_project

October 09, 2019
Tweet

Transcript

  1. iOSͷূ໌ॻ Θ͔ΓͮΒ͍༻ޠ, ࢓૊ΈΛ ͓͞Β͍͢Δ DMM Meetup iOS #1

  2. About me • Name: ͔Ή͍ • App: MENUS(ϝχϡʔζ) • Favorite:

    VTuber() • Community: ϖϯΪϯଜ
  3. None
  4. iOSςετશॻ

  5. I will tell you …

  6. iOSͷূ໌ॻ

  7. ূ໌ॻରԠͷྺ࢙ • खಈͰ࡞੒, ߋ৽(ʙXcode7) • ࣗಈͰ࡞੒, ߋ৽(Xcode8ʙ) • Automatically manage

    signing etc. • fastlane(match)ͷొ৔Ͱূ໌ॻؔ࿈ͷઃఆΛڞ ༗Խ(2015೥ࠒ͔Βීٴ)
  8. ূ໌ॻͷ࡞੒ɾߋ৽Λҙࣝ͠ ͳ͍Ͱ։ൃ͢Δ࣌୅΁…

  9. None
  10. ։ൃάϧʔϓ" ։ൃάϧʔϓ# ։ൃάϧʔϓ$

  11. ։ൃάϧʔϓ" ։ൃάϧʔϓ# ։ൃάϧʔϓ$ ূ໌ॻͰτϥϒϧ͕ൃੜͨ͠ࡍʹ૒ํͰίϛϡχέʔγϣϯ͕ൃੜ ༻ޠ ࢓૊Έͷཧղ͕ඞཁ

  12. ʮԿΛݴ͍ͬͯΔ͔Θ͔Βͳ͍ɻ Զͨͪ͸งғؾͰiOSͷূ໌ॻΛ ࢖͍ͬͯΔʯ

  13. ΞδΣϯμ 1. Θ͔ΓͮΒ͍༻ޠ, ࢓૊ΈΛ͓͞Β͍͢Δ 2. (͕࣌ؒ͋Ε͹) ূ໌ॻؔ࿈ͷTips

  14. ׂѪͤͯ͞௖͘΋ͷ 1. ެ։伴҉߸ํࣜ, ൿີ伴ͳͲͷ҉߸ॲཧ༻ޠ 2. iOSؔ࿈Ҏ֎ͷAppleͷূ໌ॻ • macOS, watchOS, tvOSͳͲͷূ໌ॻ

    • Apple Pay, VoIP PushͳͲͷServicesূ໌ॻ
  15. ΞδΣϯμ 1. Θ͔ΓͮΒ͍༻ޠ, ࢓૊ΈΛ͓͞Β͍͢Δ 2. (͕࣌ؒ͋Ε͹) ূ໌ॻؔ࿈ͷTips

  16. 1. Θ͔ΓͮΒ͍༻ޠ, ࢓૊Έ 1.ిࢠॺ໊, ূ໌ॻؔ࿈༻ޠ 2. Xcodeʹొ৔͢Δূ໌ॻؔ࿈ػೳ 3. Certificates, Identifiers

    & Profilesʹొ৔͢Δ ༻ޠ
  17. 1. ిࢠॺ໊, ূ໌ॻؔ࿈༻ޠ ίʔυॺ໊ূ໌ॻ .certSigningRequestϑΝΠϧ .p12ϑΝΠϧ

  18. iOSͷূ໌ॻ

  19. iOSͷίʔυॺ໊ূ໌ॻ

  20. ίʔυॺ໊ূ໌ॻ is Կʁ

  21. ιϑτ΢ΣΞΛ഑෍ɾൢച͢Δࡍʹར༻ ऀ͕഑෍ݩͷ֬ೝ΍վ͟Μݕ஌Ͱ͖ΔΑ ͏ʹ෇༩͞ΕΔσδλϧॺ໊ͷূ໌ॻ

  22. ର৅: ιϑτ΢ΣΞ ిࢠূ໌ॻͷछྨͷ1ͭ ͦͷଞ αʔόʔূ໌ॻ ΫϥΠΞϯτূ໌ॻ ϝʔϧূ໌ॻ ͳͲͳͲ ίʔυॺ໊ূ໌ॻ

  23. ༻్: σδλϧॺ໊ͷਖ਼౰ੑΛূ໌Λ͢ΔͨΊ σδλϧॺ໊: ར༻ऀ͕഑෍ݩͷ֬ೝ ར༻ऀ͕վ͟ΜΛݕ஌Ͱ͖ΔΑ͏ʹ͢Δ ίϯϐϡʔλੈքͷϋϯί ίʔυॺ໊ূ໌ॻ

  24. σδλϧॺ໊͚ͩͰ ྑ͍ͷͰ͸…ʁ

  25. σʔλ͕ਖ਼͍͠΋ͷͱূ໌ -> ެ։伴(ϋϯί)

  26. σδλϧॺ໊ʮ͜ͷެ։伴(ϋϯ ί)͸ਖ਼͍͠΋ͷ͔…ʯ

  27. σδλϧॺ໊ʮ͜ͷެ։伴(ϋϯ ί)͸ਖ਼͍͠΋ͷ͔…ʯ

  28. ղܾࡦ: ূ໌ॻ

  29. ূ໌ॻཁٻϑΝΠϧ ༻్: ূ໌ॻ࡞੒ͷͨΊʹ ࣗ෼: CSRΛAppleʹఏग़ Apple: ॺ໊ + ίʔυॺ໊ূ໌ॻΛൃߦ CSR.certSigningRequest

  30. ݸਓ৘ใަ׵ϑΝΠϧ Public-Key Cryptography Standards(PKCS)ͷ12൪໨ͷن֨ͱ͠ ͯఆٛ ੜ੒ʹඞཁͳ΋ͷ ൿີ伴 CSRϑΝΠϧ࡞੒࣌ʹ伴ϖΞ(ެ։伴+ൿີ伴)Λ࡞੒ͨ͠ਓ͕ ࡞Δඞཁ ೝূہ(Apple)͔Βॺ໊͞Εͨূ໌ॻ

    hoge.p12
  31. hoge.p12

  32. ༻్: ূ໌ॻͷόοΫΞοϓ: ։ൃ༻ϚγϯͷҾ͖ܧ͗, ަ׵ ূ໌ॻͷΤΫεϙʔτ: ֎෦ͷCIπʔϧ, Push௨஌ αʔϏεπʔϧ νʔϜ։ൃ࣌ʹ֤Ϛγϯ্Ͱൿີ伴෇͖ূ໌ॻ͕ඞཁ hoge.p12

  33. 1. Θ͔ΓͮΒ͍༻ޠ, ࢓૊Έ 1.ిࢠॺ໊, ূ໌ॻؔ࿈༻ޠ 2. Xcodeʹొ৔͢Δূ໌ॻؔ࿈༻ޠ 3. Certificates, Identifiers

    & Profilesʹొ৔͢Δ༻ޠ
  34. 2. Xcodeʹొ৔͢Δূ໌ॻؔ࿈༻ޠ Provisioning Profile Automatically manage signing

  35. Provisioning Profile (ൿີ伴෇͖)ূ໌ॻ, App ID, ୺຤ͷUDID※Λؔ࿈෇͚ͨBundle ϑΝΠϧ ※ Development, Adhoc༻ͷΈ

    ͜ͷϓϩϑΝΠϧͰॺ໊͠Πϯετʔϧͨ͠ΞϓϦ͸ɺϓϩϑΝ Πϧʹઃఆ͞Ε͍ͯΔ৘ใΛجʹϏϧυͨ͜͠ͱΛอূ ূ໌ॻ͚ͩͰ͸࣮ػʹϏϧυor഑෍͕Ͱ͖ͳ͍ ୭ͷͲͷϚγϯ(ূ໌ॻ)Ͱ, Ͳͷ୺຤ʹ޲͚ͯ࡞ΒΕ͔ͨ(UDID) ͷ৘ใ͕ٻΊΒΕΔ
  36. Provisioning Profile App ID͸2छྨ Explicit App ID…ಛఆͷBundle IDΛࢦఆͨ͠஋ɻಛผͳ ཧ༝͕ͳ͍ݶΓͪ͜ΒΛਪ঑ Wildcard

    App ID…ʮ*ʯΛ࢖༻ɻ։ൃ༻Ͱ͍͍ͪͪҰҙ ͷ஋͕ෆཁͷ࣌ͳͲ ূ໌ॻಉ༷ɺ։ൃ༻ͱ഑෍༻ͷ2छྨ ഑෍༻͸Adhoc / App Storeʹ෼͔ΕΔ
  37. None
  38. ίʔυॺ໊ূ໌ॻ

  39. ίʔυॺ໊ূ໌ॻ Provisioning Profile "OEPJSE୺຤ͷυϥΠό͑͋͞Ε͹0,

  40. ༗ঈϥΠηϯεෆཁͰ࣮ػʹΠϯετʔϧ • Xcode7(2015೥)ΑΓ • Apple ID, ূ໌ॻ, Provisioning Profile͸ඞཁ •

    ࡞੒͸શͯXcode্Ͱ׬݁ • Provisioning Profileͷ༗ޮظݶ͸7೔ • ҎԼͷಈ࡞ݕূ͸ෆՄ • Push Notifications • In-App Purchasing • Apple Pay ͳͲ • App Store ConnectʹΞΫηεͰ͖ͳ͍ͨΊTest Flight΋ར༻ෆՄ
  41. Provisioning Profile खಈରԠʹΑΔ໰୊ ࣋ͭ৘ใ͕มΘΔͱProvisioning Profile΋มΘΔ = ߋ৽ ͕ඞཁ ݕূ୺຤ͷ௥Ճ Xcode

    CIπʔϧ ༗ޮظݶ͋Γ(1೥) ※༗ঈϥΠηϯε
  42. Automatically manage signing

  43. Automatically manage signing • Xcode8(2016೥)ΑΓ • ূ໌ॻʹؔ͢Δ࡞ۀΛࣗಈͰ΍ͬͯ͘ΕΔ • ॺ໊෇͖ূ໌ॻ࡞੒/ߋ৽ •

    Provisioning Profile࡞੒/ߋ৽ • AppID࡞੒/ߋ৽ • Apple͸͜ͷػೳΛਪ঑
  44. Automatically manage signing ϝϦοτ1: p12ϑΝΠϧͷॻ͖ग़͠΋ग़དྷΔ

  45. Automatically manage signing ϝϦοτ2: ୺຤ͷUDIDొ࿥

  46. Automatically manage signing https://devcenter.bitrise.io/code-signing/ios-code- signing/ios-auto-provisioning/

  47. 1. Θ͔ΓͮΒ͍༻ޠ, ࢓૊Έ 1.ిࢠॺ໊, ূ໌ॻؔ࿈༻ޠ 2. Xcodeʹొ৔͢Δূ໌ॻؔ࿈༻ޠ 3. Certificates, Identifiers

    & Profilesʹొ৔͢Δ༻ޠ
  48. Certificates, Identifiers & Profiles 4UBOEBSE &OUFSQSJTF "QQ4UPSF഑෍ ˓ ❌ "QQ4UPSF$POOFDU

    ར༻ ˓ ❌ ධՁ഑෍ "EIPD ˓ ˓ ૊৫಺഑෍ JOIPVTF ❌ ˓ ূ໌ॻ༗ޮظݶ ೥ ೥ අ༻  ԁ  ԁ ϝϯόʔγοϓͷൺֱ
  49. Certificates, Identifiers & Profiles • Adhoc(ධՁ഑෍) • Store഑෍ͤͣʹ୺຤Λࢦఆͨ͠഑෍ํ๏ •୺຤୆਺͸100୆ •Adhocొ࿥ͯ͠ͳ͍୺຤ͰΞϓϦ࣮ߦෆՄ

  50. • in-house(૊৫഑෍) • Store഑෍͠ͳ͍഑෍ํ๏ •୺຤୆਺੍ݶࢦఆ͕ແ͍ •୭Ͱ΋ΞϓϦ࣮ߦՄೳͷͨΊ஫ҙ͸ඞཁ Certificates, Identifiers & Profiles

  51. Certificates, Identifiers & Profiles Certificates • Software • Development /

    Distribution • Services • APNs / Pass Type ID / Apple Pay etc…
  52. Certificates, Identifiers & Profiles Certificates • Software • Development /

    Distribution • Services • APNs / Pass Type ID / Apple Pay etc… ΞϓϦ͕ଞͷ04ඪ४ͷαʔϏεͱ࿈ܞ͢Δ ৔߹͸ͦΕ΋ূ໌͢Δඞཁ͕͋Δ ։ൃ഑෍ͱ͸ผʹূ໌ॻ͕ඞཁ
  53. ΞδΣϯμ 1. Θ͔ΓͮΒ͍༻ޠ, ࢓૊ΈΛ͓͞Β͍͢Δ 2.(͕࣌ؒ͋Ε͹) ূ໌ॻؔ࿈ͷTips

  54. 4UBOEBSE ΩʔνΣʔϯΞΫηε -JCSBSZ .PCJMF%FWJDFT 1SPWJTJPOJOH 1SPpMFT 9DPEF "QQMF*% *EFOUJpFST $FSUJpDBUFT

    %FWJDFT 1SPpMFT ,FZT .PSF $43࡞੒ɾఏग़ ূ໌ॻ%- 11%- #VOEMF*%ొ࿥ 6%*% 6%*%ొ࿥
  55. 4UBOEBSE ΩʔνΣʔϯΞΫηε -JCSBSZ .PCJMF%FWJDFT 1SPWJTJPOJOH 1SPpMFT 9DPEF "QQMF*% *EFOUJpFST $FSUJpDBUFT

    %FWJDFT 1SPpMFT ,FZT .PSF $43࡞੒ɾఏग़ ূ໌ॻ%- 11%- #VOEMF*%ొ࿥ 6%*% 6%*%ొ࿥
  56. ݹ͍Provisioning Profileࢀরͯ͠ ΔͬΆ͍͔Β࡟আ͍ͨ͠…

  57. ݹ͍Provisioning Profileࢀরͯ͠ ΔͬΆ͍͔Β࡟আ͍ͨ͠…

  58. ipaϑΝΠϧ͔ΒProvisioning Profile Λ֬ೝ͢Δ ipaϑΝΠϧ͸zipѹॖ͞ΕͨϑΝΠϧ unzipίϚϯυͰղౚՄೳ ֦ுࢠΛ.zipʹ͢ΔͱFinderͰల։͕Մ ೳ

  59. ipaϑΝΠϧ͔ΒProvisioning Profile Λ֬ೝ͢Δ App/Payload/Hoge.app ύοέʔδͷ಺༰Λදࣔ Embedded.mobileprovision <- ίϨ ূ໌ॻؔ࿈৘ใΛXMLܗࣜͰ֬ೝͰ͖Δ AdHocΞϓϦΛ౉ͨ͠͸͕ͣͩΠϯετʔϧͰ͖ͳ͍ͱݴΘ

    Εͨ -> ໊લ͔ΒappΛਪଌͰ͖ͳ͍࣌ʹ໾ཱ͔ͭ΋…ʁ
  60. Conclusion • iOSͷূ໌ॻΛ͓͞Β͍ͯ͠Έ·ͨ͠ • ʮͦ͏͍͑͹ͦ͏ͩͬͨΑͳʯʮͦ͏ͩͬ ͨΜͩʯͱৼΓฦΔػձʹͳΕ͹޾͍Ͱ͢ • ͕࣌ؒ͋Ε͹ࠓळ͔Βొ৔ͨ͠ূ໌ॻͳͲΛ ঺հ͔ͨͬͨ͠ͷͰ͕͢…

  61. Conclusion • iOSͷূ໌ॻΛ͓͞Β͍ͯ͠Έ·ͨ͠ • ʮͦ͏͍͑͹ͦ͏ͩͬͨΑͳʯʮͦ͏ͩͬ ͨΜͩʯͱৼΓฦΔػձʹͳΕ͹޾͍Ͱ͢ • ͕࣌ؒ͋Ε͹ࠓळ͔Βొ৔ͨ͠ূ໌ॻͳͲΛ ঺հ͔ͨͬͨ͠ͷͰ͕͢…

  62. None
  63. Conclusion • iOSͷূ໌ॻΛ͓͞Β͍ͯ͠Έ·ͨ͠ • ʮͦ͏͍͑͹ͦ͏ͩͬͨΑͳʯʮͦ͏ͩͬ ͨΜͩʯͱৼΓฦΔػձʹͳΕ͹޾͍Ͱ͢ • ͕࣌ؒ͋Ε͹ࠓळ͔Βొ৔ͨ͠ূ໌ॻͳͲΛ ঺հ͔ͨͬͨ͠ͷͰ͕͢…

  64. Conclusion • iOSͷূ໌ॻΛ͓͞Β͍ͯ͠Έ·ͨ͠ • ʮͦ͏͍͑͹ͦ͏ͩͬͨΑͳʯʮͦ͏ͩͬ ͨΜͩʯͱৼΓฦΔػձʹͳΕ͹޾͍Ͱ͢ • ͕࣌ؒ͋Ε͹ࠓळ͔Βొ৔ͨ͠ূ໌ॻͳͲΛ ঺հ͔ͨͬͨ͠ͷͰ͕͢…

  65. Thank you!