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

iOSでのSkyWay開発の勘所とTips

 iOSでのSkyWay開発の勘所とTips

WebRTC Meetup Tokyo #16
https://atnd.org/events/89599

B4e8461292c2cccef061741f8ba1ac3f?s=128

Ken Jumbo Haneda

August 25, 2017
Tweet

More Decks by Ken Jumbo Haneda

Other Decks in Programming

Transcript

  1. IOSͰͷSKYWAYΛ࢖ͬͨ ΞϓϦ։ൃͷצॴͱTIPS WebRTC Meetup Tokyo #16 Kentaro Haneda (@jumboOrNot)

  2. None
  3. IOSͰͷSKYWAYΛ࢖ͬͨ ΞϓϦ։ൃͷצॴͱTIPS WebRTC Meetup Tokyo #16 Kentaro Haneda (@jumboOrNot)

  4. ࣗݾ঺հ ▸ Mobile Developer@RareJob
 
 
 ▸ Lead Developer@Landskip Kentaro

    Haneda (@jumboOrNot) ˎδϟϯϘͱݺΜͰ͍ͩ͘͞
  5. ɾडߨऀ਺50ສਓͷΦϯϥΠϯӳձ࿩αʔϏε
 ɾ࠾༻཰1%ͷ༏উͳߨࢣͱ25෼187ԁͰ࿩ͤ·͢
 ɾ6࣌ ~ 25࣌·Ͱຖ೔։ߨ
 ɾ59%ͷਓ͕ॳ৺ऀ
 ɾແྉମݧ࣮ࢪதʂʂ Ϩοεϯ͸SkypeͰఏڙ͍ͯ͠·͢ʂ

  6. ver1.4.0ΑΓϦϦʔε͠·ͨ͠
 ʮεϚϗͰϨοεϯʯ SkyWayΛ࢖ͬͨWebRTCͰͷϨοεϯఏڙΛ
 Ұ෦։์͠·͢ 
 ʢiOSܦ༝ͷແྉମݧϨοεϯͷҰ෦ߨࢣͷΈʣ

  7. ΋͏εΧΠϓͰྦͨ͘͠ͳ͍ฐࣾͷΞϨ͕٧·ͬͯ·͢ ઌੜͷإΛݟͯ࿩͠ͳ͕Β
 ΞϓϦΛಈ͔ͤΔ ڭࡐΛݟͳ͕ΒεϚϗͰϨοεϯ

  8. ΫϥΠΞϯτدΓͷ࿩Λ͠·͢ ࠓ೔ͷ͓࿩ ▸ εϚϗͰϨοεϯβΛ࡞Δʹ͋ͨͬͯͷ ▸ SkyWay SDKΛ࢖ͬͨMVVM+Rxͳ࣮૷ + α ▸

    ௨࿩ΞϓϦʹ͓͚ΔTips ▸ SkyWaySDK࢖ͬͯݟͯͷײ૝
  9. SKYWAY SDKΛ࢖ͬͨMVVM+RXͳ࣮૷ SKYWAYSDKͱIOS ▸ WebRTCͰͷ࣮૷࣌ͷ೰ΈͲ͜Ζ ▸ Πϕϯτ؅ཧ͕ෳࡶʹͳΔʢঢ়ଶ͕ଟ͍ʣ ▸ 1ը໘಺ͰUIͷมߋ͕සൟʹى͖Δ ▸

    ݖݶͷऔಘ΋࣮૷͍ΔΑͶ…
  10. SKYWAY SDKΛ࢖ͬͨMVVM+RXͳ࣮૷ ͦΜͳͱ͖͸RxSwift

  11. SKYWAY SDKΛ࢖ͬͨMVVM+RXͳ࣮૷ 1෼Ͱཧղ͢ΔRXSWIFT ஋ͷมߋΛ؂ࢹͯ͠ɺผͷ஋Λมߋͨ͠Γ
 UIʹͦΕΛ൓ө͢Δ࢓૊Έ ը໘͕ʮϝχϡʔల։ঢ়ଶʯʹͳͬͨ࣌ʹ
 ө૾ͷҐஔΛม͑Δ࣮૷Λ͍ͯ͠Δ
 ࠨͷྫͰݴ͑͹ʮը໘ͷঢ়ଶʯΛ؂ࢹͯ͠
 RemoteStreamͷදࣔઌΛมߋ͍ͯ͠Δ

  12. SKYWAY SDKΛ࢖ͬͨMVVM+RXͳ࣮૷ iOS Architecture Patterns
 https://techblog.badoo.com/blog/2016/03/21/ios-architecture-patterns/ ɾঢ়ଶͱUIΛߏ੒͢Δσʔλ͸શͯViewModel΁ɺ͜ΕΛ RxSwiftͰBindingʢ઀ଓ͢Δʣ
 ɾFat ViewControllerΛආ͚ͯɺSkyWaySDK͔Βड͚औΕ

    ΔΠϕϯτΛ੔ཧ͢Δ
  13. SKYWAY SDKΛ࢖ͬͨMVVM+RXͳ࣮૷ Skywayؔ࿈ͷ஋ΛҰ෦Rx ԽɺStreamΛ؅ཧ͠΍͘͢ ͢Δ ΫϥΠΞϯτଆͷϚΠΫͷ on/off΍ϏσΦͷon/off΋UI ͱඥͮ͘ͷͰRxԽ ೝূ৘ใ΋Ϣʔβʔͷઃఆͷ มߋʹґଘ͢ΔͷͰRxԽ

    ߨࢣͷೖୀࣨ΍௨৴ͷঢ়ଶ ΛStatusͱͯ࣋ͭ͜͠ͱͰม ߋຖͷUIมߋΛϋϯυϦϯά
  14. SKYWAY SDKΛ࢖ͬͨMVVM+RXͳ࣮૷ ංେԽ͕ͪ͠ͳө૾෦෼΋ContainerͰ෼཭
 ɾө૾Λ؅ཧ͢Δ෦෼ͱϨοεϯΛ؅ཧ͢ΔϩδοΫ͸෼཭ ͢Δ

  15. SKYWAY SDKΛ࢖ͬͨMVVM+RXͳ࣮૷ https://gist.github.com/jumbo-in-Jap/72e6338c16d7e1fc63d83b40b7bce399 ΋ͬͱRXͷԸܙΛड͚Α͏ Ex. ྫ͑͹30ඵ͝ͱʹ࠶઀ଓॲཧΛߦ͍͍ͨ

  16. SKYWAY SDKΛ࢖ͬͨMVVM+RXͳ࣮૷ ΋ͬͱRXͷԸܙΛड͚Α͏ Ex. ྫ͑͹ϚΠΫ΋Χϝϥ΋ڐՄ͕औΕͨΒϦΫΤετ͍ͨ͠ https://gist.github.com/jumbo-in-Jap/948754b7a315571bbe0e0ac726117bf7

  17. + ʹ εοΩϦ

  18. ௨࿩ΞϓϦʹ͓͚ΔTIPS εϐʔΧʔ໰୊ iPhoneͷεϐʔΧʔͷҐஔ͸͜͜2ͭɻ
 SkywayͰσϑΥϧτͰԻ͕ग़Δͷ͸
 ←ͬͪ͜Ͱ͋Δɻ
 
 ͬͪ͜͸ͱͯ΋Ի͕খ͍͞ɾɾɾ

  19. εϐʔΧʔ໰୊ͷղܾࡦ ௨࿩ΞϓϦʹ͓͚ΔTIPS https://gist.github.com/jumbo-in-Jap/7b4ee398c489c0072cf756720881dad5 Ի੠ͷग़ྗઌΛมߋ͢Δɺͨͩมߋ͢Δ͚ͩ͡Όͳ͘ΠϠϗϯΛ͞͠ ͍ͯΔͱ͖͸มߋͤͣɺΠϠϗϯ͕ൈ͔ΕͨΒมߋ͢Δɻ

  20. ௨࿩ΞϓϦʹ͓͚ΔTIPS Ұॹʹ࢖͏ͱศརϥΠϒϥϦ ▪ chatΛ࣮૷͍ͨ͠ͳΒ
 JSQMessagesViewController
 http://jessesquires.github.io/JSQMessagesViewController/ ▪ 3G/WifiͷऔಘΛ͍ͨ͠ͳΒ
 ReachabilitySwift
 https://github.com/ashleymills/Reachability.swift

    ▪ ؆୯ͳϝοηʔδදࣔͳΒ
 Toast
 https://github.com/scalessec/Toast ▪ RxΛ࢖ͬͨΩʔϘʔυ؂ࢹ͸
 KeyboardObserver
 https://github.com/morizotter/KeyboardObserver
  21. ϢʔβʔΛϦΞϧλΠϜʹ༷ࢠݟΔ ௨࿩ΞϓϦʹ͓͚ΔTIPS

  22. ௨࿩ΞϓϦʹ͓͚ΔTIPS WEBRTCʹΑ͋͘Δπϥϛ ▪ ໰୊ͷ੾Γ෼͚͕೉͍͠
 σόΠεʁωοτϫʔΫʁϒϥ΢β಺ͷڐՄʁόʔδϣϯʁOS… ▪ Android͸ਏ͍
 ry)
 ▪ ঢ়ଶͷ؅ཧ͕೉͍͠


    ઀ଓ؅ཧʹΑΔίʔϧόοΫ ▪ Javascriptॻ͖ͨ͘ͳ͍
 ry)
  23. ௨࿩ΞϓϦʹ͓͚ΔTIPS WEBRTCʹΑ͋͘Δπϥϛ ▪ ໰୊ͷ੾Γ෼͚͕೉͍͠
 σόΠεʁωοτϫʔΫʁϒϥ΢β಺ͷڐՄʁόʔδϣϯʁOS… ▪ Android͸ਏ͍
 ry)
 ▪ ঢ়ଶͷ؅ཧ͕೉͍͠


    ઀ଓ؅ཧʹΑΔίʔϧόοΫ஍ࠈ ▪ Javascriptॻ͖ͨ͘ͳ͍
 ry) IOSͳΒׂͱղܾ ࠷ॳʹ࡞Δ΋ͷͱͯ͠Φεεϝ
  24. SKYWAYSDK࢖ͬͯݟͯͷײ૝ ͱͯ΋ศརͰແྉͰ࢖͑ͯخ͍͠ͷͰ͕͢ɾɾɾ
 
 ɾSDK͕Ϟμϯͳ࣮૷ʹͳͬͯͳ͍
 ɾΧϝϥɾϚΠΫͷݖݶ؅ཧ΋SDKʹೖΕ͍ͨ
 ɾαϯϓϧݟͯͯϦϑΝΫλͨ͘͠ͳͬͨ ײँͷϓϧϦΫૹΓ͍ͨؾ͕࣋ͪժੜ͑·ͨ͠
 ʢͱΓ͋͑ͣαϯϓϧʹૹΓ·ͨ͠ https://github.com/skyway/ webrtc-handson-native/pull/1ɹɺͱΓ͋͑ͣwebRTC৮ͬͯΈΑ

    ͏ͬͯํʹΦεεϝͰ͢ɻʣ
  25. ͪ͜ΒͷΠϕϯτͰ΋࿩͠·͢ͷͰɺ
 ͥͻͥͻ͓ٓ͘͠ئ͍͠·͢ 9/16 11:00 TrackCͰ
 ʮ྆OS΍ΔϚϯͱ͍͏બ୒ʯ
 ͱ͍͏࿩Λ͠·͢ɻ