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

SwiftPM with KMMをprivateなGitHub Releaseで運用する

RyuNen344
August 30, 2022

SwiftPM with KMMをprivateなGitHub Releaseで運用する

RyuNen344

August 30, 2022
Tweet

More Decks by RyuNen344

Other Decks in Programming

Transcript

  1. ࿩͢͜ͱɾ࿩͞ͳ͍͜ͱ • ࿩͢͜ͱ • private multi repo؀ڥͰͷKMM(ͱ͍͏ΑΓ͸όΠφϦʔ)ΛSwiftPMͰऔΓࠐ Ήํ๏ • ࿩͞ͳ͍͜ͱ

    • KMMͱ͸ • SwiftPM༻ͷPackage.swiftϑΝΠϧੜ੒ํ๏ • GitHub APIΛ࢖ͬͨasset urlͷऔಘํ๏
  2. KMM with CocoaPods on GH Assets • marty-suzuki͞Μ͕ެ։͍ͯͩͬͯ͘͠͞Δpod specϑΝΠϧΛ࢖͏ •

    https://speakerdeck.com/martysuzuki/iosnikmmwodao-ru-surutips GitHub্Ͱ͢΂ͯ४උͰ͖Δ͜͠ΕͰ४උສ୺😊 ͱࢥ͍ͬͯͨΒɾɾɾɾ
  3. KMM with SwiftPM on GH Assets • GitHub ReleaseͷAssetsΛ࢖͏ࡍʹඞཁͳ͜ͱ •

    SwiftPMʹରԠͨ͠zipϑΝΠϧͷߏ੒ʹ͢Δ • Http Request࣌ͷೝূΛ৐Γӽ͑Δ • Contetn-TypeɿOctet-StreamͰϦΫΤετ͢Δ
  4. Http Request࣌ͷೝূΛ৐Γӽ͑Δ • .netrcΛ࢖͏ • ઃఆ͢ΔͱΑ͠ͳʹೝূΛ৐Γӽ͑ͯ͘ΕΔ • https://www.gnu.org/software/inetutils/manual/html_node/The- _002enetrc- fi

    le.html • Xcode12.5͔ΒରԠͨ͠ • https://github.com/apple/swift-package-manager/pull/2833 • ͜ΕͰAuthorization: token $(pat)ͰϦΫΤετͯ͘͠ΕΔΑ͏ʹͳͬͨ