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

iOSパッケージマネージャー奮闘記

0b8ad408b31cb9d5cff2828086c65d58?s=47 temoki
February 19, 2021

 iOSパッケージマネージャー奮闘記

Mobile Act ONLINE #3 の発表資料です。
https://mobileact.connpass.com/event/200515

0b8ad408b31cb9d5cff2828086c65d58?s=128

temoki

February 19, 2021
Tweet

Transcript

  1. J04ύοέʔδϚωʔδϟʔฃಆه ೥ɺ Նɻ .PCJMF"DU0/-*/&  5PNPLJ,PCBZBTIJ!UFNPLJ

  2. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE ࣗݾ঺հ 2 Tomoki Kobayashi Twitter/GitHub @temoki ϞόΠϧΞϓϦΤϯδχΞ J04

    "OESPJE 'MVUUFS 'JSFCBTF גࣜձࣾελϝϯ TUNO JOD  56/"(ΤϯήʔδϝϯτܦӦϓϥοτϑΥʔϜ '"/54αϒεΫܕΦϯϥΠϯϑΝϯαϩϯ
  3. J04ΞϓϦ։ൃʹ͓͚Δ ύοέʔδϚωʔδϟʔ

  4. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE J04ύοέʔδϚωʔδϟʔ 4 w$PDPB1PET w$BSUIBHF w4XJGU1. wͦͷଞ

  5. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE J04ύοέʔδϚωʔδϟʔελϝϯͰ͸ʁ 5 w$PDPB1PET w$BSUIBHF w4XJGU1. wͦͷଞ ˠ͞Α͏ͳΒ ˠϝΠϯ

    Ϗϧυ࣌ؒ༏ઌ  ˠ$BSUIBHFඇରԠͷΈ ˠ.JOUͰ4XJGU$-*
  6. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE J04ύοέʔδϚωʔδϟʔࠓ೔ͷςʔϚ 6 J04ύοέʔδϚωʔδϟʔ ͱͷಆ͍ͷه࿥

  7. ೥ɺՆɻ $BSUIBHFͱͷಆ͍͕࢝·Δ ๻͸J04ϦϦʔεͱಉ࣌ʹ ରԠ൪ΞϓϦΛϦϦʔε͔͚ͨͬͨͩ͠ͳͷʹ

  8. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE $BSUIBHFͱͷಆ͍ه࿥͸2JJUBʹ 8 https://qiita.com/temoki/items/e3c05ee7e0f7a37b87e9

  9. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE M1 $BSUIBHFͱͷಆ͍ݪҼ͸ʜ 9

  10. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE $BSUIBHFͱͷಆ͍Τϥʔͷ֓ཁ 10 the same architectures (arm64) and can't

    be in the same fat output file ΤϥʔൃੜՕॴ xcrun lipo -create w MJQP͸ҟͳΔΞʔΩςΫνϟͷෳ਺ͷόΠφϦΛ݁߹ͯ͠ 
 6OJWFSTBMόΠφϦΛ࡞Δπʔϧʢ9DPEFಉࠝʣ w $BSUIBHF͸J04σόΠεͱJ04γϛϡϨʔλ޲͚ͷ'SBNFXPSLΛ 
 ͦΕͧΕϏϧυ͔ͯ͠ΒMJQPʹΑΓ6OJWFSTBM'SBNFXPSLΛ࡞੒͢Δ Τϥʔϝοηʔδ
  11. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE $BSUIBHFͱͷಆ͍9DPEF 11 iOS Simulator Mac (Intel) iOS Device

    x86_64 arm64 Universal arm64 + x86_64 lipo -create
  12. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE $BSUIBHFͱͷಆ͍9DPEF 12 iOS Simulator Mac (Intel + M1)

    iOS Device arm64 Universal x86_64 + arm64 lipo -create the same architectures (arm64) and can't be in the same fat output file
  13. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE $BSUIBHFͱͷಆ͍ຊՈͷ1JOOFEJTTVF 13 https://github.com/Carthage/Carthage/issues/3019

  14. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE $BSUIBHFͱͷಆ͍ϫʔΫΞϥ΢ϯυ 14 https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md ϫʔΫΞϥ΢ϯυεΫϦϓτΛ࢖༻͢Δ

  15. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE $BSUIBHFͱͷಆ͍ϫʔΫΞϥ΢ϯυεΫϦϓτ 15 ΞʔΩςΫνϟ͕ॏෳ͠ͳ͍Α͏ʹEXCLUDED_ARCHSΛઃఆ

  16. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE $BSUIBHFͱͷಆ͍4XJGU1.΁Ҡߦ͠Α͏ʂ 16 w $BSUIBHFͷࠜຊతͳ໰୊͕ͳ͔ͳ͔ղফ͞Εͳ͍ 
 ϫʔΫΞϥ΢ϯυͰ͸..BDͰಈ࡞͠ͳ͍  w

    9DPEFͰ4XJGU1.͕౷߹ɺ 
 ґଘύοέʔδͷ4XJGU1.αϙʔτ΋ਐΜͰ͖ͨ w 'JSFCBTF4%,΋೥݄͔Β4XJGU1.αϙʔτΛ Ќఏڙ։࢝ʂ $BSUIBHF͸&YQFSJNFOUBMͳҐஔ෇͚ Αͬ͠Όɺ͜ΕΛػʹ4XJGU1.ʹҠߦͨ͠Ζʂ
  17. 4XJGU1.ͱͷಆ͍

  18. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE 4XJGU1.ͱͷಆ͍ 18 $*Ͱ4XJGU1.ͷϏϧυ੒Ռ෺ΛΩϟογϡ 'JSFCBTF4%,Λ4XJGU1.Ͱ૊ΈࠐΉ

  19. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE 4XJGU1.ͱͷಆ͍ 19 $*Ͱ4XJGU1.ͷϏϧυ੒Ռ෺ΛΩϟογϡ 'JSFCBTF4%,Λ4XJGU1.Ͱ૊ΈࠐΉ

  20. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE 4XJGU1.ͱͷಆ͍'JSFCBTF4%,Λ૊ΈࠐΉ 20 https://qiita.com/temoki/items/da91bffe5a347103b0ca w ·੍͍͔ͩͭ͘ݶࣄ߲͕͋Δ w ໰୊΋͋ΔͷͰϫʔΫΞϥ΢ϯυͰͷӡ༻͕ඞཁ ͋͘·ͰЌ൛

    https://github.com/firebase/firebase-ios-sdk/blob/master/SwiftPackageManager.md
  21. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE 4XJGU1.ͱͷಆ͍ 21 $*Ͱ4XJGU1.ͷϏϧυ੒Ռ෺ΛΩϟογϡ 'JSFCBTF4%,Λ4XJGU1.Ͱ૊ΈࠐΉ

  22. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE 4XJGU1.ͱͷಆ͍Ϗϧυ੒Ռ෺ͷΩϟογϡ 22 https://qiita.com/temoki/items/045c375e1127dbd1bbf2 w Ϋϩʔϯͨ͠ϦϙδτϦ͸ΩϟογϡՄ w Ϗϧυ੒Ռ෺͸ΩϟογϡͰ͖ͦ͏ʹͳ͍ʜ Ϗϧυ੒Ռ෺͸ΩϟογϡͰ͖ͳ͍

  23. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE 4XJGU1.Ϗϧυ࣌ؒΛ཈͑Δʹ͸ʜ 23 w 9DPEF͔ΒϏϧυࡁόΠφϦΛఏڙՄೳʹͳͬͨ 
 ιʔείʔυ͕ඇެ։Ͱ΋഑෍Մೳͱ͢Δ͜ͱ͕໨త  w

    'JSFCBTF"OBMZUJDT͸͜ΕͰ഑෍͞Ε͍ͯΔ w όΠφϦͰͷఏڙ͕౰ͨΓલʹͳΔ೔͕དྷͳ͍͔ͳʜ 4XJGU1.΁ͷҠߦ͸Ұ୴அ೦͢Δ͜ͱʹ
  24. ࠶ͼ$BSUIBHF΁

  25. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE w ݄ॳʹ$BSUIBHFϦϦʔε w 9$'SBNFXPSLରԠʹΑΓɺ͋ͷ໰୊͕ղফ͞Εͨʂ ࠶ͼ$BSUIBHF΁͋ͷ໰୊͕ղফ͞Εͨʂ 25

  26. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE w ෳ਺ϓϥοτϑΥʔϜ޲͚ͷ'SBNFXPSLΛ 
 ୯Ұͷόϯυϧʹ·ͱΊͨ΋ͷʢMJQPෆཁʣ w ετΞఏग़࣌ʹγϛϡϨʔλ༻όΠφϦ͸ແࢹ͞ΕΔ 
 $BSUIBHF͸DPQZGSBNFXPSLίϚϯυͰআ֎͍ͯͨ͠

     w 4XJGU1.͸͜ΕΛϏϧυࡁόΠφϦͱͯ͠ఏڙ͢Δ ࠶ͼ$BSUIBHF΁9$'SBNFXPSLͬͯʁ 26
  27. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE ࠶ͼ$BSUIBHF΁9$'SBNFXPSLʹҠߦ͢Δ 27 w —use-xcframeworksΦϓγϣϯͰcarthage࣮ߦ w ैདྷͷ*.framework͸ϓϩδΣΫτ͔Β࡟আ w ୅ΘΓʹ*.xcframworkΛϓϩδΣΫτʹ௥Ճ

    w #VJME1IBTFTͷcarthage copy-framewokΛ 
 ࣮ߦ͢ΔεΫϦϓτΛ࡟আ ͍Ζ͍ΖεοΩϦͰ͢ΘE ?@?
  28. ࢒Δ՝୊

  29. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE ࢒Δ՝୊ 29 w 'JSFCBTF4%,͸$BSUIBHFͩͱैདྷͷ'SBNFXPSLܗࣜͰ 
 ϏϧυࡁόΠφϦ͕ఏڙ͞ΕΔͷͰ..BD্γϛϡϨʔλ Ͱಈ࡞͠ͳ͍ 


    $BSUIBHF͕9$'SBNFXPSLʹରԠ͠ͳ͍͔Βͱ͍͏ཧ༝  w $BSUIBHF޲͚ͷ'JSFCBTF"OBMZUJDT͕Ҏ߱ͷ 
 όʔδϣϯఏڙ͞Εͳ͍ʜ https://github.com/firebase/firebase-ios-sdk/blob/master/AppleSilicon.md#carthage
  30. $PQZSJHIU˜TUNO JOD"MMSJHIUTSFTFSWFE 30

  31. ಆ͍͸ଓ͘ͷͰ͋ͬͨʜ

  32. None