Slide 1

Slide 1 text

• @giginet • LINEגࣜձࣾ Developer Experience Team(2022/7~) • ٕज़ސ໰ • גࣜձࣾϚωʔϑΥϫʔυ • גࣜձࣾϢϏϨδ • Core Committer • XcodeGen/fastlane/Carthage … • iOSDCొஃ2೥ͿΓ6ճ໨ (2017(LT), 18(30min), 19(LT), 21(40min)) ͜Μʹͪ͸

Slide 2

Slide 2 text

2023/09/01 iOSDC 2023 Day 0 Swift PackageΛ࢖ͬͨ ڊେͳґଘάϥϑͷΩϟογϡઓུ @giginet

Slide 3

Slide 3 text

ࠓ೔࿩͢͜ͱ 1 2 3 LINEΞϓϦͷϏϧυ؀ڥͷ঺հ Swift PackageΛΩϟογϡՄೳʹ͢Δख๏ͷ঺հ LINEΞϓϦͷϏϧυ؀ڥΛͲ͏վળ͔ͨ͠ ೖࣾ࣌(2022/7)ʹ௚໘ͨ͠਺ʑͷ໰୊఺ ! ৽͍͠ϏϧυπʔϧScipioͷ঺հ ґଘؔ܎ͷϏϧυ͕ཁΒͳ͍ੈքʹ ͳͥύοέʔδͷΩϟογϡ͕ඞཁʹͳͬͨͷ͔ Swift PackageΛ࠶഑෍Մೳʹѻ͏ͨΊʹ

Slide 4

Slide 4 text

ֶ΂Δ͜ͱ • େن໛ϓϩδΣΫτͷϏϧυ؀ڥͷέʔεελσΟ • Ϗϧυπʔϧͷ಺෦ಈ࡞ • Swift Package Managerͷ֤छػೳ΍Ϗϧυઃఆ • XCFrameworkͷ࢓૊Έ΍ߏ଄ • ϦϞʔτΩϟογϡπʔϧͷߏஙΞΠσΟΞ

Slide 5

Slide 5 text

LINE iOSΞϓϦϏϧυ؀ڥͷ՝୊ ୈ1ষ

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

ϓϩδΣΫτ͕σΧ͍

Slide 8

Slide 8 text

LINEϓϩδΣΫτͷ։ൃن໛(2023/8) ίʔυߦ਺ 200ສߦҎ্ XcodeϓϩδΣΫτ਺ 300Ҏ্ ϏϧυࡁΈϑϨʔϜϫʔΫ਺ 150Ҏ্

Slide 9

Slide 9 text

Bazel Xcode ΞϓϦέʔγϣϯϏϧυ LINE iOSͷϏϧυϓϩηε(~2022) PrebuiltλεΫ STEP 1 STEP 2

Slide 10

Slide 10 text

Bazel Xcode ΞϓϦέʔγϣϯϏϧυ LINE iOSͷϏϧυϓϩηε(~2022) PrebuiltλεΫ STEP 1 STEP 2

Slide 11

Slide 11 text

Bazel Xcode ΞϓϦέʔγϣϯϏϧυ LINE iOSͷϏϧυϓϩηε(~2022) PrebuiltλεΫ STEP 1 STEP 2

Slide 12

Slide 12 text

Bazel PrebuiltλεΫ PrebuiltλεΫ • OSSϥΠϒϥϦͷFrameworkԽ • ࣾ಺࣮૷ͷFrameworkԽ • όΠφϦϑϨʔϜϫʔΫͷऔಘ • APIεΩʔϜ͔Βͷίʔυੜ੒ STEP 1

Slide 13

Slide 13 text

Bazelͱ͸ • Googleͷ։ൃͨ͠Ϗϧυπʔϧ • Ϗϧυͷ࠶ݱੑΛҡ࣋ͨ͠··ɺߴ଎ͳϏϧυύΠϓϥΠϯΛߏஙͰ͖Δ • https://bazel.build/?hl=ja

Slide 14

Slide 14 text

Bazel PrebuiltλεΫ PrebuiltλεΫ • OSSϥΠϒϥϦͷFrameworkԽ • ࣾ಺࣮૷ͷFrameworkԽ • όΠφϦϑϨʔϜϫʔΫͷऔಘ • APIεΩʔϜ͔Βͷίʔυੜ੒ STEP 1

Slide 15

Slide 15 text

Xcode ΞϓϦέʔγϣϯϏϧυ ΞϓϦέʔγϣϯϏϧυ • XCWorkspace + ෳ਺(100~)ͷxcodeprojͰߏ੒ • XcodeGenͰ֤ϓϩδΣΫτੜ੒ • PrebuiltλεΫͰ࡞੒ͨ͠ϑϨʔϜϫʔΫΛ౷߹ STEP 2

Slide 16

Slide 16 text

BazelͷಋೖͱϏϧυ଎౓ • ๲େͳίʔυϕʔεʹΑΓϏϧυ଎౓͕໰୊ʹ • 2019೥ࠒ͔ΒͷBazelͷಋೖʹΑΓɺҰ࣌͸Ϗϧυ଎౓͕଎͘ͳͬͨ "

Slide 17

Slide 17 text

BazelͷಋೖͱϏϧυ଎౓ ͕ ࣍ୈʹϝϯςίετͷํ͕ॏ͘ͳͬͨ • ๲େͳίʔυϕʔεʹΑΓϏϧυ଎౓͕໰୊ʹ • 2019೥ࠒ͔ΒͷBazelͷಋೖʹΑΓɺҰ࣌͸Ϗϧυ଎౓͕଎͘ͳͬͨ "

Slide 18

Slide 18 text

-*/&J04 Ϗϧυ؀ڥͷมભ (JVL+VOH -*/&1MBUGPSN%FW$FOUFS %FWFMPQFS&YQFSJFODF5FBN LINE iOS Ϗϧυ؀ڥͷมભ iOSDC 2022 εϙϯαʔηογϣϯ https://speakerdeck.com/line_developers/changes-in-line-ios-build-environment

Slide 19

Slide 19 text

LINE͸ͳͥBazelΛ࢖Θͳ͍͜ͱʹͨ͠ͷ͔ʁ https://engineering.linecorp.com/ja/blog/line-bazel

Slide 20

Slide 20 text

՝୊ -BazelͷϝϯςφϏϦςΟ- • BazelͰͷϏϧυύΠϓϥΠϯߏஙͷֶश ίετ͕ߴ͍ • ਂࠁͳBazel৬ਓͷޙܧऀෆ଍(Starlark) • ςετ͕ͳ͍ಠࣗRule • Bazelͷόʔδϣϯ͕ݹ͍··਺೥์ஔ • ࠷ۙΑ͏΍ͬͱ্͛ͨ • fork·Ͱͯͨ͠ͷͰ࠷ۙফͨ͠

Slide 21

Slide 21 text

՝୊ -ίʔυϕʔεͷ౷߹ํ๏- • ίʔυͷऔಘ͸BazelΛ࢖͏͔submodule • େྔͷsubmodule͕ൃੜ • සൟʹϦϏδϣϯ͕ζϨͯେม

Slide 22

Slide 22 text

՝୊ -BUILDϑΝΠϧͷఆٛ- • ֤ґଘʹରͯ͠BUILDϑΝΠϧͷఆ͕ٛඞཁ • podspec΍Package.swiftͷΑ͏ͳ΋ͷ • ϚχϑΣετͷมߋʹ௥ै͍ͯ͘͠ඞཁ͕͋ ΓɺΞοϓσʔτ͕େม

Slide 23

Slide 23 text

՝୊ -όʔδϣϯϦκϧό͕ͳ͍- • όʔδϣϯϦκϧό͕ͳ͍ • ґଘؔ܎ͷղܾ͕ਓྗ • ґଘ͕ґଘΛؚΉ৔߹ͷղܾ͕೉͍͠ http_archive( name = "APIKit", build_file = "//Configuration/repositories:APIKit.BUILD", sha256 = "0d19ebb5769ca464c7b10671ca1df21b8e9edad198f59e2d854c48cc580383 43", strip_prefix = "APIKit-5.0.0", url = "https://github.com/ishkawa/APIKit/archive/ 5.0.0.tar.gz", ) http_archive( name = "APNGKit", build_file = "//Configuration/repositories:APNGKit.BUILD", sha256 = "89245edaabcda2872141ecfcfad6d88fa5f0293af52a4cbcd2dd2fd6e3f931 99", strip_prefix = “APNGKit-2.2.1”, url = “https://github.com/onevcat/APNGKit/archive/ 2.2.1.tar.gz”, )

Slide 24

Slide 24 text

՝୊ -Xcodeͱͷ࿈ܞෆඋ- • ඪ४ػೳͷར༻͕೉͍͠ • σόοΨɺิ׬ɺίʔυδϟϯϓ

Slide 25

Slide 25 text

Ϗϧυ؀ڥ͕ϝϯς͞Εͣʹ ෛ࠴Խ

Slide 26

Slide 26 text

LINE iOSʹ͓͚ΔBazelͷޭࡑ • ͔֬ʹϏϧυ͸ૣ͘ͳ͕ͬͨŋŋŋŋŋŋ • ϝϯςφϯείετͷ૿େ • ֶशίετͷߴ͞ɺϏϧυઃఆͷෳࡶ͞ • ඪ४؀ڥͱ཭ΕΔ͜ͱͷσϝϦοτ • ৽ػೳ௥ैʹ͕͔͔࣌ؒΔ(Xcode Beta, Apple Silicon etc…) • Apple Siliconͷొ৔ͰϝϦοτ͕ݶఆతʹ • Bazel͸ܶༀͩͬͨ

Slide 27

Slide 27 text

͓͜ͱΘΓ • Bazelͷར༻ʹΑΓϏϧυ࣌ؒʹޮՌ͕͋ͬͨͷ͸ࣄ࣮ • BazelίϛϡχςΟʹΑΔiOSαϙʔτ͸ੵۃతʹଓ͍͍ͯΔ • rules_apple, rules_ios, rules_swift_package_manager, rules_xcodeprojͳͲ • େن໛ϓϩδΣΫτʹΑΔ࢖༻࣮੷΋ଟ͍ • BazelΛܧଓతʹϝϯςͰ͖ΔͷͰ͋Ε͹༗༻ • LINEͰ͸ద੾ʹӡ༻Ͱ͖ͳ͔ͬͨ

Slide 28

Slide 28 text

৽ͨͳཁٻ • ͱʹ͔͘ඪ४ͷϏϧυγεςϜΛ࢖͍͍ͨ • Ϗϧυ੒Ռ෺͕࠶ར༻Ͱ͖ͯΩϟογϡ͠΍͍͢ • ։ൃ͠΍͘͢ςετ͠΍͍͢ • ґଘؔ܎ͷΞοϓσʔτ͕͠΍͍͢

Slide 29

Slide 29 text

https://developer.apple.com/videos/play/wwdc2019/103/?time=1302 WWDC19 Platform State of the Union Swift Package

Slide 30

Slide 30 text

Swift Package + Xcode • Xcodeඪ४ͷSwift Package Manager͸࠷ߴͷղܾࡦ • ͜Ε͕࢖͑ΔͳΒ͹͜ΕΛ࢖͏΂͖

Slide 31

Slide 31 text

͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ ׬

Slide 32

Slide 32 text

Swift Package + Xcode • Xcodeඪ४ͷSwift Package Manager͸࠷ߴͷղܾࡦ • ͜Ε͕࢖͑ΔͳΒ͹͜ΕΛ࢖͏΂͖ • ͔͠͠ɺLINEΞϓϦͷن໛ + ϓϩδΣΫτߏ੒Ͱ͸ඪ४ػೳ͚ͩͰ͸೉͍͠

Slide 33

Slide 33 text

Ωϟογϡػߏͷෆ଍ • Swift Packageͷ੒Ռ෺͕شൃ͠΍͍͢ • DerivedDataʹอଘ • →100Λӽ͑Δґଘؔ܎ͷΩϟογϡʹ͸ෆద

Slide 34

Slide 34 text

ෳ਺ͷxcodeproj͔Βͷར༻ͷ೉͠͞ • LINE iOSϓϩδΣΫτ͸xcworkspaceʹ਺ඦͷxcodeprojΛ౷߹͍ͯ͠Δ • ͜ͷϓϩδΣΫτߏ੒ͰXcodeඪ४ͷSwift Package౷߹Λ࢖͏ͷ͸೉͍͠ …

Slide 35

Slide 35 text

ཧ૝ 1. SwiftPMʹΑΔSwift Packageͷґଘղܾͱऔಘ 2. Ϗϧυ੒Ռ෺ΛΩϟογϡɺڞ༗ɺ࠶ར༻ 3. XcodeϓϩδΣΫτ͔Βͷར༻

Slide 36

Slide 36 text

Scipio - An awesome build tool - https://github.com/giginet/Scipio

Slide 37

Slide 37 text

৽͍͠Ϗϧυπʔϧ Scipioͷ঺հ ୈ2ষ

Slide 38

Slide 38 text

Scipio • SwiftPMΛར༻ͯ͠XCFrameworkΛੜ੒͢ΔϏϧυπʔϧ • Swift PackageΛ࠶഑෍Մೳͳܗʹม׵ͯ͠ѻ͑Δ • ओͳػೳ • Ϧιʔεόϯυϧͷαϙʔτ • Static/Dynamic Frameworkͷੜ੒ • ϦϞʔτΩϟογϡγεςϜ

Slide 39

Slide 39 text

XCFrameworkͱ͸ • Apple͕։ൃͨ͠ϏϧυࡁΈϥΠϒϥϦΛ഑෍͢ΔͨΊͷܗࣜ • WWDC19Ͱൃද • ैདྷͷ Frameworkʹൺ΂ͯෳ਺ͷϓϥοτϑΥʔϜ޲͚ͷόΠφϦΛಉ࣌ʹ ഑෍Ͱ͖Δ • ࣮ଶ͸ͨͩͷσΟϨΫτϦʢBundleʣ • ෳ਺ͷϓϥοτϑΥʔϜͷFrameworkΛ֨ೲ͍ͯ͠Δ

Slide 40

Slide 40 text

MyFramework.xcframework Info.plist ios-arm64 ios-arm64_x86_64-simulator MyFramework.framework MyFramework.framework σΟϨΫτϦ ϝλσʔλ ϓϥοτϑΥʔϜɺΞʔΩςΫνϟ Framework

Slide 41

Slide 41 text

Scipioͷಈ࡞ͷྲྀΕ • SwiftPMͰύοέʔδϚχϑΣετ͔Βґ ଘؔ܎Λղܾ • ύοέʔδ͔ΒXCFrameworkΛੜ੒ Package.swiftͷresolve Swift PackageͷϏϧυ XCFrameworkͷੜ੒

Slide 42

Slide 42 text

ྫ͑͹Carthage • Carthage/Carthage • ࿝ฮͷύοέʔδϚωʔδϟʔ • XCFrameworkαϙʔτ͸͋Δ͕ • ϥΠϒϥϦ࡞ऀ͕xcodeprojΛઃஔ͢Δඞཁ͕͋Δ • ࠷ۙ͸ରԠ͠ͳ͍ϥΠϒϥϦ͕΄ͱΜͲ • ϝϯς͕ࢭ·͍ͬͯΔ

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

Scipio - An awesome build tool - https://github.com/giginet/Scipio

Slide 45

Slide 45 text

ୈ2ষͰ࿩͢͜ͱ • Scipioͷ঺հͱ࢓૊Έ • ར༻ํ๏ • ΩϟογϡγεςϜ • ϑϨʔϜϫʔΫੜ੒ͷํ๏ • ੜ੒ख๏ͷ঺հ • ϑϨʔϜϫʔΫͷߏ଄ • ੜ੒࣌ͷ໰୊఺ͱରࡦ

Slide 46

Slide 46 text

Scipioͷಈ࡞Ϟʔυ • prepareϞʔυ • ΞϓϦέʔγϣϯʹ࢖͏ґଘؔ܎Λهड़ͯ͠·ͱΊͯϏϧυ • createϞʔυ • ୯ମͷSwift Package͔ΒXCFrameworkΛੜ੒

Slide 47

Slide 47 text

1. ύοέʔδϚχϑΣετͷఆٛ // swift-tools-version: 5.7 import PackageDescription let package = Package( name: "Dependencies", platforms: [.iOS(.v13),], dependencies: [ .package(url: "https://github.com/apple/swift-log.git", from: "1.4.4"), .package(url: "https://github.com/apple/swift-collections.git", .upToNextMinor(from: "1.0.0")), ], targets: [ .target( name: "Dependencies", dependencies: [ .product(name: "Logging", package: "swift-log"), .product(name: "OrderedCollections", package: "swift-collections"), .product(name: "DequeModule", package: "swift-collections"), .product(name: "Collections", package: "swift-collections"), ]), ] ) Ϗϧυର৅ͷϓϥοτϑΥʔϜ ύοέʔδ Ϗϧυ͢Δλʔήοτ

Slide 48

Slide 48 text

2. prepareίϚϯυͷ࣮ߦ $ scipio prepare /path/to/Dependencies # Resolving Dependencies... $ Cleaning Dependencies... % Building OrderedCollections for iOS & Combining into XCFramework... % Building DequeModule for iOS & Combining into XCFramework... % Building Collections for iOS & Combining into XCFramework... % Building Logging for iOS & Combining into XCFramework... ❇ Succeeded.

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

createϞʔυ $ scipio create path/to/swift-log —platforms iOS —support-simulators # Resolving Dependencies... % Building Logging for iOS, iPhone Simulator & Combining into XCFramework... ❇ Succeeded. • SwiftPMͰύοέʔδϚχϑΣετ͔Βґଘؔ܎Λղܾ • ύοέʔδ͔ΒXCFrameworkΛੜ੒

Slide 51

Slide 51 text

https://giginet.github.io/Scipio/documentation/scipio ৄ͘͠͸DocC

Slide 52

Slide 52 text

ΩϟογϡγεςϜ

Slide 53

Slide 53 text

ScipioͷΩϟογϡγεςϜ • Scipio͸ΩϟογϡγεςϜΛඋ͍͑ͯΔ • prepareϞʔυ͸ੜ੒ࡁΈͷ੒Ռ෺͕͋Ε͹࠶ར༻͕Ͱ͖Δ $ scipio prepare /path/to/Dependencies # Resolving Dependencies... $ Cleaning Dependencies... ✅ Valid OrderedCollections.xcframework is exists. Skip building. ✅ Valid DequeModule.xcframework is exists. Skip building. ✅ Valid Collections.xcframework is exists. Skip building. ✅ Valid Logging.xcframework is exists. Skip building. ❇ Succeeded. ੜ੒ࡁΈͷϑϨʔϜϫʔΫ͸ ࠶ར༻͞ΕΔ

Slide 54

Slide 54 text

VersionFile • VersionFileͱ͍͏ϏϧυίϯςΩετΛؚΜͩJSONϑΝΠϧΛੜ੒ • Ϗϧυલʹ͜Ε͔ΒϏϧυ͢ΔύοέʔδͱɺϏϧυࡁΈ੒Ռ෺ͷಉҰੑΛ νΣοΫ • ಉҰͷ΋ͷ͕͋Ε͹ΩϟογϡΛར༻ͯ͠Ϗϧυ MyFramework.xcframework .MyFramework.version

Slide 55

Slide 55 text

{ "buildOptions" : { "buildConfiguration" : "debug", "enableLibraryEvolution" : false, "extraBuildParameters" : { "COPY_PHASE_STRIP" : "NO", "SWIFT_OPTIMIZATION_LEVEL" : "-Onone" }, "frameworkType" : "static", "isDebugSymbolsEmbedded" : true, "sdks" : [ "iOS", "iOSSimulator", "watchOS", "watchOSSimulator" ] }, "clangVersion" : "clang-1403.0.22.14.1", "pin" : { "revision" : "32e8d724467f8fe623624570367e3d50c5638e46", "version" : "1.5.2" }, "scipioVersion" : "9456405b33f2a25c479ea31cad0ba3c0222d9e20", "targetName" : "Logging" }

Slide 56

Slide 56 text

ProjectΩϟογϡ • ग़ྗઌσΟϨΫτϦͷΈΛΩϟογϡͱ ͯ͠ѻ͏ϙϦγʔ • ग़ྗઌͷXCFramework͕͜Ε͔ΒϏϧυ ͢Δ΋ͷͱಉҰͳΒ͹εΩοϓ MyFramework.xcframework .MyFramework.version XCFrameworks

Slide 57

Slide 57 text

Local DiskΩϟογϡ • γεςϜΩϟογϡσΟϨΫτϦ(~/ Library/Cache)ʹ੒Ռ෺Λ଴ආ • Ϗϧυ࣌ʹVersionFileͷϋογϡ͔ ΒΩϟογϡ͕͋Ε͹෮ݩ • ಉ͡Ϛγϯ಺ͰաڈʹϏϧυͨ͠ ͜ͱ͕͋Δ੒Ռ෺Λ࢖͍ճͤΔ • ෳ਺ͷXcodeόʔδϣϯͷ੾Γସ ͑࣌΍ϒϥϯνͷ੾Γସ͑࣌ʹ༗ ༻ MyFramework.xcframework XCFrameworks γεςϜΩϟογϡσΟϨΫτϦ 6cc7dbe.xcframework 17aef70.xcframework ෮ݩ

Slide 58

Slide 58 text

Remote DiskΩϟογϡ • Local Disk CacheΛϦϞʔτσΟε Ϋʹ֦ு • ։ൃऀؒͰΩϟογϡͷ࠶ར༻͕Մ ೳʹ • Amazon S3༻ͷόοΫΤϯυΛఏڙ MyFramework.xcframework XCFrameworks ϦϞʔτΦϒδΣΫτετϨʔδ ෮ݩ ! 6cc7dbe.xcframework 17aef70.xcframework

Slide 59

Slide 59 text

XCFrameworkͷੜ੒ख๏

Slide 60

Slide 60 text

swift-create-xcframework • unsignedapps/swift-create-xcframework • SwiftPM͔ΒXCFrameworkΛ࡞੒͢Δπʔϧ • ScipioͷcreateϞʔυʹ͍ۙ • xcodeprojΛੜ੒͠ɺxcodebuildͰϏϧυ͍ͯ͠Δ • xcodeprojͷੜ੒ʹ͸generate-xcodeprojͱ͍͏SwiftPMͷαϒίϚϯυΛ ࢖͍ͬͯΔ

Slide 61

Slide 61 text

چख๏ɿxcodeprojΛ࢖ͬͨFrameworkੜ੒ • SwiftPM͔ΒxcodeprojΛੜ੒ˠxcodebuildͰϏϧυ • SwiftPMʹ͸xcodeprojΛੜ੒͢ΔίϚϯυ͕෇ଐ͠ ͍ͯΔ $ swift package generate-xcodeproj generate-xcodeproj xcodebuild

Slide 62

Slide 62 text

چख๏ɿxcodeprojΛ࢖ͬͨFrameworkੜ੒ • SwiftPM͔ΒxcodeprojΛੜ੒ˠxcodebuildͰϏϧυ • SwiftPMʹ͸xcodeprojΛੜ੒͢ΔίϚϯυ͕෇ଐ͠ ͍ͯΔ • →͕ɺSwift 5.8(Xcode 14.0)͔Β࡟আ $ swift package generate-xcodeproj generate-xcodeproj xcodebuild

Slide 63

Slide 63 text

ఏҊख๏ɿPIFΛ࢖ͬͨFrameworkੜ੒ • PIFͱݺ͹ΕΔ಺෦දݱΛར༻ͯ͠ϑϨʔϜϫʔΫ Ϗϧυ͢Δख๏ • Scipio͸SwiftPM͕ੜ੒͢ΔPIFΛదٓॻ͖׵͑ ͯϑϨʔϜϫʔΫΛੜ੒͍ͯ͠Δ dump-pif xcodebuild

Slide 64

Slide 64 text

PIF(The Project Interchange Format) • SwiftPM͕ϏϧυγεςϜͱ௨৴͢ΔͨΊͷϑΥʔϚοτ • ࣮ଶ͸JSON • xcodeprojͷߏ଄ʹࠅࣅ • SwiftPMͷαϒίϚϯυͰੜ੒ग़དྷΔ $ swift package dump-pif dump-pif xcodebuild

Slide 65

Slide 65 text

[ { "contents" : { "guid" : “Workspace:/Users/giginet/.ghq/github.com/apple/swift-log@11", "name" : "swift-log", "path" : "/Users/giginet/.ghq/github.com/apple/swift-log", "projects" : [ "c44c70d170d7f592dc973df88b2326051b86b7958e1560c32c2b31d19fb714aa", "939870cd480866e3c56cbb743773b1add4e3a3d79277ede53c31eb6377cbea92", "024e214b7e54ed6ea3153ebf0698b3ab88ca40336b27bc1c9dbdb39d2d261ccf" ] }, "signature" : "35c4ad5e4b5e02d91fb54f4805e7aed41ba7f21d782e1622519ee2cd2b8980e4", "type" : "workspace" }, { "contents" : { "buildConfigurations" : [ { "buildSettings" : { "CLANG_ENABLE_OBJC_ARC" : "YES", "CODE_SIGN_IDENTITY" : "", "CODE_SIGNING_REQUIRED" : "NO", "COPY_PHASE_STRIP" : "NO", "DEBUG_INFORMATION_FORMAT" : "dwarf", "DRIVERKIT_DEPLOYMENT_TARGET" : "19.0", "DYLIB_INSTALL_NAME_BASE" : "@rpath", "ENABLE_NS_ASSERTIONS" : "YES", "ENABLE_TESTABILITY" : "YES", "ENABLE_TESTING_SEARCH_PATHS" : "YES", "ENTITLEMENTS_REQUIRED" : "NO", "FRAMEWORK_SEARCH_PATHS[__platform_filter=ios;ios-simulator]" : [ "$(inherited)", "$(PLATFORM_DIR)/Developer/Library/Frameworks" ], "FRAMEWORK_SEARCH_PATHS[__platform_filter=macos]" : [ "$(inherited)", XCConfigΈ͍ͨͳͷ͕ຒ·ͬͯΔ

Slide 66

Slide 66 text

PIFΛ࢖ͬͨύοέʔδͷϏϧυ • ύοέʔδͷϏϧυʹXcodeΛ࢖͏ϞʔυΛબ΂Δ • SwiftPM͕಺෦తʹPIFΛੜ੒͠ɺXcodeʹ౉ͯ͠ύοέʔδΛϏϧυ $ swift build --build-system xcode

Slide 67

Slide 67 text

XCBuild • Xcode΍xcodebuild͕಺෦Ͱར༻͍ͯ͠ΔϏϧυπʔϧΒ͍͠ • XcodeͷToolchainʹ෇ଐ͍ͯ͠Δ • Ҿ਺ʹPIFΛ౉͢ͱ͔ͦ͜ΒϏϧυͯ͘͠ΕΔ $ export xcbuild=/Applications/Xcode.app/Contents/ SharedFrameworks/XCBuild.framework/Versions/A/Support/ xcbuild $ xcbuild build my-package.pif \ --target MyPackage \ --derivedDataPath ./build/scipio

Slide 68

Slide 68 text

XCFrameworkͷੜ੒ • xcodebuildͷ-create-xcframeworkίϚϯυͰͰ͖Δ • ෳ਺ͷFrameworkΛ౉ͯ͠౷߹͢Δ͚ͩ • https://help.apple.com/xcode/mac/11.0/#/dev544efab96 $ xcodebuild -create-xcframework \ -framework Release-iphoneos/MyPackage.framework \ -framework Release-iphonesimulator/MyPackage.framework \ -output MyFramework.xcframework

Slide 69

Slide 69 text

ϑϨʔϜϫʔΫͷߏ଄ͱ՝୊

Slide 70

Slide 70 text

ϑϨʔϜϫʔΫͷߏ଄ͱ՝୊ • Frameworkͷछྨͱ՝୊ • Swiftλʔήοτ • Library Evolutionͷ੍໿ • Clangλʔήοτ • ϔομʔߏ଄ͷ໰୊ • Ϧιʔεαϙʔτͷ࢓૊Έ

Slide 71

Slide 71 text

Swiftλʔήοτ • SwiftͷΈͰߏ੒͞Εͨλʔήοτ • ΄ͱΜͲͷ৔߹ɺ؆୯ʹϑϨʔϜϫʔΫԽͰ͖Δ • Ұ෦ͦΕ͚ͩͰ͸ϏϧυͰ͖ͳ͍ྫ͕͋Δʢޙड़ʣ

Slide 72

Slide 72 text

MyFramework.framework MyFramework Info.plist ϝλσʔλ Modules MyFramework.swiftmodule ΠϯλʔϑΣΠεެ։͢ΔόΠφϦΛ࣋ͭ ʢswiftmoduleʣ ϥΠϒϥϦຊମ

Slide 73

Slide 73 text

Library Evolution • ϏϧυࡁΈͷϑϨʔϜϫʔΫΛSwiftόʔδϣϯʹΑΒͣʹ࢖͑ΔΑ͏ʹ͢Δ ࢓૊ΈʢABI Stabilityʣ • https://www.swift.org/blog/library-evolution/ • BUILD_LIBRARY_FOR_DISTRIBUTIONΛ༗ޮԽ͢Δͱੜ੒ • Frameworkʹswiftinterfaceͱ͍͏ఆ͕ٛੜ੒͞ΕΔ • ࣮ଶ͸ςΩετϑΝΠϧ

Slide 74

Slide 74 text

MyFramework.framework MyFramework Info.plist swiftinterface ίϯύΠϥόʔδϣϯʹدΒͣޓ׵͕อͨΕΔΠϯλʔϑΣΠε Modules MyFramework.swiftmodule MyFramework.swiftinterface

Slide 75

Slide 75 text

// swift-interface-format-version: 1.0 // swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) // swift-module-flags: -target arm64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name Logging // swift-module-flags-ignorable: -enable-bare-slash-regex import Darwin import Swift import _Concurrency import _StringProcessing public protocol LogHandler : Logging._SwiftLogSendableLogHandler { var metadataProvider: Logging.Logger.MetadataProvider? { get set } func log(level: Logging.Logger.Level, message: Logging.Logger.Message, metadata: Logging.Logger.Metadata?, source: Swift.String, file: Swift.String, function: Swift.String, line: Swift.UInt) @available(*, deprecated, renamed: "log(level:message:metadata:source:file:function:line:)") func log(level: Logging.Logger.Level, message: Logging.Logger.Message, metadata: Logging.Logger.Metadata?, file: Swift.String, function: Swift.String, line: Swift.UInt) subscript(metadataKey _: Swift.String) -> Logging.Logger.Metadata.Value? { get set } var metadata: Logging.Logger.Metadata { get set } var logLevel: Logging.Logger.Level { get set } } extension Logging.LogHandler { public var metadataProvider: Logging.Logger.MetadataProvider? { get set } } extension Logging.LogHandler { @available(*, deprecated, message: "You should implement this method instead of using the default implementation") public func log(level: Logging.Logger.Level, message: Logging.Logger.Message, metadata: Logging.Logger.Metadata?, source: Swift.String, file: Swift.String, function: Swift.String, line: Swift.UInt)

Slide 76

Slide 76 text

Library Evolutionͷ੍ݶ • Ұ෦ͷύοέʔδ͸Library EvolutionʹରԠͰ͖ͳ͍ͨΊϏϧυͰ͖ͳ͍ • swift-nio, swift-collectionsͳͲ΋ • ࣮૷ͷΠϯϥΠϯԽͳͲɺޓ׵ੑҡ͕࣋Ͱ͖ͳ͍ݴޠ࢓༷Λ࢖༻͍ͯ͠ Δέʔε͕͋ΔͨΊ • ͜ΕΒΛϑϨʔϜϫʔΫԽ͢Δͱ͖͸ແޮԽ͢Δඞཁ͕͋Δ

Slide 77

Slide 77 text

Library EvolutionΛແޮԽͨ͠XCFramework • ී௨ʹXCFrameworkΛ࡞ΔͱɺLibrary Evolution͕ແޮԽ͞ΕͨFramework͔ Β͸ੜ੒Ͱ͖ͳ͍ʢΤϥʔ͕ग़ͯ͠·͏ʣ • Library EvolutionΛແޮԽͨ͠ϑϨʔϜϫʔΫΛXCFrameworkԽ͢Δ৔߹ɺ`- allow-internal-distribution` ͕ඞཁ $ xcodebuild -create-xcframework \ -framework Release-iphoneos/MyPackage.framework \ -framework Release-iphonesimulator/MyPackage.framework \ -output MyFramework.xcframework \ -allow-internal-distribution

Slide 78

Slide 78 text

ScipioͰͷLibrary Evolution • ී௨͸XCFrameworkͷੜ੒͸Library Evolutionͷ༗ޮԽ͕ਪ঑͞ΕΔ • ScipioͷϢʔεέʔεͷΑ͏ʹಉ͡ϓϩδΣΫτ಺Ͱͷར༻͕อূ͞ΕΔ৔ ߹ɺແޮʹ͢Δ͜ͱ΋Ͱ͖Δ • ScipioͰ͸σϑΥϧτͰΦϑʹͳ͍ͬͯΔ • —enable-library-evolutionͰ༗ޮԽ

Slide 79

Slide 79 text

Clangλʔήοτ • C, ObjCͳͲͷ࣮૷Λ࣋ͭλʔήοτ • Swiftλʔήοτͱ͸ҟͳΓHeader, modulemapͷग़ྗ͕ඞਢ • ͜ͷลͷߏ੒ʹΑΓγϯϓϧʹFrameworkԽͰ͖ͳ͍ྫ͕͋Δ

Slide 80

Slide 80 text

MyFramework.framework MyFramework Info.plist ϝλσʔλ Modules Headers ϥΠϒϥϦຊମ module.modulemap MyFramework.h ϔομʔ modulemap ŋ ŋ ŋ

Slide 81

Slide 81 text

modulemapͱ͸ • ෳ਺ͷϔομʔΛϞδϡʔϧͱͯ͠ѻ͏ͨΊͷϚοϐϯάΛهड़͢ΔϑΝΠϧ • ͜ΕʹΑͬͯ import MyFramework Ͱϔομʔʹఆٛ͞ΕͨΠϯλʔϑΣΠε ΛࢀরͰ͖Δ framework module MyFramework { header “MyFramework.h" header “Model.h" header “Runner.h" export * } Ϟδϡʔϧ໊

Slide 82

Slide 82 text

ClangλʔήοτͷϑϨʔϜϫʔΫԽ • SwiftλʔήοτͷϑϨʔϜϫʔΫԽͱҟͳΓෳࡶ • ϔομʔͷincludeࢦఆʹΑΓϑϨʔϜϫʔΫԽͨ͠ͱ͖ʹյΕΔ͜ͱ͕͋Δ • ScipioͰϏϧυͰ͖ͳ͍έʔεͷଟ͘͸͜ΕʹىҼ͢Δ

Slide 83

Slide 83 text

Mixed Languageλʔήοτ • SwiftͱC FamilyͳͲɺෳ਺ͷݴޠΛ࣋ͭλʔήοτ • ݱঢ়ͷSwiftPMͰ͸ະରԠͷͨΊɺScipioͰ΋αϙʔτ͍ͯ͠ͳ͍ • SE-403 Package Manager Mixed Language Target Supportͱ࣮ͯ͠૷͕ܾ ·͍ͬͯΔ͕·ͩ࢖͑ͳ͍

Slide 84

Slide 84 text

Resourceαϙʔτ • Swift Package͸Ϧιʔε͕ѻ͑Δ • FrameworkԽͨ͠৔߹΋ϦιʔεόϯυϧΛؚΉ͜ͱ͕Ͱ͖Δ • Ϧιʔεόϯυϧ͸PIFͷ࣌఺Ͱఆٛ͞Ε͍ͯΔͨΊɺϏϧυγεςϜ͕উ खʹ࡞ͬͯ͘ΕΔ

Slide 85

Slide 85 text

MyFramework.framework MyFramework Info.plist Modules MyFramework.bundle ϦιʔεόϯυϧʢσΟϨΫτϦʣ

Slide 86

Slide 86 text

Bundle.moduleαϙʔτ • Swift Package͸Bundle.module͔ΒϦιʔεʹΞΫηεͰ͖Δ • ࣮ଶ͸SwiftPM͕Ϗϧυ࣌ʹextensionΛૠೖ͍ͯ͠Δ • ScipioͰϑϨʔϜϫʔΫԽͨ͠৔߹΋ಉ͡Α͏ʹ࢖͑Δ let resourceURL = Bundle.module.url( forResource: "image", withExtension: “png” )

Slide 87

Slide 87 text

https://github.com/apple/swift-package-manager/blob/667a00670becac532b85dcd46caeacd1c3a5bdda/Sources/Build/BuildDescription/SwiftTargetBuildDescription.swift#L324 SwiftPM͕Ϗϧυ࣌ʹextension༻ͷίʔυΛੜ੒ͯ͠௥Ճ͍ͯ͠Δ

Slide 88

Slide 88 text

Scipioͷར఺ • SwiftPM + XcodeΛϕʔεͱ͍ͯ͠ΔͨΊյΕͮΒ͍ • ґଘղܾ΍औಘΛ௨ৗͷSwiftPMͱಉ༷ʹߦ͏ • SwiftPM͕ϝϯς͞ΕΔݶΓ͸େ͖͘มߋ͞ΕͮΒ͍

Slide 89

Slide 89 text

Scipioͷར఺ • ࣙΊ΍͍͢ • ґଘ͕Swift PackageͰ͋Δ͜ͱ͸มΘΒͳ͍ͨΊɺ௨ৗར༻Ͱ໰୊ͳ͍৔ ߹͸ɺ௨ৗͷ౷߹ํ๏ʹ໭ͤΔ • ෦෼తʹXcode౷߹Λߦ͍ɺΩϟογϡ͍ͨ͠෦෼͚ͩXCFrameworkͱ͠ ͯѻ͏͜ͱ΋Ͱ͖Δ

Slide 90

Slide 90 text

ୈ2ষ·ͱΊ • Scipioͱ͍͏ϏϧυπʔϧΛ࡞ͬͯXCFrameworkΛੜ੒͍ͯ͠Δ • SwiftPMͷج൫ʹ৐Δ͜ͱͰɺͳΔ΂͘؆୯ʹੜ੒Ͱ͖ΔΑ͏ʹ͍ͯ͠Δ • ΩϟογϡγεςϜ΋͋Γɺ੒Ռ෺ͷ࠶ར༻΍ڞ༗͕༰қ • Ͳ͏ͧ͝ར༻͍ͩ͘͞ • https://github.com/giginet/Scipio

Slide 91

Slide 91 text

LINE iOSͷ ϏϧυγεςϜͰͷ׆༻ ୈ3ষ

Slide 92

Slide 92 text

LINE iOSϏϧυج൫΁ͷదԠ • ։ൃͨ͠ϏϧυπʔϧͰLINE iOSͷϏϧυج൫ΛͲͷΑ͏ʹվળ͔ͨ͠ • Prebuilt Task͔ΒͲͷΑ͏ʹBazelͷར༻Λ֎͍͔ͯ͘͠ Bazel PrebuiltλεΫ

Slide 93

Slide 93 text

PrebuiltλεΫͷඪ४Խ • OSSϥΠϒϥϦͷFrameworkԽ • ࣾ಺࣮૷ͷFrameworkԽ • όΠφϦϑϨʔϜϫʔΫͷऔಘ • APIεΩʔϜ͔Βͷίʔυੜ੒

Slide 94

Slide 94 text

PrebuiltλεΫͷඪ४Խ • OSSϥΠϒϥϦͷFrameworkԽ • ࣾ಺࣮૷ͷFrameworkԽ • όΠφϦϑϨʔϜϫʔΫͷऔಘ • APIεΩʔϜ͔Βͷίʔυੜ੒ XCFrameworkԽ XCFramework or XcodeϓϩδΣΫτԽ Swift PackageԽ Build Tools PluginԽ

Slide 95

Slide 95 text

PrebuiltλεΫͷඪ४Խ • OSSϥΠϒϥϦͷFrameworkԽ • ࣾ಺࣮૷ͷFrameworkԽ • όΠφϦϑϨʔϜϫʔΫͷऔಘ • APIεΩʔϜ͔Βͷίʔυੜ੒ XCFrameworkԽ XCFramework or XcodeϓϩδΣΫτԽ Swift PackageԽ Build Tools PluginԽ

Slide 96

Slide 96 text

OSSϥΠϒϥϦͷঢ়گ • 60~70͍ۙOSSϥΠϒϥϦ • ར༻ঢ়گ͕ෆ໌ͳ΋ͷ • ਺೥લ͔Βόʔδϣϯ͕ஔ͍͍͔ͯΕͯΔ΋ͷ • upstream͕obsoleteʹͳ͍ͬͯΔ΋ͷ • forkͯ͠patchΛ౰͍ͯͯΔ΋ͷ

Slide 97

Slide 97 text

upstream͕ ϝϯς͞ΕͯΔ͔ ֎͢ ґଘΛ֎ͤΔ͔ PackageԽ ͞ΕͯΔ͔ XCFrameworkԽ forkͯ͠PackageԽ ࣮૷ͷҰ෦ΛҠ͢ Ξοϓσʔτ upstreamͷPackageԽ ࣮૷ΛҠͤΔ͔

Slide 98

Slide 98 text

upstream͕ ϝϯς͞ΕͯΔ͔ ֎͢ ґଘΛ֎ͤΔ͔ PackageԽ ͞ΕͯΔ͔ XCFrameworkԽ forkͯ͠PackageԽ ࣮૷ͷҰ෦ΛҠ͢ Ξοϓσʔτ upstreamͷPackageԽ ࣮૷ΛҠͤΔ͔

Slide 99

Slide 99 text

upstream͕ ϝϯς͞ΕͯΔ͔ ֎͢ ґଘΛ֎ͤΔ͔ PackageԽ ͞ΕͯΔ͔ XCFrameworkԽ forkͯ͠PackageԽ ࣮૷ͷҰ෦ΛҠ͢ Ξοϓσʔτ upstreamͷPackageԽ ࣮૷ΛҠͤΔ͔

Slide 100

Slide 100 text

ϝϯς͞ΕͯΔϥΠϒϥϦ • ͢ͰʹPackageରԠ͞Ε͍ͯΔ΋ͷ͔ΒঃʑʹରԠ͍ͯ͘͠ • όʔδϣϯ͕ஔ͍ͯߦ͔ΕͯΔ΋ͷ͸Ξοϓσʔτ • upstream͕ରԠ͍ͯ͠ͳ͍΋ͷ͸ରԠ

Slide 101

Slide 101 text

upstream͕ ϝϯς͞ΕͯΔ͔ ֎͢ ґଘΛ֎ͤΔ͔ PackageԽ ͞ΕͯΔ͔ XCFrameworkԽ forkͯ͠PackageԽ ࣮૷ͷҰ෦ΛҠ͢ Ξοϓσʔτ upstreamͷPackageԽ ࣮૷ΛҠͤΔ͔

Slide 102

Slide 102 text

ϝϯς͕ࢭ·ͬͨϥΠϒϥϦ • ObjC࣌୅ͷϥΠϒϥϦͳͲɺ਺೥લʹ౷߹͞Εͯɺ୭΋ϝϯς͠ͳ͍· ·์ஔ͞Εͨґଘؔ܎͕ଟ਺ • Ұ෦࣮૷͚ͩҠͤΔ৔߹͸ɺϥΠηϯεΛҡ࣋ͨ͠··ίʔυͷΈΛҠ ͠ɺґଘ͸࡟আ

Slide 103

Slide 103 text

fork͸࠷ऴखஈ • Ͳ͏ʹ΋ͳΒͳ͍৔߹͸࠷ऴखஈͰfork • forkΛϏϧυ͠΍͍͢Α͏ʹύοέʔδԽ • কདྷతʹফͤΔΑ͏ʹ࣮૷ΛݮΒ͢λεΫԽɻ௕ظతʹ ͍ͯ͘͠

Slide 104

Slide 104 text

PrebuiltλεΫͷඪ४Խ • OSSϥΠϒϥϦͷFrameworkԽ • ࣾ಺࣮૷ͷFrameworkԽ • όΠφϦϑϨʔϜϫʔΫͷऔಘ • APIεΩʔϜ͔Βͷίʔυੜ੒ XCFrameworkԽ XCFramework or XcodeϓϩδΣΫτԽ Swift PackageԽ Build Tools PluginԽ

Slide 105

Slide 105 text

ࣾ಺ϥΠϒϥϦͷSwiftPMԽ • ࣾ಺ϥΠϒϥϦͰPrebuiltϑϨʔϜϫʔΫԽ͠΍͍͢΋ͷ͸ύοέʔδରԠ • σϞΞϓϦͷ։ൃͰඪ४తͳར༻͕Ͱ͖ΔΑ͏ʹͳͬͨ • Ұ෦೉͍͠ύοέʔδԽ͕೉͍͠έʔε͸XcodeϓϩδΣΫτԽ • Mixed Language Target(Swift/ObjCͷࠞ੒λʔήοτ) • ґଘ͕ଟ͘࠶ؼతʹύοέʔδԽ͕ඞཁͳέʔε

Slide 106

Slide 106 text

PrebuiltλεΫͷඪ४Խ • OSSϥΠϒϥϦͷFrameworkԽ • ࣾ಺࣮૷ͷFrameworkԽ • όΠφϦϑϨʔϜϫʔΫͷऔಘ • APIεΩʔϜ͔Βͷίʔυੜ੒ XCFrameworkԽ XCFramework or XcodeϓϩδΣΫτԽ Swift PackageԽ Build Tools PluginԽ

Slide 107

Slide 107 text

όΠφϦϑϨʔϜϫʔΫͷϥΠϒϥϦԽ • ਂԕͳࣄ৘ʹΑΓɺϏϧυࡁΈͷϑϨʔϜϫʔΫΛ౷߹͢Δඞཁ͕͋Δ • Swift PackageͷBinaryTargetΛར༻ • Scipio͸binaryTarget΋ѻ͏͜ͱ͕Ͱ͖Δ

Slide 108

Slide 108 text

let package = Package( name: "CompanySDK", platforms: [ .iOS(.v13) ], products: [ .library( name: "CompanySDK", targets: ["CompanySDK"] ), ], targets: [ .binaryTarget( name: "CompanySDK", path: "path/to/CompanySDK.xcframework" ), ] )

Slide 109

Slide 109 text

PrebuiltλεΫͷඪ४Խ • OSSϥΠϒϥϦͷFrameworkԽ • ࣾ಺࣮૷ͷFrameworkԽ • όΠφϦϑϨʔϜϫʔΫͷऔಘ • APIεΩʔϜ͔Βͷίʔυੜ੒ XCFrameworkԽ XCFramework or XcodeϓϩδΣΫτԽ Swift PackageԽ Build Tools PluginԽ

Slide 110

Slide 110 text

ίʔυੜ੒λεΫͷҠߦ • SwiftGen΍APIεΩʔϚ(Apache Thrift)ͷίʔυΛੜ੒͠ɺprebuiltϑϨʔϜ ϫʔΫΛ࡞੒͍ͯͨ͠ Bazel APIεΩʔϜ ੜ੒͞Εͨίʔυ Framework ੜ੒ Ϗϧυ Before

Slide 111

Slide 111 text

ίʔυੜ੒λεΫͷҠߦ • prebuiltԽ͸೉͔ͬͨͨ͠ΊɺXcodeϓϩδΣΫτԽͯ͠XCWorkspaceʹ౷߹ • ίʔυੜ੒͸Build Tools PluginԽ APIεΩʔϜ Framework xcodeproj Build Tools Plugin ੜ੒+Ϗϧυ Xcode After

Slide 112

Slide 112 text

·ͱΊɿBazel͔Βඪ४ͷϏϧυγεςϜ΁ͷҠߦ • ଟ͘ͷϥΠϒϥϦ͸Swift PackageԽͯ͠ScipioͰXCFrameworkʹϏϧυ • ϏϧυࡁΈϑϨʔϜϫʔΫ͸Swift PackageͷBinary TargetԽ • ෳࡶͳߏ੒ͷϏϧυ͸XcodeϓϩδΣΫτԽ + XCWorkspace౷߹ • ίʔυੜ੒ͳͲલॲཧ͸Build Tools PluginԽ

Slide 113

Slide 113 text

Framework XCFramework Ҡߦͨ͠ʂ

Slide 114

Slide 114 text

Apple SiliconγϛϡϨʔλରԠ • ࠓ·Ͱ͸Bazel͔ΒFrameworkΛੜ੒͍ͯͨ͠ͷͰɺෳ਺ճϏϧυͯ͠ڧҾʹ γϛϡϨʔλʔରԠΛ͍ͯͨ͠ Bazel Library.framework(ios-arm64) Library.framework(simulator-x86_64) Library.framework(simulator-arm64) Before

Slide 115

Slide 115 text

Apple SiliconγϛϡϨʔλରԠ • XCFrameworkʹ౷߹͞ΕΔ͜ͱͰγϯϓϧʹͳͬͨ Scipio Library.xcframework After

Slide 116

Slide 116 text

watchOS༻ϑϨʔϜϫʔΫରԠ • iOS, watchOS྆ํ͔ΒಉҰϑϨʔϜϫʔΫΛར༻͢Δͱ͖ɺϦωʔϜͯ͠ผ ໊ͷwatchOS༻Λ࡞੒͍ͯͨ͠ʢγϛϡϨʔλʔ༻΋ʣ Bazel Library.framework WatchLibrary.framework Before

Slide 117

Slide 117 text

watchOS༻ϑϨʔϜϫʔΫରԠ • 1ͭͷXCFrameworkʹෳ਺ͷϓϥοτϑΥʔϜΛؚΊΔΑ͏ʹͳͬͨͷ Ͱɺ1ͭʹ౷߹Ͱ͖ͨɻϦωʔϜ΋ෆཁ Scipio Library.xcframework After

Slide 118

Slide 118 text

ϦϞʔτΩϟογϡͷӡ༻ • ScipioͷϦϞʔτΩϟογϡػೳΛ࢖ͬͯɺΦϒδΣΫτετϨʔδʹ XCFrameworkΛอଘ • ։ൃऀ͸ϑϨʔϜϫʔΫΛऔಘ͢Δ͚ͩͰΞϓϦέʔγϣϯϏϧυ͕Ͱ͖Δ Α͏ʹ

Slide 119

Slide 119 text

6cc7dbe.xcframework 17aef70.xcframework ŋ ŋ ŋ Package.swift Package.swiftͷมߋΛݕ஌

Slide 120

Slide 120 text

6cc7dbe.xcframework 17aef70.xcframework ŋ ŋ ŋ Package.swift CI͕ScipioͰXCFrameworkੜ੒ ΦϒδΣΫτετϨʔδʢS3ޓ׵ʣ

Slide 121

Slide 121 text

6cc7dbe.xcframework 17aef70.xcframework ŋ ŋ ŋ Package.swift ։ൃऀ͕Ϗϧυ࣌ʹXCFrameworkΛ औಘʢPublic URLʣ

Slide 122

Slide 122 text

6cc7dbe.xcframework 17aef70.xcframework ŋ ŋ ŋ Package.swift ϑϨʔϜϫʔΫͷϏϧυ͕ෆཁʹ

Slide 123

Slide 123 text

No content

Slide 124

Slide 124 text

Ҡߦͷ݁Ռ - Ϗϧυ࣌ؒ PrebuiltλεΫ XcodeϏϧυ ߹ܭ 2022/11 920s 500s 1,420s ݱࡏʢΩϟογϡ ͳ͠ʣ 776s 590s 1,366s ݱࡏʢΩϟογϡ ͋Γʣ 220s 810s

Slide 125

Slide 125 text

Ҡߦͷ݁Ռ - Ϗϧυ࣌ؒ PrebuiltλεΫ XcodeϏϧυ ߹ܭ 2022/11 920s 500s 1,420s ݱࡏʢΩϟογϡ ͳ͠ʣ 776s 590s 1,366s ݱࡏʢΩϟογϡ ͋Γʣ 220s 810s x3.5 9෼16ඵվળ

Slide 126

Slide 126 text

Ҡߦͷ݁Ռ - Ϗϧυ࣌ؒ PrebuiltλεΫ XcodeϏϧυ ߹ܭ 2022/11 920s 500s 1,420s ݱࡏʢΩϟογϡ ͳ͠ʣ 776s 590s 1,366s ݱࡏʢΩϟογϡ ͋Γʣ 220s 810s x1.75

Slide 127

Slide 127 text

ࠓޙͷల๬ • ύοέʔδϚχϑΣετͷࣗಈߋ৽ • όʔδϣϯ͕ஔ͍ͯߦ͔Εͳ͍Α͏ʹ͢Δ

Slide 128

Slide 128 text

ࠓޙͷల๬ • WWDC23ͷ৽ػೳͷαϙʔτ • XCFrameworkͷMergeable LibraryରԠ • XCFrameworkͷॺ໊΍ϓϥΠόγʔϚχϑΣετରԠ

Slide 129

Slide 129 text

౰ॳͷ໨ඪ • ͱʹ͔͘ඪ४ͷϏϧυγεςϜΛ࢖͍͍ͨ • Ϗϧυ੒Ռ෺͕࠶ར༻Ͱ͖ͯΩϟογϡ͠΍͍͢ • ։ൃ͠΍͘͢ςετ͠΍͍͢ • ґଘؔ܎ͷΞοϓσʔτ͕͠΍͍͢

Slide 130

Slide 130 text

ୡ੒ʁ • ͱʹ͔͘ඪ४ͷϏϧυγεςϜΛ࢖͍͍ͨ • Ϗϧυ੒Ռ෺͕࠶ར༻Ͱ͖ͯΩϟογϡ͠΍͍͢ • ։ൃ͠΍͘͢ςετ͠΍͍͢ • ґଘؔ܎ͷΞοϓσʔτ͕͠΍͍͢

Slide 131

Slide 131 text

ඪ४ʁ • BazelΛ࢖͏ΑΓ͸ඪ४తͳߏ੒ʹ͍͕ۙͮͨ • ݱΕͨ৽ͨͳϏϧυγεςϜ • ඪ४ͷ࢓૊ΈΛ࢖͏޻෉͸͕ͨ͠ŋŋŋŋŋŋ • Scipioࣗମͷෳࡶ͞ • ୈ2ɺୈ3ͷෛ࠴Λ࢈ΜͰ͍Δ͚ͩઆ΋͋Δ

Slide 132

Slide 132 text

Swift PackageҠߦ͸ਖ਼ղ • ͱ͸͍͑ґଘͷSwift PackageԽ͸ਖ਼͍͠͸ͣ • ࠓޙඪ४ͷSwift Package౷߹͕ڧԽ͞Εͯɺͦ͜ʹ৐Δͷ͕Ұ൪ྑ͍ • →কདྷࠓͷߏ੒Λࣺͯ΍͘͢ͳͬͨ

Slide 133

Slide 133 text

ඪ४ͷ ϏϧυγεςϜΛ ࢖͓͏ʂʂʂ

Slide 134

Slide 134 text

·ͱΊ • Ϗϧυ؀ڥҠߦʹΑΓBazel͕શ෦֎ΕΔ໨ॲཱ͕͖ͬͯͨ • XCFrameworkԽͰɺ੒Ռ෺ΛΩϟογϡͭͭ͠։ൃͰ͖ΔΑ͏ʹͳͬͨ • Scipio͸࣮༻ஈ֊ͳͷͰϥΠϒϥϦͷϏϧυʹ͓ࠔΓͷํ͸͝ར༻͍ͩ͘͞ • XcodeͷSwift Package౷߹Λ࢖ͬͯ໰୊͕ͳ͚Ε͹ී௨ʹ։ൃ͠Α͏ • ී௨͕͍ͪ͹Μ

Slide 135

Slide 135 text

Scipio - An awesome build tool - https://github.com/giginet/Scipio

Slide 136

Slide 136 text

͝ਗ਼ௌ ͋Γ͕ͱ͏ ͍͟͝·ͨ͠