$30 off During Our Annual Pro Sale. View Details »

Xcode Cloudの評価

Xcode Cloudの評価

Kishikawa Katsumi

September 29, 2022
Tweet

More Decks by Kishikawa Katsumi

Other Decks in Programming

Transcript

  1. Kishikawa Katsumi
    Xcode CloudͷධՁ

    View Slide

  2. Xcode CloudͷධՁ
    • Conclusion

    • Pros / Cons

    • Workaround

    • Summary

    View Slide

  3. Xcode Cloud at a glance


    https://speakerdeck.com/kishikawakatsumi/xcode-cloud-at-a-glance

    View Slide

  4. Xcode CloudͷධՁ
    Summary
    • iOS/watchOS/tvOS/macOSΞϓϦΛTestFlight΍App StoreʹΞοϓϩʔυ
    ͢Δ͜ͱ͸ؔͯ͠͸࠷ߴͷπʔϧ
    • ͦΕҎ֎ͷλεΫɺ൚༻తͳCIͱͯ͠ߟ͑ΔͱྉۚΛߟྀͯ͠΋ଞͷαʔϏε
    ʹେ͖͘ݟྼΓ͢Δ

    View Slide

  5. View Slide

  6. View Slide

  7. Xcode CloudͷධՁ
    Pros
    • iOS/watchOS/tvOS/macOSΞϓϦΛTestFlight΍App StoreʹΞοϓϩʔυ͢Δ͜ͱ͕ඇ
    ৗʹ؆୯
    • Distributionͷίʔυॺ໊ʹ·ͭΘΔ͞·͟·ͳτϥϒϧ͔Βղ์͞ΕΔ
    • ྉ͕ۚखࠒʢଥ౰Ͱ͋Δͱ͸ݴͬͯͳ͍ʣ

    • ΞΫγϣϯ͸͢΂ͯฒྻʹ࣮ߦ͞ΕΔ

    • ৽͍͠XcodeͱOSͷରԠ͕Ұ൪ૣ͍

    • UI Test͕͋ΔͱεΫϦʔϯγϣοτ͕ࣗಈతʹ࢒ΓɺXcode΍Web͔Β݁ՌΛ֬ೝͰ͖Δ

    View Slide

  8. Xcode CloudͷධՁ
    Cons
    • ൚༻తͳCIαʔϏεͱͯ͠͞·͟·ͳλεΫΛ࣮ߦͤ͞Δ͜ͱ͸೉͍͠

    • αʔυύʔςΟ੡ͷϏϧυπʔϧ͕ Pre-Install͞Ε͍ͯͳ͍

    • HomebrewͷΈ

    • CocoaPods΍Carthage͕ඞཁͳ৔߹͸HomebrewͰΠϯετʔϧ͢Δ

    • Ruby͸ೖ͍ͬͯΔ͕ݹ͍ ruby 2.6.8p205 (2021-07-07 revision 67951)


    •࣮ߦͰ͖ΔΞΫγϣϯ͕طఆͷ΋ͷʹݶΒΕ͍ͯΔ

    View Slide

  9. Xcode CloudͷධՁ
    Cons
    • ΧελϜεΫϦϓτͷॊೈੑ͕௿͍

    • ηοτΞοϓʹXcode͕ඞཁ

    • ϫʔΫϑϩʔΛϦϙδτϦͰ؅ཧͰ͖ͳ͍

    • App Store Connect APIΛ࢖ͬͯ಺༰Λμ΢ϯϩʔυ͢ΔͳͲ޻෉͢Δ

    • ̍ਓͰ࢖͏෼ʹ͸ྑ͍͕νʔϜͰ࢖͍ʹ͍͘

    • M1Ϛγϯ͸ʢ͓ͦΒ͘ʣ·ͩ࢖͑ͳ͍

    View Slide

  10. Xcode CloudͷධՁ
    Ұ೥લ͔ΒมΘͬͨ఺
    • εέδϡʔϧ࣮ߦ͕Մೳʹͳͬͨ

    View Slide

  11. Xcode CloudͷධՁ
    εέδϡʔϧ࣮ߦ͕Մೳʹͳͬͨ

    View Slide

  12. Xcode CloudͷධՁ
    εέδϡʔϧ࣮ߦ͕Մೳʹͳͬͨ

    View Slide

  13. ৽͍͠XcodeͱOSͷରԠ͕Ұ൪ૣ͍

    View Slide

  14. Pros
    ৽͍͠XcodeͱOSͷରԠ͕Ұ൪ૣ͍

    View Slide

  15. Pros
    ৽͍͠XcodeͱOSͷରԠ͕Ұ൪ૣ͍

    View Slide

  16. OSͱXcodeόʔδϣϯͷରԠ
    Bitrise

    View Slide

  17. OSͱXcodeόʔδϣϯͷରԠ
    Codemagic

    View Slide

  18. ൚༻తͳCIαʔϏεͱͯ͠࢖͍ʹ͍͘

    View Slide

  19. ൚༻తͳCIαʔϏεͱͯ͠࢖͍ʹ͍͘
    ࣮ߦͰ͖ΔΞΫγϣϯ͕طఆͷ΋ͷʹݶΒΕ͍ͯΔ

    View Slide

  20. ൚༻తͳCIαʔϏεͱͯ͠࢖͍ʹ͍͘
    ࣮ߦͰ͖ΔΞΫγϣϯ͕طఆͷ΋ͷʹݶΒΕ͍ͯΔ

    View Slide

  21. ൚༻తͳCIαʔϏεͱͯ͠࢖͍ʹ͍͘
    αʔυύʔςΟ੡ͷϏϧυπʔϧ͕ Pre-Install͞Ε͍ͯͳ͍
    https://developer.apple.com/documentation/xcode/making-dependencies-available-to-xcode-cloud

    View Slide

  22. ൚༻తͳCIαʔϏεͱͯ͠࢖͍ʹ͍͘
    αʔυύʔςΟ੡ͷϏϧυπʔϧ͕ Pre-Install͞Ε͍ͯͳ͍
    https://developer.apple.com/documentation/xcode/making-dependencies-available-to-xcode-cloud

    View Slide

  23. ൚༻తͳCIαʔϏεͱͯ͠࢖͍ʹ͍͘
    αʔυύʔςΟ੡ͷϏϧυπʔϧ͕ Pre-Install͞Ε͍ͯͳ͍
    https://developer.apple.com/documentation/xcode/making-dependencies-available-to-xcode-cloud

    View Slide

  24. View Slide

  25. ൚༻తͳCIαʔϏεͱͯ͠࢖͍ʹ͍͘
    ΧελϜεΫϦϓτͷॊೈੑ͕௿͍

    View Slide

  26. • ϦϙδτϦͷci_scriptsσΟϨΫτϦʹci_post_clone.shɺ
    ci_pre_xcodebuild.shɺci_post_xcodebuild.shͷ໊લͰεΫϦϓτ
    Λ֨ೲ͢Δ

    • ϦϙδτϦ͝ͱʹ֤λΠϛϯάͷεΫϦϓτΛ͔̍ͭͣͭ͠ஔ͚ͳ͍

    • ෳ਺ͷΞΫγϣϯ·ͨ͸ϫʔΫϑϩʔͰҟͳΔॲཧΛ͢Δʹ͸εΫϦϓτத
    Ͱ෼ذ͢Δඞཁ͕͋Δ
    ൚༻తͳCIαʔϏεͱͯ͠࢖͍ʹ͍͘
    ΧελϜεΫϦϓτͷॊೈੑ͕௿͍

    View Slide

  27. ൚༻తͳCIαʔϏεͱͯ͠࢖͍ʹ͍͘
    ΧελϜεΫϦϓτͷॊೈੑ͕௿͍
    https://developer.apple.com/documentation/xcode/writing-custom-build-scripts

    View Slide

  28. ηοτΞοϓʹXcode͕ඞཁ

    View Slide

  29. ηοτΞοϓʹXcode͕ඞཁ

    View Slide

  30. ηοτΞοϓʹXcode͕ඞཁ
    Ұ౓ηοτΞοϓ͕׬ྃ͢Ε͹Web͔Βಉ༷ʹӾཡɾฤूͰ͖Δ

    View Slide

  31. ηοτΞοϓʹXcode͕ඞཁ
    ϑϨʔϜϫʔΫͷ৔߹μΠϨΫτΞΫηεҎ֎ʹWebͰΈΔखஈ͕ͳ͍

    View Slide

  32. ϫʔΫϑϩʔΛϦϙδτϦͰ؅ཧͰ͖ͳ͍

    View Slide

  33. ϫʔΫϑϩʔΛϦϙδτϦͰ؅ཧͰ͖ͳ͍
    App Store Connect APIͰऔಘ͢Δ͜ͱ͸Ͱ͖Δ

    View Slide

  34. ʢ༨ஊʣϫʔΫϑϩʔΛAPIͰ࡞Δ͜ͱ͸Մೳ
    طଘͷηοτΞοϓͷ৘ใ͕ඞཁͳͷͰ࠷ॳͷηοτΞοϓ͸Ͱ͖ͳ͍ʢ௥ՃͷΈʣ

    View Slide

  35. M1Ϛγϯ͸·ͩ࢖͑ͳ͍

    View Slide

  36. M1Ϛγϯ͸·ͩ࢖͑ͳ͍
    +/Volumes/workspace/repository/ci_scripts/ci_post_clone.sh:5> uname -m


    x86_64


    +/Volumes/workspace/repository/ci_scripts/ci_post_clone.sh:6> system_profiler \


    SPSoftwareDataType \


    SPHardwareDataType


    Software:


    System Software Overview:


    System Version: macOS 12.6 (21G115)


    Kernel Version: Darwin 21.6.0


    Boot Volume: Macintosh HD


    Boot Mode: Normal


    Computer Name: 65f75d2b-8366-4cb2-8ab6-6172469216e8-765df7c9b-6xhrf-vm


    User Name: local (local)


    Secure Virtual Memory: Enabled


    System Integrity Protection: Enabled


    Time since boot: 46 minutes

    View Slide

  37. M1Ϛγϯ͸·ͩ࢖͑ͳ͍
    Hardware:


    Hardware Overview:


    Model Name: Mac


    Model Identifier: MacVM1,1


    Processor Name: Unknown


    Processor Speed: 2 GHz


    Number of Processors: 4


    Total Number of Cores: 4


    L2 Cache (per Processor): 4 MB


    L3 Cache (per Processor): 16 MB


    Memory: 16 GB


    System Firmware Version: AVM11.88Z.0003.D00.2110230656


    OS Loader Version: 540.120.3~22


    SMC Version (system): 1.13f3


    Serial Number (system): XCC34RG97D9B


    Hardware UUID: 42774E5C-1EBC-4D12-BD7F-DA2BF93D7A53


    Provisioning UDID: 42774E5C-1EBC-4D12-BD7F-DA2BF93D7A53

    View Slide

  38. View Slide

  39. Xcode CloudͷධՁ
    Summary
    • iOS/watchOS/tvOS/macOSΞϓϦΛTestFlight΍App StoreʹΞοϓϩʔυ͢Δ͜ͱ͕ඇৗʹ؆୯

    • Distributionͷίʔυॺ໊ʹ·ͭΘΔ͞·͟·ͳτϥϒϧ͔Βղ์͞ΕΔ

    • SwiftPMҎ֎ͷύοέʔδϚωʔδϟΛ࢖͍ͬͯΔ৔߹͸޻෉͕ඞཁ

    • Ϗϧυͷ௚લ·ͰผͷCIαʔϏεͰ࣮ߦͯ͠ɺ͢΂ͯͷϑΝΠϧΛಛఆͷϒϥϯνʹίϛοτͯ͠Xcode
    CloudΛτϦΨʔ͢Δͷ͕γϯϓϧ

    • ഑෍Ҏ֎ͷ໨తʹ࢖༻͢Δʹ͸͔ͳΓ࢖͍ʹ͍͘

    • ଞਓɾෳ਺ͷApp Store ConnectΞΧ΢ϯτʹ഑෍͢Δ͜ͱ͸೉͍͠ʢΫϥΠΞϯτϫʔΫͳͲʣ

    • ཁ͸Ϋϥ΢υίʔυॺ໊͚͕ͩXcode Buildͷ།ҰͰ࠷େͷར఺ͳͷͰͦΕҎ֎ͷ͜ͱ͸ଞͷCIαʔϏεΛ࢖͏
    ͱ͏·͍͘͘

    View Slide