fastlaneはともだち こわくないよ

F6f299e604f7a8a540bbe7b86057522f?s=47 rikusouda
August 22, 2017
480

fastlaneはともだち こわくないよ

F6f299e604f7a8a540bbe7b86057522f?s=128

rikusouda

August 22, 2017
Tweet

Transcript

  1. FASTLANE͸ͱ΋ͩͪ ͜Θ͘ͳ͍Α fastlaneษڧձ vol4 @rikusouda

  2. INTRODUCTION ࣗݾ঺հ ▸ @rikusoua ▸ iOSΞϓϦΤϯδχΞ ▸ νϟοτͷձࣾͰಇ͍͍ͯΔ ▸ νϟοτΞϓϦͷ։ൃ

    ▸ ༷ʑͳܗଶͷϦϦʔεΛ࣮ݱ(In-House, VPP Custom B2B) ▸ fastlaneϨϕϧ : NEW GAME! Ͱݴ͏ͱ੨༿ͪΌΜ͘Β͍
  3. AGENDERS ࠓ೔࿩͢͜ͱ ▸ fastlaneා͍ˠfastlaneා͘ͳ͍ ▸ fastlaneΛ࢖͓͔ͬͨ͛Ͱָʹͳͬͨ࿩ ▸ CI؀ڥಋೖͷࣗຫ࿩ۤ࿑࿩

  4. FASTLANE͕ා͘ͳ͘ͳΔ·Ͱ FASTLANEͱग़ձͬͨͱ͖ͷRIKUSOUDA ▸ Ruby΍ͬͨ͜ͱ΋ݟͨ͜ͱ΋ͳ͍ ▸ ϞόΠϧΞϓϦ։ൃະܦݧ ▸ ͋Δ೔ಥવiOSΤϯδχΞͱͯ͠σϏϡʔͨ͠ ▸ લ೚ऀ͔ΒҾ͖ܧ͗Λड͚ͨ

  5. ࣾ಺഑৴͸ “fastlane iOS beta"ͰͰ͖Δ͔Β લ೚ऀɹ FASTLANE͕ා͘ͳ͘ͳΔ·Ͱ

  6. Θ͔Βͳ͍

  7. FASTLANE͕ා͘ͳ͘ͳΔ·Ͱ FASTLANEͱͷग़ձ͍ ▸ ʮfastlane ios betaʯͱ͍͏ίϚϯυΛڭ͑ͯ͘Ε͚ͨͩ ▸ ࣗྗͰFastfileΛݟ͚ͭͯ։͍ͯΈ͚ͨͲͳʹ͕ॻ͍͍ͯΔ ͷ͔Θ͔ΒͣΑ͘Θ͔Βͳ͍ڪාײ ▸

    ͔͍ͭ͜ͳͤΔͱศརͦ͏ͩͳͱ͸ࢥͬͨ ▸ ͦͷ··͠͹Β͘FastfileΛ৮Δ͜ͱͳ͘ɺϏϧυͷ࣌ʹί ϚϯυΛୟ͚ͩͩͬͨ͘
  8. FASTLANE͕ා͘ͳ͘ͳΔ·Ͱ ࣍ʑͱ૿͍͑ͯ͘ϦϦʔεཁٻ ▸ ͓٬༷ͷApple Developer Enterprise ProgramͰ͓٬༷ͷ ࣾ಺ʹ഑৴͍ͨ͠ ▸ VPP

    Custom B2BͰಛఆͷ͓٬༷ʹ͚ͩΧελϜ൛Λ഑৴͠ ͍ͨ ▸ ։ൃதػೳΛ֬ೝ͢ΔͨΊͷΞϓϦ΋ཉ͍͠(ຊ൪΍Staging ʹͭͳ͙ΞϓϦͱ͸ผʹ)
  9. FASTLANE͕ා͘ͳ͘ͳΔ·Ͱ FASTLANEษڧձʹࢀՃͯ͠Έͨ ▸ ஌Βͳ͍׆༻ํ๏΍actionͷ࿩ͳͲ͕ग़͖ͯͯௐ΂Δ͖͔ͬ ͚ʹͳͬͨ ▸ SlackʹࢀՃͯ͠ओ࠵ऀͷํʑͷൃݴ͕ܹࢗʹͳͬͨ ▸ ࣗ෼͚͕ͩ࢖͍ํͰ໎͍ͬͯΔ༁Ͱ͸ͳ͍ͱ஌ͬͯมͳযΓ ͕ͳ͘ͳͬͨ

    ▸ ͳΜ͔ΈΜͳRubyͰ͖ΔͬΆ͍
  10. FASTLANE͕ා͘ͳ͘ͳΔ·Ͱ RUBYͷจ๏Λ͋Δఔ౓֮͑ͨ ▸ FastfileͬͯRubyͷDSLͱ΍ΒΒ͍͠ ▸ Ruby͕ͳΜͱͳ͘Θ͔Δ͜ͱͰɺFastfileΛฤू͢Δ͜ͱ΁ ͷڪා͕ࠀ෰͞Εͨ ▸ fastlaneࣗମ΋RubyͰ࣮૷͞Ε͍ͯΔ

  11. FASTLANE͕ා͘ͳ͘ͳΔ·Ͱ ެࣜυΩϡϝϯτΛಡΜͩ ▸ https://docs.fastlane.tools/ ▸ https://github.com/fastlane/docs ▸ ࢖͍ํͷྫ΍ActionҰཡͳͲ ▸ ͲΜͳ͜ͱ͕Ͱ͖Δͷ͔ΠϝʔδͰ͖ΔΑ͏ʹͳͬͨ

  12. FASTLANE͕ා͘ͳ͘ͳΔ·Ͱ FASTLANEͷιʔεΛಡΜͰΈͨ ▸ ͨͱ͑͹ɺupdate_app_identifierͬͯ Action ͸ xcodeproj มߋ͢ Δ͔ Into.plistมߋ͢Δͷ͔Α͘Θ͔Βͣɺ࢖͏ͷ͕ͳΜͱͳ͘ා͍

    ▸ ͻͱ·ͣfastlaneͷϦϙδτϦΛaction໊Ͱݕࡧ͢Δͱग़͖ͯͨ ▸ https://github.com/fastlane/fastlane/blob/master/fastlane/lib/ fastlane/actions/update_app_identifier.rb ▸ ಡΜͰΈΔͱׂͱΘ͔Γ΍͍͢ ▸ த਎͕Θ͔Δͱ࢖͏͜ͱͷڪා͕ബΕ͖ͯͨ
  13. FASTLANE͕ා͘ͳ͘ͳΔ·Ͱ TYPOݟ͚ͭͨͷͰCONTRIBUTEͯ͠Έͨ

  14. FASTLANE͕ා͘ͳ͘ͳΔ·Ͱ EXPLITLY -> EXPLICITLY

  15. None
  16. AGENDERS ͍·࿩͍ͯ͠Δͱ͜Ζ ▸ fastlaneා͍ˠfastlaneා͘ͳ͍ ▸ fastlaneΛ࢖͓͔ͬͨ͛Ͱָʹͳͬͨ࿩ ←࣍͜͜ ▸ CI؀ڥಋೖͷۤ࿑࿩

  17. FASTLANEΛ࢖͓͔ͬͨ͛Ͱָʹͳͬͨ࿩ ABOUT OUR CHAT APP ▸ Ϗδωενϟοτ(ݸਓͰ͸ͳ͘ձࣾͰ࢖͏) ▸ Enterprise൛ͱ͍͏ΦϯϓϨϛε൛(Ϋϥ΢υ͡Όͳ͍൛)͕͋Δ ▸

    ༷ʑͳΞϓϦ഑෍ܗଶ͕ߟ͑ΒΕΔ ▸ ADEPͷIn-House (ADEP: Apple Developer Enterprise Program) ▸ VPP Custom B2B (VPP: Volume Purchase Program) ▸ App Store ▸ ࣾ಺഑৴ ( Fabric Beta )
  18. FASTLANEΛ࢖͓͔ͬͨ͛Ͱָʹͳͬͨ࿩ VPP CUSTOM B2Bͷۤ೰ɹɹ ▸ ΧελϜ಺༰͕มΘΔͨͼʹผΞϓϦͱͯ͠iTunes Connect΁ͷొ࿥͕ ඞཁ ▸ ฐࣾͷ৔߹ΞϓϦόʔδϣϯΛސ٬͝ͱʹݻఆ͍ͨ͠(αʔόʔͱͦΖ

    ͑ΔͨΊʹ) ▸ ୯७ʹ΍ΔͱXcodeͰScheme΍TargetΛ૿΍͢͜ͱʹͳΓ͔Ͷͳ͍(Ξ ϓϦ਺͕૿͑Δͱഁ୼͢Δ) ▸ iTunes ConnectͰԿ౓΋ࣅͨΑ͏ͳ৘ใΛ܁Γฦ͠ొ࿥͢Δ͜ͱʹͳ Δ
  19. FASTLANEΛ࢖͓͔ͬͨ͛Ͱָʹͳͬͨ࿩ FASTLANEͰָͰ͖͍ͯΔ෦෼ ▸ App Bundle Identifier΍Display NameͷҰ࣌తͳॻ͖׵͑ ▸ iTunes Connect༻ͷϝλσʔλɺScreen

    Capture؅ཧ
  20. FASTLANEΛ࢖͓͔ͬͨ͛Ͱָʹͳͬͨ࿩ APP BUNDLE IDENTIFIER΍DISPLAY NAMEͷҰ࣌తͳॻ͖׵͑ ▸ Scheme΍TargetΛ૿΍ͣ͞ʹόϦΤʔγϣϯΛ૿΍ͤΔ

  21. FASTLANEΛ࢖͓͔ͬͨ͛Ͱָʹͳͬͨ࿩ ITUNES CONNECT༻ͷϝλσʔλɺSCREEN CAPTURE؅ཧ ▸ fastlane/metadata͕͋Ε͹ deliver action͸ϩʔΧϧͷϝλ σʔλ΍ Screen

    CaptureΛiTunes Connectʹొ࿥͢Δ ▸ VPP Custom B2B༻ʹࣅͨΑ͏ͳΞϓϦΛ૿΍͢ͱ͖͸͜ͷ ࢓૊ΈΛ࢖ͬͯखಈొ࿥Λ͠ͳ͍͜ͱͰָΛ͢Δ ▸ name.txt(App Storeʹొ࿥͢ΔΞϓϦ໊)͸࡟আ͓ͯ͘͠ͱ ָ͔΋
  22. None
  23. AGENDERS ͍·࿩͍ͯ͠Δͱ͜Ζ ▸ fastlaneා͍ˠfastlaneා͘ͳ͍ ▸ fastlaneΛ࢖͓͔ͬͨ͛Ͱָʹͳͬͨ࿩ ▸ CI؀ڥಋೖͷۤ࿑࿩ ←࣍͜͜

  24. CI؀ڥಋೖͷۤ࿑࿩ CI؀ڥಋೖ͠·ͨ͠ ▸ Bitriseͷ༗ྉϓϥϯ(ಉ࣮࣌ߦ2ͭ)Λܖ໿ ▸ git push͢Δ͝ͱʹςετΛ࣮ߦ(GitHub࿈ܞ) ▸ ࣾ಺഑৴΍ϦϦʔε࣌ͷϏϧυΛ։ൃऀͷPCͰߦΘͳͯ͘ ΋Α͘ͳͬͨ

    ▸ fastlane࢖͍ͬͯΔͷͰCIଆͷઃఆ͸গͳ͍
  25. None
  26. CI؀ڥಋೖͷۤ࿑࿩ ۚͷ஄ؙൃಈ·Ͱͷಓ ▸ ࣾ಺഑৴΍ϦϦʔεͷͨΊͷϏϧυΛ։ൃऀͷPCͰߦ͏͜ ͱ͸وॏͳ޻਺Λແବʹ͢Δߦҝ ▸ CI؀ڥΛಋೖ͢Δ͜ͱͰɺϏϧυ౳ͷ޻਺Λແବʹͤͣຊདྷ ͷ։ൃʹճ͢͜ͱ͕Ͱ͖Δ ▸ ࣦΘΕ͍ͯΔͰ͋Ζ͏޻਺Λֹۚʹ׵ࢉ͠ɺCI؀ڥ༗ྉϓϥ

    ϯͷֹۚͱൺֱͯ͠ΈΔ
  27. CI؀ڥಋೖͷۤ࿑࿩ CI؀ڥಋೖͰۤ࿑ͨ͜͠ͱ ▸ Apple IDͷύεϫʔυ͸Ͳ͏͢Δ? ▸ cert΍matchΛ࢖͍ͬͯͳ͍͚Ͳূ໌ॻ͸? ▸ CI؀ڥͰ͚ͩΤϥʔʹͳΔέʔεʹૺ۰ ▸

    gymͰॺ໊ؔ࿈ͰΤϥʔʹͳͬͨ ▸ scan͕ͳ్͔ͥதͰࣦഊ
  28. CI؀ڥಋೖͷۤ࿑࿩ APPLE IDͷύεϫʔυ͸Ͳ͏͢Δ? ▸ FASTLANE_PASSWORD ؀ڥม਺ʹύεϫʔυΛઃఆ

  29. CI؀ڥಋೖͷۤ࿑࿩ CERT΍MATCHΛ࢖͍ͬͯͳ͍͚Ͳূ໌ॻ͸? ▸ BitriseͳΒূ໌ॻΛ؆୯ʹ؀ڥʹ൓өͰ͖Δ(ͪΐͬͱ͚ͩ Bitriseґଘͯ͠͠·ͬͨՕॴ)

  30. CI؀ڥಋೖͷۤ࿑࿩ GYMͰॺ໊ؔ࿈ͰΤϥʔʹͳͬͨ ▸ Xcode7ͷઃఆΛͦͷ··࢖͍ͬͯͨ ▸ Automatic Code SigningΛҰ࣌తʹແޮʹ͢Δ͜ͱͰղܾ

  31. CI؀ڥಋೖͷۤ࿑࿩ SCAN͕ͳ్͔ͥதͰࣦഊ ▸ ݕࡧ͢Δͱ͍Ζ͍Ζग़Δ͕ͲΕΛ΍ͬͯ΋ղܾͤͣ ▸ Ϗϧυઃఆ͕ؒҧ͍ͬͯͨͷͰमਖ਼͢Δͱ੒ޭ͢ΔΑ͏ʹ

  32. ·ͱΊ ·ͱΊ ▸ ࠷ॳ͸fastlane৮Δͷා͔͚ͬͨͲɺΘ͔ͬͯ͘Δͱා͘ͳ ͘ͳ͖ͬͯͨ ▸ fastlaneͷ͓͔͛ͰVPP Custom B2BΞϓϦͷͨΊʹ Scheme΍TargetΛ૿΍͢͜ͱΛճආͰ͖ͨ

    ▸ CI؀ڥಋೖ͢Δͱ޾ͤʹͳΕΔɻͭ·͍ͮͨࣄྫͷڞ༗
  33. ͝੩ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠