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

MPPでSwift_Packagesを使ってみました.pdf

gmvalentino-tl
August 05, 2021
250

 MPPでSwift_Packagesを使ってみました.pdf

gmvalentino-tl

August 05, 2021
Tweet

Transcript

  1. About Me - Graduated with Master’s Degree from University of

    Illinois Urbana Champaign - Joined teamLab in April 2019 doing iOS (0.5 years) and Android (~1.5 years) development - Started working with Kotlin Multiplatform since early 2020
  2. Swift Package Manager Overview - First-party Dependency Manager integrated with

    the Swift build system - Group of source files that are compiled to form a module - Uses a manifest file Package.swift to define contents and dependencies https://swift.org/package-manager/ https://developer.apple.com/documentation/swift_packages https://github.com/apple/swift-package-manager
  3. Multiplatform Swift Package Plugin - Configuration https://github.com/ge-org/multiplatform-swiftpackage build.gradle.kts (shared) kotlin

    { ... multiplatformSwiftPackage { swiftToolsVersion("5.3") targetPlatforms { iOS { v("14") } } outputDirectory(File(project.projectDir, "SwiftPackage")) } }
  4. Link Swift Package in Xcode - Remote - Create Github

    repository - Initialize git inside SwiftPackage folder - git init, add, commit, branch, remote add origin, push https://github.com/gmvalentino8/MppSwiftPackageArtifacts
  5. Pros/Cons Pros: - First-party Dependency Manager - Minimal setup required

    - Works for either local or remote linking - Faster build and publishing Cons: - Third-party plugin - Haven’t found a way to include both local and remote in the same project