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

Apple silicon導入のウラガワ/ Introducing Apple silicon...

Satoshi Komatsu
May 16, 2022
1.5k

Apple silicon導入のウラガワ/ Introducing Apple silicon and its behind the scenes

Satoshi Komatsu

May 16, 2022
Tweet

Transcript

  1. © ZOZO, Inc. 5 ςοΫϒϩά಺༰·ͱΊ  "QQMFTJMJDPOಋೖ͠·ͨ͠ ɾiOSνʔϜશһͷ୺຤ɺIntel Mac͔ΒM1 Pro΁ͱҠߦ͠·ͨ͠

    ɾM1 MacBook AirΛݕূػͱͨ͜͠ͱͰɺೋ೔ؒͰͷҠߦΛՄೳʹ ɾZOZOTOWN iOS͸RosettaΛ࢖༻͢Δ͜ͱʹ͠·ͨ͠ ɾM1 MaxͰ͸ͳ͘M1 Proʹ͠·ͨ͠ ɾϏϧυ଎౓͕൒෼ʹͳΓ·ͨ͠
  2. © ZOZO, Inc. 6 ςοΫϒϩά಺༰·ͱΊ  *OUFM.BD͔Β"QQMFTJMJDPO΁ͷҠߦλΠϜϥΠϯ   

    ݄ 88%$ʹͯ "QQMFTJMJDPOൃදɻ ։ൃऀ޲͚ʹ%5,഑෍ɻ ݄ ݕূػͱͯ͠ɺ ..BD#PPL"JSΛߪೖ ݄ ݄ ݄ .1SP.BYൃද .1SPߪೖ .1SP౸ண "QQMFTJMJDPOҠߦ
  3. © ZOZO, Inc. 8 ςοΫϒϩά಺༰·ͱΊ  ࠓճಋೖͨ͠୺຤ͷεϖοΫ ɾ10ίΞCPU M1 Pro

    ɾ32GBϢχϑΝΠυϝϞϦ ɾ1TB SSD →ෳ਺ͷXcodeΛ؅ཧ͢Δ͜ͱ͕͋ΔͷͰগ͠༨༟Λ
  4. © ZOZO, Inc. 11 ςοΫϒϩά಺༰·ͱΊ  Ϗϧυ଎౓ͷมԽ ϦϦʔεϏϧυ Intel Core

    i9: 6෼25ඵ M1 Pro: 3෼12ඵ →Ϗϧυ͕࣌ؒ൒෼ʹʂ     ෼    
  5. © ZOZO, Inc. 15  9$'SBNFXPSLͱ͸ Framework 📦 Universal Binary

    →ෳ਺ͷΞʔΩςΫνϟ༻ͷόΠφϦϑΝΠϧΛ·ͱΊͨ΋ͷɻ ͨͩ͠ɺಉҰͷΞʔΩςΫνϟΛෳ਺อ࣋Ͱ͖ͳ͍ iPhone༻ͷόΠφϦ(ARM64)ͱSimulator༻ͷόΠφϦ(x86_64) Λ·ͱΊΔ ͳͥ3PTFUUBΛ֎ͤͳ͔ͬͨͷ͔ ⭕
  6. © ZOZO, Inc. 16  9$'SBNFXPSLͱ͸ Framework 📦 Universal Binary

    →ෳ਺ͷΞʔΩςΫνϟ༻ͷόΠφϦϑΝΠϧΛ·ͱΊͨ΋ͷɻ ͨͩ͠ɺಉҰͷΞʔΩςΫνϟΛෳ਺อ࣋Ͱ͖ͳ͍ ͳͥ3PTFUUBΛ֎ͤͳ͔ͬͨͷ͔ iPhone༻ͷόΠφϦ(ARM64)ͱSimulator༻ͷόΠφϦ(ARM64) Λ·ͱΊΔ ❌
  7. © ZOZO, Inc. 18  ;0;0508/ͷϏϧυߏ੒ ZOZOTOWN Carthage CocoaPods ͦͷଞ

    ϥΠϒϥϦ ZOZOSUIT ZOZOMAT ͳͥ3PTFUUBΛ֎ͤͳ͔ͬͨͷ͔
  8. © ZOZO, Inc. 19  ;0;0508/ͷϏϧυߏ੒ Carthage CocoaPods ͦͷଞ ϥΠϒϥϦ

    ZOZOSUIT ZOZOMAT ZOZOTOWN ͳͥ3PTFUUBΛ֎ͤͳ͔ͬͨͷ͔ XCFramework
  9. © ZOZO, Inc. 20  ;0;0508/ͷϏϧυߏ੒ Carthage CocoaPods ͦͷଞ ϥΠϒϥϦ

    ZOZOSUIT ZOZOMAT XCFramework ❌ ❌ ZOZOTOWN ͳͥ3PTFUUBΛ֎ͤͳ͔ͬͨͷ͔
  10. © ZOZO, Inc. 34 9DPEF 
 3PTFUUBͳ͠ 9DPEF 3PTFUUB͋Γ 4JNVMBUPS

    3PTFUUBͳ͠ εΫϩʔϧͷ׳ੑ⭕ εΫϩʔϧͷ׳ੑ❌ 4JNVMBUPS 3PTFUUB͋Γ εΫϩʔϧͷ׳ੑ❌ εΫϩʔϧͷ׳ੑ⭕ *XcodeͱSimulatorͷRosettaͷΦϯΦϑ͸ࣗಈͰಉظ͞Εͳ͍  4JNVMBUPSͷ׳ੑ͕ޮ͔ͳ͘ͳΔ https://developer.apple.com/forums/thread/668488 3PTFUUBͱͷ޲͖߹͍ํ
  11. © ZOZO, Inc. 35 3PTFUUBΛ࢖༻͢Δ؀ڥͱ࢖༻͠ͳ͍؀ڥ ɾRosetta͋ΓͰӡ༻͍ͯ͠ΔΞϓϦ - Xcode - Simulator

    - Bundler(CocoaPods) ɾRosettaͳ͠Ͱӡ༻͍ͯ͠ΔΞϓϦ - Terminal - AppStore޲͚Ϗϧυͷ࡞੒  3PTFUUBͱͷ޲͖߹͍ํ
  12. © ZOZO, Inc. 36 $PDPB1PETʹ͍ͭͯ ɾGemͰೖΕͨCocoaPods͸FFIपΓͷΤϥʔͷͨΊɺApple siliconԼͰͷ ࣮ߦ͕೉͍͠ →arch -x86_64Λ಄ʹ͚ͭͯӡ༻

    ɾHomebrewܦ༝ͰೖΕΔͱApple siliconԼͰ΋໰୊ͳ͘ಈ͘ →BundlerʹΑͬͯCocoaPodsͷόʔδϣϯΛݻఆ͍ͨ͠ͷͰɺ࢖༻͠ͳ͍ ɾͦ΋ͦ΋ZOZOTOWNͰ͸PodsϑΝΠϧ͸git؅ཧ͞Ε͍ͯΔͨΊɺinstall ΍update͞ΕΔ͜ͱ͕গͳ͍  3PTFUUBͱͷ޲͖߹͍ํ
  13. © ZOZO, Inc. 41 9DPEFͰͷṖڍಈ  ϦϦʔεϏϧυͷܭଌ࣌ؒଌఆத Obj-CϑΝΠϧͷίϯύΠϧ ଴ػ࣌ؒ(Ṗ) 12ඵ

    Obj-CͷίϯύΠϧ SwiftͷίϯύΠϧ 3ඵ 140ඵ 12ඵ 3ඵ 4ඵ Ϗϧυͷ஗͍ਓ Ϗϧυͷ଎͍ਓ