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

Introduction to Swiftlane

Khoa Pham
February 18, 2022

Introduction to Swiftlane

Introduction to Swiftlane
https://github.com/onmyway133/Swiftlane

Khoa Pham

February 18, 2022
Tweet

More Decks by Khoa Pham

Other Decks in Programming

Transcript

  1. Introduction to Swiftlane
    Khoa Pham
    @onmyway133
    onmyway133.com

    View Slide

  2. nomad
    https://github.com/nomad
    cuptertino: App Dev Center
    shenzhen: Building ipa
    houston: push notification
    venice: IAP
    dubao: passbook
    nashville: iTunes Connect

    View Slide

  3. fastlane
    https://fastlane.tools/
    sigh: provisiong profiles
    produce: create apps
    boarding: beta testers
    scan: run tests
    gym: build
    deliver: screenshots & metadata
    spaceship: AppStore Connect APIs

    View Slide

  4. No small feat
    !
    ENV, SharedValues, ensureenvvars
    !
    Remember how
    !
    Dependencies
    !
    Ruby stack
    !
    Swift
    !
    Type safe
    !
    Swift Package Manager

    View Slide

  5. Puma
    https://github.com/pumaswift/puma

    Combine + SwiftUI + resultBuilder

    Swift Package Manager

    Gabriel, Besar, Frederik

    View Slide

  6. Puma
    Workflow {
    RunScript()
    .content("echo hello")
    Build()
    .project("MyApp")
    .scheme("Production")
    Slack()
    .token(SLACK_TOKEN)
    .send(message: ...)
    }

    View Slide

  7. Swiftlane
    https://github.com/onmyway133/Swiftlane
    !
    async/await
    !
    Agrs
    !
    AppStore Connect

    View Slide

  8. Args
    -key=value
    -key value
    --key=value
    --key value
    -key1 value1
    -key1 value2
    order matters

    View Slide

  9. async/await
    let result1 = try await action1.run()
    let result2 = try await.action2.run(result1)

    View Slide

  10. Swiftlane
    var workflow = Workflow()
    workflow.directory = Settings.fs
    .homeDirectory()
    .appendingPathComponent("Projects/swiftlane/Examples/MyApp")
    workflow.xcodeApp = URL(string: "/Applications/Xcode.app")

    View Slide

  11. Swiftlane
    guard
    let issuerId = Settings.env["ASC_ISSUER_ID"],
    let privateKeyId = Settings.env["ASC_PRIVATE_KEY_ID"],
    let privateKey = Settings.env["ASC_PRIVATE_KEY"]
    else { return }
    let asc = try ASC(
    credential: AppStoreConnect.Credential(
    issuerId: issuerId,
    privateKeyId: privateKeyId,
    privateKey: privateKey
    )
    )

    View Slide

  12. AppStore Connect
    https://github.com/onmyway133/AppStoreConnect
    !
    OpenAPI specification
    !
    Json Web Token

    View Slide

  13. How to run Swiftlane
    import Swiftlane
    —Executable Swift Package
    —MacOS Command Line Tool application

    View Slide