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

Installation my own framework with Carthage

Installation my own framework with Carthage

2015年12月22日に開催された「関西モバイルアプリ研究会#9」の発表資料です。

Carthageで自作クソライブラリをインストールしてみました。
ほぼ@ikesyoさんが発表済みの内容になります。
それでも自分で試したので発表します😅

Satoshi Hachiya

December 22, 2015
Tweet

More Decks by Satoshi Hachiya

Other Decks in Programming

Transcript

  1. ΄΅@ikesyo͞Μ͕ ൃදࡁΈͷ಺༰ʹͳΓ·͢
 ʢҎԼ͸ͦͷଞΛؚΊͨࢀߟࢿྉʣ • Carthageʹ͍ͭͯ஌Γ͍ͨnݸͷ͜ͱ (@ikesyo)
 http://www.slideshare.net/syoikeda/carthagen • iOSͰͷFrameworkಋೖͷ͓͞Β͍ (@ikesyo)


    http://www.slideshare.net/syoikeda/iosframework • SwiftͰϥΠϒϥϦΛެ։͢Δ (@morizotter)
 http://qiita.com/morizotter/items/2e45f8f94c1010ebd69f • SwiftΛ࢖ͬͯϞμϯͳWeb APIΫϥΠΞϯτΛര଎Ͱ։ൃ͢Δ (@giginet)
 http://qiita.com/giginet/items/1e64f584f948661cffd1 • γϯϓϧͳґଘؔ܎؅ཧγεςϜ Carthage (Realm)
 https://realm.io/jp/news/swift-dependency-management-with-carthage/ 
  2. ᶆcarthage updateΛ࣮ߦ $ carthage update
 --use-submodules --platform iOS ⚠ Φϓγϣϯ͕ٯͩͱࣦഊ͠·ͨ͠ɻ

    ‣ Φϓγϣϯ —-use-submodules • ґଘϓϩδΣΫτΛGitͷαϒϞδϡʔϧͱͯ͠௥Ճ͠·͢ɻ —-platform iOS • ࠓճiOSͷΈΛର৅ͱͨ͠ͷͰࢦఆ͠·͢ɻ 
  3. ᶇ carthage buildΛ࣮ߦ $ carthage build
 —-no-skip-current --platform iOS ⚠

    Φϓγϣϯ͕ٯͩͱࣦഊ͠·ͨ͠ɻ ‣ Cathage/Build/iOS/ w ConnpassAPIClient.framework͕ੜ੒͞Ε·ͨ͠ɻ 
  4. .gitmodulesΛੜ੒ (Carthage) [submodule "Carthage/Checkouts/Himotoki"]
 path = Carthage/Checkouts/Himotoki
 url = https://github.com/ikesyo/Himotoki.git

    [submodule "Carthage/Checkouts/Result"]
 path = Carthage/Checkouts/Result
 url = https://github.com/antitypical/Result.git [submodule "Carthage/Checkouts/APIKit"]
 path = Carthage/Checkouts/APIKit
 url = https://github.com/ishkawa/APIKit.git
 ‣ࣗ෼Ͱઌʹ࡞͍ͬͯͨ৔߹͸௥ه͞Ε·ͨ͠ɻ 
  5. ᶄcarthage updateΛ࣮ߦ $ carthage update --platform iOS ‣ Carthage/Build/ w

    iOS, MacOS, tvOS, watchOS ‣ Carthage/Checkouts/ w Himotoki, ConnpassAPIClient 
  6. APIKit͸ϏϧυࡁΈόΠφϦ͕ μ΢ϯϩʔυ͞Ε·͢ *** Fetching ConnpassAPIClient *** Fetching Himotoki *** Fetching

    APIKit *** Fetching Result *** Checking out ConnpassAPIClient at "v0.0.8-alpha" *** Checking out Himotoki at "1.3.2" *** Downloading APIKit.framework binary at "1.1.2: Fix Content-Type" *** Downloading Result.framework binary at "1.0.1: A New Beginning" *** xcodebuild output can be found in ....log *** Building scheme "Himotoki-iOS" in Himotoki.xcodeproj *** Building scheme "ConnpassAPIClient" in ConnpassAPIClient.xcodeproj 
  7. FrameworkΛimport࣮ͯ͠ߦ import UIKit import ConnpassAPIClient // ࣗ࡞ϥΠϒϥϦ class ViewController: UIViewController

    { @IBAction func buttonTapped(sender: UIButton) {
 // Connpass͔Β”ؔ੢ϞόΠϧΞϓϦݚڀձ”Λݕࡧ Connpass.sendSearchEventRequest() 
 } } 
  8. ㊗੒ޭ
 ʢ+40/Λσίʔυͯ͠ϩάग़ྗ͢Δ͚ͩͷΫιϥΠϒϥϦʣ results_returned: 9 results_available: 9 results_start: 1 event_id: 23958

    title: ؔ੢ϞόΠϧΞϓϦݚڀձ #9 description: <p>iOS/AndroidΞϓϦ։ൃऀ޲͚ͷษڧձͰ͢ɻ</p> <h1>ձ৔</h1> <p>͸ͯͳژ౎ΦϑΟε8F ηϛφʔϧʔϜ</p> <p>19࣌10෼ΑΓड෇Λ։࢝͠·͢ɻ</p> <h2>ೖΓํ</h2> <p>19࣌ʹͳΔͱϏϧͷਖ਼໘ೖΓޱͷγϟολʔ͕ԼΓ·͢ɻ޲͔ͬͯࠨखͷ௨Γʹ͋Δ௨༻ޱ͔Β͓ೖΓ͍ͩ͘͞ɻ௨༻ޱ͕ด·ͬ ͍ͯΔ৔߹ʹ͸Πϯλʔϗϯ͔Βʮ801ʯΛݺͼ͍ͩͯͩ͘͠͞ɻ</p> <h1>։࠵֓ཁ</h1> <p>࠷ߴͷϞόΠϧΞϓϦΛ࡞Γ͍ͨσϕϩούʔ͕ɺ͓ޓ͍ʹ࠷৽ͷ஌ݟΛ൸࿐ͯ͠ަྲྀ͢ΔݚڀձͰ͢ɻ</p> <p>ͦΕͧΕͷൃද͸࣋ͪ࣌ؒ5෼ͷϥΠτχϯάτʔΫʢLTʣܗࣜͱ͠·͢ɻݪଇͱͯ͠5෼Ҏ಺ʹɺҴ࠺ͷΑ͏ͳ଎͞ͱ੎͍Ͱ͓࿩ ͍͖ͨͩ͠·͢ɻ</p> <h1>࠙਌ձ</h1> <p>ൃදऴྃޙʹ࠙਌ձΛاը͍ͯ͠·͢ɻฃͬͯ͝ࢀՃ͍ͩ͘͞ɻ</p> <p>Ϗʔϧ΍ܰ৯Λ༻ҙ͍ͯ͠·͢ɻ</p> <h1>λΠϜςʔϒϧ</h1> <p>TBD</p> event_url: http://kanmoba.connpass.com/event/23958/ 
  9. ࠷ޙʹࣗ࡞ϥΠϒϥϦͰ͓ࢼ͠ $ carthage archive ConnpassAPIClient ‣࣮ߦ݁Ռ *** Found Carthage/Build/iOS/ConnpassAPIClient.framework ***

    Found Carthage/Build/iOS/ConnpassAPIClient.framework.dSYM *** Found Carthage/Build/iOS/2209388D-3339-30F6-B80B-A779B6C91550.bcsymbolmap *** Found Carthage/Build/iOS/3841BD75-0DB2-3250-8395-786A569C7368.bcsymbolmap *** Created ConnpassAPIClient.framework.zip ‣ϦϙδτϦͷ௚ԼʹzipϑΝΠϧ͕ੜ੒͞Ε·ͨ͠ɻ