目录
目录README.md

SwishAppStore

Upload your app to the App Store using Swift.

Usage

Import this into your Swish scripts so you can swish appstore whenever you would like to deploy.

In your Swish’s Package.swift

  dependencies: [
  .package(url: "https://github.com/FullQueueDeveloper/SwishAppStore.git", from: "0.1.0"),
  // ...
  ],
  targets: [
    .executableTarget(name: "appstore", dependencies: ["SwishAppStore"]),
    // ...
  ],

And the main.swift in your appstore target might look like this.

import SwishAppStore

guard let appleTeamID = ProcessInfo.processInfo.environment["APPLE_TEAM_ID"],
  let apploaderUsername = ProcessInfo.processInfo.environment["APPLOADER_USERNAME"],
  let apploaderPassword = ProcessInfo.processInfo.environment["APPLOADER_USERNAME"]
else {
  fatalError("Secrets missing")
}

let appStore = try AppStore(project: "MyProject.xcodeproj", scheme: "MyScheme")
try appStore.build(appleTeamID: appleTeamID)
try appStore.upload(credential: LiteralPasswordCredential(username: apploaderUsername, password: apploaderPassword))

This approach empowers you to store your secrets in the environment, or use Sh1Password to fetch secrets from 1Password.

Next steps

This package is super tiny. If your needs are more specific, you can easily copy the contents of the script into your own Swish scripts, and easily customize with the exact variations you requrie.

关于
37.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号