Slide 1

Slide 1 text

Introducing Xcode Editor Extension 2016/06/22 FiNC WWDCৼΓฦΓษڧձ @dealforest Toshihro Morimoto

Slide 2

Slide 2 text

ࣗݾ঺հ

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Έͳ͞Μ iPhone Simulator Λ ͲΕ͘Β͍ೖΕ͍ͯ·͔͢ʁʁ

Slide 5

Slide 5 text

Xcode Editor Extension, Xcode Source Editor Extension ͷ ͓࿩Λࠓ೔͸͠·͢

Slide 6

Slide 6 text

ͦͷલʹ

Slide 7

Slide 7 text

࡯͠ͷ͍͍Έͳ͞Μ͸ ͓෼͔Γ͔ͱࢥ͍·͢

Slide 8

Slide 8 text

RIP Xcode Plugin

Slide 9

Slide 9 text

൵͍͠ͷͰ ΍͚ञʹ෇͖߹͍ͬͯͩ͘͞

Slide 10

Slide 10 text

৑ஊ͸͓͖ͯ͞ ͦΕͰ͸ຊ୊ʹೖ͍͖ͬͯ·͢

Slide 11

Slide 11 text

Xcode Editor Extension ͞Θͬͨਓ͍·͔͢ʁ

Slide 12

Slide 12 text

Extension ͍ͬͯ͏໊લ͔Β ͓Θ͔Γ͍͚ͨͩΔΑ͏ʹ OS X Application ʹ෇ଐ͠·͢

Slide 13

Slide 13 text

࢖͍ํ • App Store ͔ΒΠϯετʔϧͯ͠ىಈ • ࣗલͰ .app Λ build ΋͘͠͸ download ͯ͠ /Applications ͔ ~/Applications ʹ഑ ஔͯ͠ىಈ

Slide 14

Slide 14 text

Application Ͱ഑෍͢Δ ͱ͍ͬͨײ͡Ͱ͢Ͷ

Slide 15

Slide 15 text

Extension ʹͨ͠ϝϦοτ • Stability • Security • Speed

Slide 16

Slide 16 text

ͭ·Δͱ͜Ζ XPC ʹͨ͠ͷͰ ҆શʹͳͬͨΑͬͯ͜ͱͰ͢Ͷ

Slide 17

Slide 17 text

ࡉ͔͍΋ͷ͸ϦϦʔεϊʔτΛ Έ͍ͯͩ͘͞ https://developer.apple.com/go/?id=xcode8-0-beta-release-notes

Slide 18

Slide 18 text

XPC ͱ͸ Access a low-level (libSystem) interprocess communication mechanism that is based on serialized property lists.

Slide 19

Slide 19 text

ཁ͢Δʹ binary plist Ͱ ϓϩηεؒ௨৴͢ΔΑ͏ʹͨ͠

Slide 20

Slide 20 text

Xcode XPC Source Editor Extension Application pid: 1xxxx pid: 2xxxx

Slide 21

Slide 21 text

࣮ߦ͞ΕΔλΠϛϯά • Add commands to the source editor • One extension, several commands • Edit text • Change selections

Slide 22

Slide 22 text

࣮ߦ͞ΕΔλΠϛϯά • ϝχϡʔ͔Β࣮ߦ • ίʔυΛฤू

Slide 23

Slide 23 text

ϝχϡʔ͔Β࣮ߦ

Slide 24

Slide 24 text

ίʔυΛฤू #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1)

Slide 25

Slide 25 text

ίʔυΛฤू #imageLiteral(resourceName: "sun")

Slide 26

Slide 26 text

ίʔυΛฤूͨ͠ͷΛ؂ࢹͯ͠ Կ͔มߋ͢Δ Extension ͷ࡞Γํ͸ ࣮͸·ͩΑ͘Θ͔ͬͯ·ͤΜ

Slide 27

Slide 27 text

SwiftLint for Xcode ͕ͦ͏ͳͷ͔΋ʁ ·ͩΩϟονΞοϓ͖͠Εͯ·ͤΜ https://github.com/norio-nomura/SwiftLintForXcode

Slide 28

Slide 28 text

macOS 10.11 El Capitan Ͱͷ஫ҙ sudo /usr/libexec/xpccachectl & reboot

Slide 29

Slide 29 text

Xcode Simulator

Slide 30

Slide 30 text

ࠇ͘ͳͬͨʂʂʂʂ

Slide 31

Slide 31 text

ͦͷଞ • widget Έ͍ͨʹ opt-out Ͱ͖ͳ͍ • shortcut ͸ Xcode ͷઃఆը໘Ͱࣗ෼Ͱ͢Δ • cancel bunner ͸ະ࣮૷

Slide 32

Slide 32 text

RIP Xcode Plugin

Slide 33

Slide 33 text

ͱݴ͍·͕࣮ͨ͠͸࢖͑·͢

Slide 34

Slide 34 text

Xcode8͔Βcode sign ͞ΕΔΑ͏ʹͳͬͨͷ͕ ݪҼͰ Plugin ͕ load ͞Εͳ͘ͳΓ·ͨ͠

Slide 35

Slide 35 text

ͭ·Γ͸ code sign Λফͤ͹ ࠓ·Ͱ௨Γ࢖͑Δͱ͍͏Θ͚Ͱ͢Ͷ

Slide 36

Slide 36 text

ͱ͍͏Θ͚Ͱͭ͘Γ·ͨ͠

Slide 37

Slide 37 text

※ Objective-C Ͱॻ͔Εͨ Plugin ͔͠ಈ͔ͳ͍͔΋ (ݕূத)

Slide 38

Slide 38 text

ࣗݾ੹೚Ͱ࣮ߦ͍ͯͩ͘͠͞

Slide 39

Slide 39 text

https://gist.github.com/dealforest/c5a5362005bce1a4280c34d18a5bc893

Slide 40

Slide 40 text

͜ΕΛ࣮ߦ͢Ε͹ ඇূ໌ͷόΠφϦʹͳΓ·͢

Slide 41

Slide 41 text

https://github.com/alcatraz/Alcatraz/issues/475#issuecomment-226090731

Slide 42

Slide 42 text

·ͱΊ ͠͹Β͘ͷؒ Xcode Editor Extension ͸Ͱ͖ Δ͜ͱ͕ݶΒΕ·͢ ͱ͸͍͑ɺ͜ͷ࢓૊Έ͸ૉ੖Β͍͠ͱࢥ͏ ͷͰ௕͍໨ͰݟकΓ·͠ΐ͏

Slide 43

Slide 43 text

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