Time for Xcode Behavior

Time for Xcode Behavior

61a68b2172503ecdf7a7f7757df56071?s=128

Tachibana Kaoru

February 22, 2018
Tweet

Transcript

  1. Time for Xcode Behavior! potato tips 2018/02/22 Tachibana Kaoru

  2. About Me • @TachibanaKaoru • iOS freelance engineer • This

    years theme : No Travel, No Work! • Bali όϦౡ • Greece ΪϦγϟ
  3. Xcode Source Code Extension • WWDC 2016 Ͱ঺հ • Apple's

    Xcode official extension!
  4. ΍ͬͨʙʂ ެࣜϓϥάΠϯͩʂ

  5. Ͱ΋;ͨΛ͚͋ͯ ΈΔͱ……

  6. Xcode Source Code Extension • ഑෍΋࡞੒΋σόοά΋େมͩ͠……ɻ • ಈ࡞ʹ͔ͳΓ੍ݶ͕͋Δ͠……ɻ • GUI΋දࣔͰ͖ͳ͍͠……ɻ

    ʢৄ͘͠͸ɺ@takasek͞Μͷ Xcode Source Editor Extensionͷ ੈքΛࢀরʣ
  7. ͜͜Ͱ Xcode Behavior!

  8. Xcode Behaviorͱ͸ • Xcode ͷmenu͔ΒىಈͰ͖Δಠࣗ εΫϦϓτ • ଠݹͷੲ͔Β࢖͑·͢ɻ

  9. XcodeͷઃఆͷBehaviorsը໘Ͱઃఆ

  10. What can it do? Xcode Source Code Extension Xcode Behavior

    XcodeͷΤσΟλʔͰࠓͻΒ ͍͍ͯΔϑΝΠϧͷத਎Λม ߋ͢Δ͜ͱ͔͠Ͱ͖ͳ͍ɻ Xcode͔Βಠཱͯ͠ಈ࡞͢Δ εΫϦϓτͳͷͰɺͳΜͰ΋ Ͱ͖Δɻ
  11. context from Xcode... Xcode Source Code Extension Xcode Behavior XcodeͰ։͍͍ͯΔϑΝΠϧ

    ͷத਎ͷΈऔಘͰ͖Δɻ ؀ڥม਺ͰࠓXcodeͰ։͍ͯ ͍ΔϓϩδΣΫτ͕Θ͔Δɻ
  12. Editing, Distributing... Xcode Source Code Extension Xcode Behavior ࡞੒΋഑෍΋มߋ΋ෳࡶ ࣗ෼Ͱॻ͍ͨεΫϦϓτΛࣗ

    ݾ੹೚Ͱ࢖͏εΩʔϜͳͷ Ͱɺ࡞੒΋഑෍΋มߋ΋ָ
  13. show GUI Xcode Source Code Extension Xcode Behavior GUIΛදࣔͰ͖ͳ͍ GUIΛදࣔͰ͖ΔɻAppKit΋

    ΋ͪΖΜՄɻ
  14. Programming Language Xcode Source Code Extension Xcode Behavior XcodeͰίϯύΠϧͰ͖Δݴ ޠͷΈ

    εΫϦϓτͱͯ͠࢖͑Δݴޠ ͳΒͳΜͰ΋ՄɻSwiftͰ΋ɺ γΣϧεΫϦϓτͰ΋ɺapple scriptͰ΋ɺrubyͰ΋ɻ
  15. Hello World with Apple Script #!/usr/bin/osascript set theDialogText to "Hello

    World!" display dialog theDialogText
  16. ͯ͞ɺ͜͜Ͱɺ࣮ϓϩδΣΫτͰ࢖͑ ΔXcode BehaviorͷαϯϓϧΛݟͯ Έ·͠ΐ͏ɻ

  17. Markdown in Xcode

  18. Markdown in Apple Sample • preview mode

  19. Markdown in my project... • not preview mode!

  20. to change makrdown's preiew mode ϓϩδΣΫτ಺ʹಛఆͷ໊લͷplistϑΝΠϧΛ͓͘ͱɺXcode ͰϚʔΫμ΢ϯϑΝΠϧ͕ϓϨϏϡʔϞʔυͰදࣔ͞ΕΔΑ͏ ʹͳΓ·͢ɻ Xcode9ͰͷMarkdownϨϯμϦϯά -

    http://www.toyship.org/ archives/2541
  21. script to change preview mode of markdown in Xcode #!/usr/bin/swift

    import Foundation let env = ProcessInfo.processInfo.environment let manager = FileManager.default let fileNakami = "...." if let pathValue = env["XcodeProjectPath"] as? String{ var fileURL = URL(fileURLWithPath: pathValue) fileURL.appendPathComponent(".xcodesamplecode.plist") try! fileNakami.write(to: fileURL, atomically: true, encoding: String.Encoding.utf8) } https://gist.github.com/TachibanaKaoru/ 4ffa5dda9b86b4f0ef1a02e064ba34e9
  22. ·ͱΊ • Xcode Behaviorศརʂ • ଠݹͷੲ͔Β࢖͑ΔٕͰ͕͢ɺࠓͦ͜Έͳ͓͞ΕΔ΂͖ʂ