Class: Pindo::CertProcess::BaseCertOperator

Inherits:
Object
  • Object
show all
Defined in:
lib/pindo/module/cert/mode/base_cert_operator.rb

Overview

证书操作抽象基类定义证书创建和获取的统一接口

所有具体的证书操作类都必须继承此类,并实现以下两个方法:

  • create_and_install_certs: 创建证书并安装到本地

  • fetch_and_install_certs: 从存储后端获取证书并安装到本地

Instance Method Summary collapse

Instance Method Details

#create_and_install_certs(apple_id:, bundle_id_array:, cert_type:, platform_type:, project_dir: nil) ⇒ Array<Hash>

创建并安装证书(–renew 模式)

Parameters:

  • apple_id (String)

    Apple ID

  • bundle_id_array (Array<String>)

    Bundle ID 数组

  • cert_type (String)

    证书类型 (development/adhoc/appstore)

  • platform_type (String)

    平台类型 (ios/macos)

  • project_dir (String, nil) (defaults to: nil)

    项目目录(可选,如果提供则配置 Xcode 工程)

Returns:

  • (Array<Hash>)

    provisioning_info_array 返回证书信息数组,每个元素包含:

    • type: bundle_id 类型(如 “bundle_id”, “bundle_id_pushcontent” 等)

    • bundle_id: Bundle Identifier

    • profile_name: Provisioning Profile 名称

    • profile_path: Provisioning Profile 本地路径

    • signing_identity: 签名身份(证书名称)

    • team_id: Team ID

Raises:

  • (NotImplementedError)


29
30
31
# File 'lib/pindo/module/cert/mode/base_cert_operator.rb', line 29

def create_and_install_certs(apple_id:, bundle_id_array:, cert_type:, platform_type:, project_dir: nil)
  raise NotImplementedError, "#{self.class.name} 必须实现 create_and_install_certs 方法"
end

#fetch_and_install_certs(apple_id:, bundle_id_array:, cert_type:, platform_type:, project_dir: nil) ⇒ Array<Hash>

获取并安装证书(非 –renew 模式)

Parameters:

  • apple_id (String)

    Apple ID

  • bundle_id_array (Array<String>)

    Bundle ID 数组

  • cert_type (String)

    证书类型 (development/adhoc/appstore)

  • platform_type (String)

    平台类型 (ios/macos)

  • project_dir (String, nil) (defaults to: nil)

    项目目录(可选,如果提供则配置 Xcode 工程)

Returns:

  • (Array<Hash>)

    provisioning_info_array

Raises:

  • (NotImplementedError)


41
42
43
# File 'lib/pindo/module/cert/mode/base_cert_operator.rb', line 41

def fetch_and_install_certs(apple_id:, bundle_id_array:, cert_type:, platform_type:, project_dir: nil)
  raise NotImplementedError, "#{self.class.name} 必须实现 fetch_and_install_certs 方法"
end