Xcode8 で開発はどうかわったのか

Xcode8 で開発はどうかわったのか

iOSオールスターズ2
https://eventdots.jp/event/602872

0a86666ca90016b2a28289dda921b0d7?s=128

Toshihiro Morimoto

November 20, 2016
Tweet

Transcript

  1. 2016/11/20 iOSΦʔϧελʔζ2 @dealforest Toshihiro Morimoto Xcode8 Ͱ։ൃ͸Ͳ͏͔Θͬͨͷ͔

  2. ࣗݾ঺հ

  3. Works

  4. ຊ೔ͷΞδΣϯμ • Visual Debugging • App Signing • Xcode Plugin/Extension

    • ͓·͚ - TSan and Static Analysis
  5. ࠓ೔͠ͳ͍࿩ • iOS • Storyboard • Swift • Xcode 7.3.1

    -> Xcode 8 ΁ͷҠߦ
  6. Visual Debugging

  7. Visual Debugging • View Debugging • FPS Performance Gauge •

    Memory Graph Debugging
  8. View Debugging

  9. View Debugging • ϘλϯΛԡ͔ͯ͠Βͷ࣮ߦ଎౓͕ 70% ͸΍͘ͳͬͨ • transform, blur ͞Ε͍ͯͯ΋ਖ਼֬ʹϨϯμϦϯά͞ΕΔ

    • Ϋϥεఆٛʹඈ΂Δ • ΞυϨεͰϑΟϧλϦϯάͰ͖Δ • ݱࡏͷ AutoLayout ͷ੍໿Λ֬ೝͰ͖Δ
  10. ࣮ࡍʹ༗ޮʹ AutoLayout ͷ֬ೝ͕ग़དྷΔ

  11. FPS Performance Gauge

  12. FPS Performance Gauge

  13. Memory Graph Debugging

  14. ͜Ε͕ͱͯͭ΋ͳ͘ศརʂʂʂ

  15. Memory Leak Λ ݟ͚ͭΔͱ͖ʹྗΛൃش͠·͢ʂ

  16. ͜Ε͚ͩͷͨΊʹ Xcode 8 ʹҠߦͨ͠ͱݴͬͯ΋ɹɹ աݴͰ͸͋Γ·ͤΜ

  17. ͳʹΑΓோΊ͍ͯΔͱ ςϯγϣϯ͕͕͋Γ·͢

  18. ! Λλοϓ͢Ε͹ leak ͍ͯ͠Δ object Λදࣔ

  19. 410 - Visual Debugging with Xcode

  20. App Signing

  21. Signing Certificate per Mac

  22. ؾܰʹ Reset Λԡͯ͠͠·͏ͱ

  23. ͋Εʁʁ ϏϧυͰ͖ͳ͘ͳͬͨΜ͚ͩͲ…

  24. ((ƅЧƅ)); ŜƄŞŲƄſ

  25. Signing Certificate per Mac

  26. Signing Certificate per Mac

  27. Signing in Xcode

  28. Signing in Xcode

  29. None
  30. Signing in Xcode

  31. Xcode 7

  32. Xcode 8

  33. Apple ͕ఏএ͢Δ Best Practice

  34. Development • Use automatic • Add all developers to team

    • Use the capabilities tab
  35. Manual • Don’t set CODE_SIGN_IDENTITY • Use the new general

    tab UI • Use the capabilities tab • Migrate to automatic
  36. 401 - What’s New in Xcode App Signing

  37. ͍͍͜ͱ͹͔ͬΓʹฉ͑͜Δʂʂ

  38. ·ɺͦΜͳΘ͚ͳ͍Ͱ͢ΑͶ

  39. fastlane, Enterprise ͕ བྷΜͰ͘ΔͱΊΜͲ͍͘͞ʂʂ

  40. ΊΜͲ͍͘͞ϙΠϯτ • Team ͕ҟͳΔ - Automatic Signing ͩͱෳ਺νʔϜΛ·ͨ͛ͳ͍ • BUNDLE

    IDENTIFIER ͕ҟͳΔ - Company ΞΧ΢ϯτͰ Automatic Signing Ͱɹ Ϗϧυ͸Ͱ͖Δ - Automatic Signing Ͱ archive ͕Ͱ͖ͳ͍
  41. ͔͠͠։ൃ࣌͸ Automatic Signing Λ࢖͍͍ͨʂ

  42. Ͳ͏͢Δͷ͔

  43. Enterprise ରԠํ๏ -खಈϏϧυ- 1. ֘౰͢Δ Cert, Provisioning Profile ΛΠϯετʔϧ 2.

    Customised Signing Λ࢖͏ 3. ഑෍༻ͷ Configuration(scheme) ʹ Provisioning Profile Λબ୒ 4. archive -> export
  44. Enterprise ରԠํ๏ -fastlane- खಈϏϧυͱಉ͡Α͏ͳ͜ͱΛ͢Ε͹͍͍ 1. gym Ͱ࣮ߦ͢Δલʹ fastlane-plugin- update_project_codesigning Λ࢖ͬͯ

    Customised Signing ʹมߋ 2. Cert, Provisioning Profile ͷࢦఆΛ xcconfig ʹॻ͍ͯ ͓͘ 3. ഑෍༻ͷ Configuration ʹ xcconfig Λࢦఆ͓ͯ͘͠ 4. gym Ͱ࣮ߦ͢Δޙʹ Automatic Signing ʹมߋ
  45. xcconfig ͷαϯϓϧ CODE_SIGN_IDENTITY = 1Q5231V7YW // CODE_SIGN_IDENTITY = iPhone Distribution:

    dealforest (1Q5231V7YW) PROVISIONING_PROFILE_SPECIFIER = PROVISIONING_PROFILE_app = f3f8281b- a115-4529-8dnd-60e111d92fae PROVISIONING_PROFILE = $(PROVISIONING_PROFILE_$ (WRAPPER_EXTENSION))
  46. ͜ͷลΓ͸΋͏গ͠஌ݟ͕ͨ·Ε͹ ϒϩάʹॻ͜͏͔ͳͱࢥ͏ͬͯ·͢

  47. Xcode Plugin/Extension

  48. Xcode Plugin • ඇެࣜͰ Xcode ͷ Plugin Λ࡞Δ͜ͱ͕Ͱ͖·ͨ͠ • Alcatraz

    ͱ͍͏ Package Manager ΋͋Γ·ͨ͠ • Xcode 8 ʹͳ͔ͬͯΒ͸ެࣜͰ Xcode Extension ͕ αϙʔτ͞Ε࢖͑ͳ͘ͳΓ·ͨ͠ (ؤுΕ͹࢖͑Δ)
  49. Xcode 8 Ͱ Xcode Plugin Λ ࢖͏ํ๏

  50. ࢍ൱྆࿦͋Δͱࢥ͍·͕͢

  51. Xcode ͕ Apple ʹΑͬͯॺ໊͞ΕΔ Α͏ʹͳͬͨͷͰॺ໊Λ֎ͤ͹͍͍

  52. Xcode ͷॺ໊ͷ֎͠ํ • steakknife/unsign Λ࢖ͬͯࣗྗͰॺ໊Λ֎͢ https://gist.github.com/dealforest/ c5a5362005bce1a4280c34d18a5bc893 • fpg1503/MakeXcodeGr8Again Λ࢖͏

  53. ྆ํͱ΋΍͍ͬͯΔ͜ͱ͸ಉ͡Ͱ ॺ໊Λ֎͍ͯ͠Δ͚ͩͰ͢

  54. ͋ͱ͸ Xcode Plugin ʹ ࢖͍͍ͨ Xcode ͷ UUID Λ௥Ճ͢Δ

  55. UUID ͷ௥Ճํ๏ $ find ~/Library/Application\ Support/Developer/ Shared/Xcode/Plug-ins -name Info.plist -maxdepth

    3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID`
  56. Xcode Extension • Xcode 8 ͔Βਖ਼ࣜʹαϙʔτ • ݱঢ় Plugin ͱ͸ҟͳΓͰ͖Δ͜ͱ͸ݶఆ͞Ε͍ͯΔ

    • ΞϓϦؒΛ XPC Ͱ௨৴࣮ͯ͠૷͍ͯ͠Δ
  57. Xcode 8 beta ͕ग़ͨ࣌ʹ͸ গ͠੝Γ্͕͍͕ͬͯͨ...

  58. ࠓ Xcode Extension ͷ͜ͱΛ ݴ͍ͬͯΔਓ͸୭΋͍ͳ͍

  59. ͱ͍͏Θ͚Ͱ Xcode Extension ͷ ݱঢ়ʹ͍͓ͭͯ࿩͠͠·͢

  60. Ͳ͏͢Ε͹࢖͑ΔΑ͏ʹͳΔͷ͔ • Xcode Extension ʹରԠ͍ͯ͠Δ Mac App ΛΠϯ ετʔϧ͢Ε͹࢖͑ΔΑ͏ʹͳΔ •

    App Store or GitHub or DMG Download
  61. ͱ͍͏Θ͚Ͱ App Store ΛݟͯΈ·͠ΐ͏

  62. App Store

  63. (ͭд⊂)ŠƄŢŠƄŢ

  64. App Store

  65. App Store

  66. ʢʀƅЧƅʣ …ʂʁ

  67. ҧ͍͕ͳʹ΋ͳ͍ͩͱ…

  68. Xcode Extension Ͱ͋Δ͜ͱ͕ Θ͔Βͳ͍…

  69. ΧςΰϦ͕͋ΔΘ͚Ͱ΋ͳ͍͠…

  70. ͭΒ͍…

  71. Sierra ͩͱ͋Δͷ͔΋… ͱ୶͍ظ଴Λͯ͠·͢

  72. ͦΜͳ͋ͳͨͷͨΊʹ

  73. tib/awesome-xcode-extensions

  74. ࣮ࡍʹಈ࡞Ͱ͖Δঢ়ଶʹ ͳ͍ͬͯΔ͔ͷ֬ೝ

  75. System Preference -> Extensions

  76. ͓·͚ - TSan and Static Analysis

  77. Thread Sanitizer

  78. Diagnostics Ͱ༗ޮʹ͢Δ

  79. Diagnostics Ͱ༗ޮʹ͢Δ

  80. ͨͩ͠࢖͑Δঢ়گ͸ݶΒΕ͍ͯ·͢

  81. None
  82. Static Analysis

  83. Product -> Analyze

  84. 412 - Thread Sanitizer and Static Analysis

  85. ·ͱΊ Xcode 8 ʹͳ͔ͬͯΒ௥Ճ͞Εͨػೳ͸ͨ͘͞Μ͋Γ·͢ɻ ຊ೔͸ͦͷҰ෦Λ঺հ͠·ͨ͠ɻ iOS 10 ͱ͸ҟͳΓࠓ͔ΒͰ΋ɺ͙͢ʹͰ΋࢖͑Δ΋ͷ͕ͨ ͘͞Μ͋Γ·͢ɻ

  86. গ͠Ͱ΋σόοάϥΠϑ͕ շదʹͳΕ͹޾͍Ͱ͢

  87. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠