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

Fight Xcode Project with Golang

Fight Xcode Project with Golang

Kyobashi.go #1
Parse xcodeproj/project.pbxproj by Golang
https://github.com/mpon/xgodeproj

Masato Oshima

August 25, 2015
Tweet

More Decks by Masato Oshima

Other Decks in Programming

Transcript

  1. Fight Xcode Project
    Kyobashi.go #1

    View full-size slide

  2. Masato Oshima
    github.com/mpon
    @_mpon
    ಢ໦ݝ๕լ܊ग़਎
    iOS Developer

    View full-size slide

  3. ίϚϯυϥΠϯ͔Β
    νΣοΫ͍ͨ͠

    View full-size slide

  4. $-*πʔϧΛ࡞ΔͳΒ
    (P

    View full-size slide

  5. िؒલͷ๻

    View full-size slide

  6. ࢝ΊΑ͏ͱͨ͠ͱ͖ʹ
    ॳ৺ऀ͕
    ೰ΉϙΠϯτ

    View full-size slide

  7. (01"5)໰୊
    ɾ͋ͱ͋ͱऔΓฦ͠ͷ͔ͭͳ͍͜ͱ
    ʹͳͬͨΒͲ͏͠Α͏ɾɾ
    ɾͱΓ͋͑ͣ)0.&HPʹͨ͠

    View full-size slide

  8. ΤσΟλ໰୊
    ɾ*%&͔ΤσΟλ͔બ΂Δ͕ɾɾ
    ɾͱΓ͋͑ͣ"UPNʹͨ͠

    View full-size slide

  9. σόοά໰୊
    ɾGNU1SJOUMOͰ͕Μ͹Δ
    ɾσόοΨ΍Γํ෼͔Βͳ͍
    ɾHPJOTUBMMίϚϯυ࣮ߦ

    View full-size slide

  10. ґଘؔ܎໰୊
    ɾ࣮ߦͨ͋͠ͱΤϥʔ
    ɾϥΠϒϥϦ͕Կ͔࢖ͬͯΔ
    ɾΤϥʔ͕ى͖͔ͯΒHPHFU

    View full-size slide

  11. ؒҧͬͯΔ͔΋͠Εͳ͍͚Ͳ
    ͱΓ͋͑ͣ΍ͬͯΈΔ

    View full-size slide

  12. ίϚϯυϥΠϯπʔϧ
    ͷ࡞Γํ

    View full-size slide

  13. TDB⒎PME࠷ߴ

    View full-size slide

  14. $ ./xgodeproj
    NAME:
    xgodeproj -
    USAGE:
    xgodeproj [global options] command [command options]
    [arguments...]
    VERSION:
    0.1.0
    AUTHOR(S):
    Masato Ohshima
    COMMANDS:
    list
    help, h Shows a list of commands or help for one command
    GLOBAL OPTIONS:
    --help, -h show help
    --version, -v print the version

    View full-size slide

  15. $ ./xgodeproj
    NAME:
    xgodeproj -
    USAGE:
    xgodeproj [global options] command [command options]
    [arguments...]
    VERSION:
    0.1.0
    AUTHOR(S):
    Masato Ohshima
    COMMANDS:
    list
    help, h Shows a list of commands or help for one command
    GLOBAL OPTIONS:
    --help, -h show help
    --version, -v print the version
    ੜ੒͚ͨͩ͠Ͱ
    ΍ͬͨײग़Δ

    View full-size slide

  16. 9DPEFͷ
    ϓϩδΣΫτϑΝΠϧ
    Λύʔε͍ͨ͠

    View full-size slide

  17. ݹ͍1MJTUܗࣜ

    View full-size slide

  18. 9DPEFͷQSPKFDU͸
    KTPOʹม׵Ͱ͖Δ

    View full-size slide

  19. (PͰKTPOΛύʔε͢Δ
    wܕΛఆٛͯ͠6ONBSTIBM
    wJOUFSGBDF\^ͰશͯܕνΣοΫ
    wTJNQMF+TPO͍ͬͯ͏ϥΠϒϥϦ

    View full-size slide

  20. (PͰKTPOΛύʔε͢Δ
    wܕΛఆٛͯ͠6ONBSTIBM
    wJOUFSGBDF\^ͰશͯܕνΣοΫ
    wTJNQMF+TPO͍ͬͯ͏ϥΠϒϥϦ
    ܕ͕ܾ·ͬͯͳ͔ͬͨͷͱɺ
    ͬ͘͞ͱࡶʹ΍Γ͔ͨͬͨ

    View full-size slide

  21. 1#9'JMF3FGFSFODF
    ϓϩδΣΫτϑΝΠϧͰɺ
    ϑΝΠϧͷࢀরΛද͢ηΫγϣϯ
    1#9(SPVQ
    ϓϩδΣΫτϑΝΠϧͰɺ
    άϧʔϓߏ଄Λද͢ηΫγϣϯ

    View full-size slide

  22. 1#9'JMF3FGFSFODF

    View full-size slide

  23. $PNQPTJUF1BUUFSO
    ɾσΟϨΫτϦߏ଄Λ࣋ͭ΋ͷʹ༗ޮ
    ɾσΟϨΫτϦͱϑΝΠϧΛಉҰͷ΋ͷͱͯ͠ॲཧΛ͢Δ
    ͜ͱͰಉ͡ॲཧΛݺͼग़ͤΔ
    ɾࠓճͰݴ͑͹(SPVQͱ'JMF3FGFSFODF
    ɾର৅͕(SPVQͩΖ͏͕'JMF3FGFSFODFͩΖ͏͕ಉ͡ϝ
    ιουΛݺ΂Δͱ͍͏͜ͱ

    View full-size slide

  24. άϧʔϓͱϑΝΠϧΛ
    ಉҰͷ΋ͷͱΈͳ͢

    View full-size slide

  25. ҧ͏΋ͷΛಉ͡ͱݟͳͤΔͷʁ

    View full-size slide

  26. *OUFSGBDFΛఆٛ

    View full-size slide

  27. *OUFSGBDFΛ࣮૷
    'JMF3FGFSFODF (SPVQ

    View full-size slide

  28. (PͰ͸͜Ε͚ͩͰ
    ͜ΕͰಉ͡(SPVQ&OUSZ
    ͱ͍͏UZQFͱͯ͠ѻ͑Δ
    Α͏ʹͳͬͨͧ

    View full-size slide

  29. ͍ͭʹ׬੒ʁ

    View full-size slide

  30. (SPVQߏ଄ͷ
    ࠶ؼॲཧͲ͏ॻ͘ʁʁ

    View full-size slide

  31. pMFQBUIͷXBMLΛύΫΔ

    View full-size slide

  32. BUPN͕༏लɻ*%&ͳͯ͘΋Αͦ͞͏ʁ
    HPGNUͷ͓͔͛Ͱؒҧͬͯͳͦ͞͏ͱࢥ͑ͯॳ৺ऀ͸ָɻ
    ม਺໊ͷ୹͘͢Δͷ͕·ͩ׳Εͳ͍ɻ
    pMF FSSIPHF
    Έ͍ͨͳॻ͖ํ͸׳Εͨɻ
    QBOJDͷ࢖͍Ͳ͜Ζ͕෼͔Βͳ͍ɻ
    σόοΨͳ͍ͷ͔ͳʁ
    ґଘؔ܎ͷϑΝΠϧ͸ʁ
    DPOUBJOTͱ͔͋Γͦ͏ͳϝιου͕ͳ͍ɻ
    JOUFSGBDF\^͍ͬͯ͏ͷͰશͯͷܕΛड͚ೖΕΔ͍ͬͯ͏ͷ͓΋͠Ζ͍
    ഁյతͳϝιου͔͠ͳ͍ʁ TPSU

    ࠶୅ೖېࢭͳએݴͰ͖ͳ͍
    ؔ਺ܕͬΆ͍NBQͱ͔΍Γ͍ͨ
    TXJUDI͕ศརͩɻJGFMTFͷ୅ΘΓʹͳΔ
    OFXͷ࢓ํ͕͍Ζ͍Ζ͋Γ͗ͯ͢ਖ਼ղ෼͔ΒΜ
    ϙΠϯλ͚ͭͯ΋͚ͭͳͯ͘΋͍͍ʁ
    &OVN͍ͨ͠
    ύοέʔδ໊ͱม਺໊͕͔ͿͬͨΜ͚ͩͲͲ͏͢ΓΌ͍͍ʁ

    View full-size slide