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

通信環境が不安定でも心地よい体験を

 通信環境が不安定でも心地よい体験を

Adbff2a1447fbe53ca24a6943b3d80e4?s=128

haptaro

March 05, 2019
Tweet

Transcript

  1. ௨৴؀ڥ͕ෆ҆ఆͰ΋৺஍Α͍ମݧΛ! 2019/03/05 Mobile Engineer Meetup @Sansan #33tech

  2. ෱ඌ ޾ଠ࿠ - Sansanגࣜձࣾ - Eightࣄۀ෦ - iOSΞϓϦΤϯδχΞ 2 @haptaro

  3. ΞδΣϯμ - Πϯυͷ௨৴؀ڥ - ௨৴ମݧΛྑ͘͢Δ3ͭͷํ๏ - ௨৴ͷσόοάํ๏ - ·ͱΊ 3

  4. None
  5. Πϯυʹߦ͖ͬͯ·ͨ͠!

  6. None
  7. None
  8. None
  9. None
  10. None
  11. None
  12. ౉ߤ໨త - ௨৴पΓͷ՝୊ͷચ͍ग़͠ͱͦͷղܾࡦͷఏҊ - ݱ஍iOSΞϓϦΤϯδχΞͷ࠾༻ - ݱ஍ͷڠྗձࣾ͞Μͱͷ਌ກ΍ΠϯυͷจԽΛ஌Δ͜ͱ 12

  13. ౉ߤ໨త - ௨৴पΓͷ՝୊ͷચ͍ग़͠ͱͦͷղܾࡦͷఏҊ - ݱ஍iOSΞϓϦΤϯδχΞͷ࠾༻ - ݱ஍ͷڠྗձࣾ͞Μͱͷ਌ກ΍ΠϯυͷจԽΛ஌Δ͜ͱ 13

  14. Πϯυͷ௨৴؀ڥ - ճઢ଎౓ ਺ेkbps ʙ ਺Mbps (ݱ஍SIM Jio) - ճઢ଎౓͕ྑ͍ͱ͜ΖͰ͸ɺ೔ຊͱ΄΅ಉ͡΋͘͠͸ϫϯςϯϙ஗͍͔ͳ

    ͙Β͍ - ͨͩٸʹ஗͘ͳͬͨΓɺશ͘ి೾͕ೖΒͳ͘ͳͬͨΓ͢Δεϙοτ͕͋Δ 14 ※͋͘·ͰMumbaiʙPuneपลɻSIMʹΑͬͯ΋ࠩ͸͋Γɻ
  15. ௨৴؀ڥ͕ѱ͍৔߹ͷ͜ͱ
 ͪΌΜͱߟ͑ΒΕ͍ͯ·͔͢ʁ

  16. ׂͱ௨৴؀ڥ͕ྑ͍ࠃͰ΋ɺ
 ҠಈதɺϏϧͷ஍ԼɺΤϨϕʔλͷதɺ஍ԼమͳͲ ௨৴͕ෆ҆ఆʹͳΔγνϡΤʔγϣϯ͸ଘࡏ͢Δ

  17. None
  18. ௨৴ͷνϡʔχϯάํ๏ 18 αʔόͷϨεϙϯεߴ଎Խɺ௨৴ͷฒྻԽɺը૾ϑΥʔϚοτͷมߋɺ௨৴ ϑΥʔϚοτͷมߋɺAPIΛୟ͘৔ॴΛม͑Δetc

  19. ௨৴ͷνϡʔχϯάํ๏ 19 αʔόͷϨεϙϯεߴ଎Խɺ௨৴ͷฒྻԽɺը૾ϑΥʔϚοτͷมߋɺ௨৴ ϑΥʔϚοτͷมߋɺAPIΛୟ͘৔ॴΛม͑Δetc ΋ͪΖΜ௨৴ࣗମͷνϡʔχϯά΋େ੾ʂ

  20. ͦΕΑΓ΋·ͣجຊతͳ͜ͱΛஸೡʹ΍Δ ඞཁ͕͋Δ͜ͱʹؾ͕͍ͭͨ

  21. ࠓճ͸௨৴؀ڥ͕ෆ҆ఆͰ΋
 Ϣʔβ͕৺஍Α͘࢖͑ΔΑ͏ʹ͢ΔͨΊͷ
 جຊͷ͓࿩Λ͠·͢

  22. ࣮ࡍʹEightʹ͋ͬͨ໰୊ - ௨৴த΍௨৴ʹࣦഊͯ͠͠·͏ͱਅͬനʹ͍ۙ൵͍͠ը໘͕ͱ͜ΖͲ͜Ζ ʹ͋ͬͨ - ௨৴தʹϩʔσΟϯάදݱ͕ͳ͍͜ͱͰɺࠓΞϓϦ͕ԿΛ͍ͯ͠Δͷ͔Θ͔ Βͳ͍ɻ௨৴Ͱ͖͍ͯͳ͍ͷ͔ɺࣦഊ͍ͯ͠Δͷ͔ɺͨͩಡΈࠐΈ͕஗͍ ͚ͩͳͷ͔ - ը໘Λ෴͏Α͏ͳϩʔσΟϯάʹΑΓɺ௨৴தϢʔβ͕શ͘ૢ࡞Ͱ͖ͳ͍

    22
  23. ࣮ࡍʹEightʹ͋ͬͨ໰୊ - ௨৴த΍௨৴ʹࣦഊͯ͠͠·͏ͱਅͬനʹ͍ۙ൵͍͠ը໘͕ͱ͜ΖͲ͜Ζ ʹ͋ͬͨ - ௨৴தʹϩʔσΟϯάදݱ͕ͳ͍͜ͱͰɺࠓΞϓϦ͕ԿΛ͍ͯ͠Δͷ͔Θ͔ Βͳ͍ɻ௨৴Ͱ͖͍ͯͳ͍ͷ͔ɺࣦഊ͍ͯ͠Δͷ͔ɺͨͩಡΈࠐΈ͕஗͍ ͚ͩͳͷ͔ - ը໘Λ෴͏Α͏ͳϩʔσΟϯάʹΑΓɺ௨৴தϢʔβ͕શ͘ૢ࡞Ͱ͖ͳ͍

    23 Ωϟογϡ

  24. ࣮ࡍʹEightʹ͋ͬͨ໰୊ - ௨৴த΍௨৴ʹࣦഊͯ͠͠·͏ͱਅͬനʹ͍ۙ൵͍͠ը໘͕ͱ͜ΖͲ͜Ζ ʹ͋ͬͨ - ௨৴தʹϩʔσΟϯάදݱ͕ͳ͍͜ͱͰɺࠓΞϓϦ͕ԿΛ͍ͯ͠Δͷ͔Θ͔ Βͳ͍ɻ௨৴Ͱ͖͍ͯͳ͍ͷ͔ɺࣦഊ͍ͯ͠Δͷ͔ɺͨͩಡΈࠐΈ͕஗͍ ͚ͩͳͷ͔ - ը໘Λ෴͏Α͏ͳϩʔσΟϯάʹΑΓɺ௨৴தϢʔβ͕શ͘ૢ࡞Ͱ͖ͳ͍

    24 Ωϟογϡ
 Ϣʔβ΁ͷద੾ͳϑΟʔυόοΫ
  25. ࣮ࡍʹEightʹ͋ͬͨ໰୊ - ௨৴த΍௨৴ʹࣦഊͯ͠͠·͏ͱਅͬനʹ͍ۙ൵͍͠ը໘͕ͱ͜ΖͲ͜Ζ ʹ͋ͬͨ - ௨৴தʹϩʔσΟϯάදݱ͕ͳ͍͜ͱͰɺࠓΞϓϦ͕ԿΛ͍ͯ͠Δͷ͔Θ͔ Βͳ͍ɻ௨৴Ͱ͖͍ͯͳ͍ͷ͔ɺࣦഊ͍ͯ͠Δͷ͔ɺͨͩಡΈࠐΈ͕஗͍ ͚ͩͳͷ͔ - ը໘Λ෴͏Α͏ͳϩʔσΟϯάʹΑΓɺ௨৴தϢʔβ͕શ͘ૢ࡞Ͱ͖ͳ͍

    25 Ωϟογϡ
 Ϣʔβ΁ͷద੾ͳϑΟʔυόοΫ όοΫάϥ΢ϯυ௨৴
  26. Ωϟογϡ

  27. ΩϟογϡͷϝϦοτ - ௨৴ͤͣͱ΋σʔλʹΞΫηεͰ͖Δ - ॏ͍σʔλ΋1ճऔಘ͢Ε͹࢖͑Δ - ϩʔΧϧʹσʔλ͕͋ΔͷͰߴ଎ͰΞΫηεͰ͖Δ 27

  28. ΩϟογϡͷσϝϦοτ - ࠷ॳͷ1ճ͸௨৴͠ͳ͍ͱ͍͚ͳ͍ - ࠷৽ͷσʔλͰ͸ͳ͍Մೳੑ͕͋Δ - ୺຤ͷ༰ྔ͕૿͑Δ - ҙਤ͠ͳ͍σʔλ͕ݟ͑ͯ͠·͏Մೳੑ͕͋Δ
 (ΞΧ΢ϯτͷ੾Γସ͕͑͋ΔαʔϏε৔߹)

    28
  29. ൺֱ (Eightͷϝοηʔδৄࡉը໘) 29

  30. ࠷৽Ͱͳͯ͘΋͙͢ʹσʔλ͕ ݟΕΔ΄͏͕ମݧͱͯ͠ྑ͍ɻ ※΋ͪΖΜαʔϏεಛੑʹ΋ΑΓ·͢

  31. Ϣʔβ΁ͷద੾ͳϑΟʔυόοΫ

  32. “Feedback helps people know what an app is doing, discover

    what they can do next, and understand the results of actions.” Human Interface Guidelines
  33. ௨৴ͷϑΟʔυόοΫ - ϩʔσΟϯά - Τϥʔ 33

  34. ϩʔσΟϯά - ௨৴؀ڥ͕ѱ͍ͱ͜ΖͰ͸ɺίϯςϯπ͕ॠ࣌ʹදࣔ͞ΕͣɺϩʔσΟϯά දݱ͕ͳ͍ͱਅͬന͍ը໘·ͨ͸ίϯςϯπ͕ଘࡏ͠ͳ͍ۭനදݱʹͳͬ ͯ͠·͏ - Instagram, Facebook, Twitter, AppleͳͲͷΞϓϦΛݟΔͱϩʔσΟϯάදݱ

    ͸Activity IndicatorΛग़͍ͯ͠Δ - ը૾ͷϩʔσΟϯάʹؔͯ͠͸Progressive JPEGͷΑ͏ͳදݱ΍ͦͷը૾ ͷதͰҰ൪ଟ͘࢖ΘΕ͍ͯΔ৭ͷը૾ΛҰ୴ද͓ࣔͯ͘͠ͷ΋ྑͦ͞͏ 34
  35. Instagram Facebook Twitter Apple

  36. Τϥʔ - ى͖͍ͯΔ͜ͱΛਖ਼֬ʹ఻͑ɺ࣍ʹͲ͏͢Ε͹ྑ͍͔΋఻͑Δ - APIͷϨεϙϯεͰΤϥʔͷछผ͝ͱʹఆٛ͠HTTPεςʔλείʔυͰద ੾ʹϋϯυϦϯάͯ͠Ϣʔβʹ఻͑Δ - APIΛୟ͘લʹ௨৴͕Ͱ͖ͳ͍ঢ়گʹ͋ΔͳΒ͹ͦͷ͜ͱΛϢʔβʹ఻͑Δ - ʮΤϥʔʯɺʮ௨৴Τϥʔʯɺʮ௨৴ࣦഊʯΈ͍ͨͳ΋ͷ͚ͩ͸ઈର

    36
  37. 37 ReachabilityͰ௨৴؀ڥ͕ͳ͚Ε͹guardͰૣظExit https://github.com/tonymillion/Reachability HTTPϨεϙϯεͷεςʔλείʔυΛݟͯద੾ʹϋϯυϦϯά

  38. None
  39. Կ͕ى͖͍ͯͯɺ࣍ԿΛ͢Ε͹Α͍͔Θ͔Δ

  40. ద੾ͳϑΟʔυόοΫ͕
 Ϣʔβମݧͷ޲্ʹͭͳ͕Δɻ ※1ͭલͷΞϥʔτ͸ Ͱ͕͢ɻ

  41. όοΫάϥ΢ϯυ௨৴

  42. None
  43. όοΫάϥ΢ϯυ௨৴ͷϝϦοτ - ෳ਺ຕͷը૾ϑΝΠϧ΍ಈըϑΝΠϧͳͲͷ௨৴ʹ͕͔͔࣌ؒΔ΋ͷͰ΋ཪ ଆͰ௨৴͢Δ͜ͱͰϢʔβͷૢ࡞ΛϒϩοΫ͠ͳ͍ - લ΋ͬͯཪଆͰ௨৴ͯ͠σʔλΛऔಘ͓ͯ͘͜͠ͱ(ϓϦϑΣον)Ͱɺ࢖͍ ͍ͨͱ͖ʹ͙͢࢖͏͜ͱ͕Ͱ͖Δ 43

  44. όοΫάϥ΢ϯυ௨৴ͷσϝϦοτ - ௨৴தͷঢ়ଶɺ੒ޭ / ࣦഊΛૢ࡞தͷϢʔβʹ఻͑ͳ͚Ε͹͍͚ͳ͍ - ॲཧͷ҆શ໘ͷ౎߹΍ɺ௨৴͕ऴΘΒͳ͍ͱ࣍ͷը໘΁ਐΊͳ͍Α͏ͳը ໘Ͱ͸࢖͑ͳ͍ - ෳ਺ͷ௨৴(௚ྻɺฒྻ)ɺ༏ઌॱҐɺґଘؔ܎ɺϦτϥΠػೳ(खಈɺࣗಈ)

    Λߟ͑࢝ΊΔͱॲཧ͕ෳࡶʹͳͬͯ͠·͏ 44
  45. InstagramɺSlackɺFacebookɺApple͋ͨΓ͸Ͳ͜΋
 όοΫάϥ΢ϯυͰ௨৴͠ɺϢʔβͷૢ࡞ΛϒϩοΫ͍ͯ͠ͳ͍

  46. iCloud(Apple) Slack

  47. Instagram Facebook

  48. όοΫάϥ΢ϯυ௨৴͸ QueueͷΑ͏ͳ࢓૊Έ͕͋Ε͹࣮ݱͰ͖ͦ͏

  49. Operation / OperationQueue - FoundationϑϨʔϜϫʔΫʹؚ·ΕΔ - Operation: ॲཧͷ͔ͨ·Γ - OperationQueue:

    OperationΦϒδΣΫτͷΩϡʔɻฒྻॲཧɺඇฒྻॲཧ Λఏڙ͢Δ - Operation΍Operation Queueʹ༏ઌ౓΍ґଘؔ܎Λ͚ͭΔ͜ͱ΋Մೳ 49
  50. - Operation / OperationQueueΛ࢖ͬͯಠࣗͰ࣮૷ - Operation / OperationQueueͷWrapperϥΠϒϥϦΛ࢖͏ 50

  51. - SwiftQueue
 https://github.com/lucas34/SwiftQueue - ProducerKit
 https://github.com/ProcedureKit/ProcedureKit - Queuer
 https://github.com/FabrizioBrancati/Queuer -

    PSOperations
 https://github.com/pluralsight/PSOperations 51 WrapperϥΠϒϥϦ
  52. ཪଆͰ௨৴͢Δ͜ͱͰϢʔβͷૢ࡞Λ๦͛ͳ͍ɻ

  53. ௨৴ͷσόοάํ๏

  54. Network Link ConditionerͰϥϑʹ࣮ػσόοά 54

  55. CharlesͰৄࡉ·Ͱσόοά - ௨৴ͷϦΫΤετ΍ϨεϙϯεΛݟ͍ͨ - ಛఆͷ௨஌ͷΈΛࣦഊ͍ͤͨ͞ 55 Charles: https://www.charlesproxy.com/

  56. ·ͱΊ - ΩϟογϡΛੵۃతʹදࣔ - ద੾ͳදݱͰϢʔβʹϑΟʔυόοΫ - ॏ͍ॲཧ͸όοΫάϥ΢ϯυͰ௨৴͢Δ 56

  57. ௨৴؀ڥ͕ෆ҆ఆͰ΋ࡉ෦·ͰؾΛ഑ͬͯ
 ৺஍Α͍ମݧΛಧ͚Α͏ʂ

  58. Your business network

  59. ࢀߟࢿྉ - ΠϯυͷΠϯλʔωοτ؀ڥͱͷઓ͍ํ
 https://www.slideshare.net/kenichitatsuhama/ss-112660510 - Πϯυͷ௿଎ͳωοτϫʔΫ؀ڥͷ߈ུ๏
 https://www.slideshare.net/kenichitatsuhama/ss-103588833 - Sansan Builders

    Box (ฐࣾϒϩά)
 https://buildersbox.corp-sansan.com/entry/2019/02/27/165648 - Πϯλʔωοτճઢͷ଎౓ςετ Fast.com
 https://fast.com/ja/ - Feedback - User Interaction - iOS Human Interface Guidelines
 https://developer.apple.com/design/human-interface-guidelines/ios/user-interaction/feedback/ 59