Skip to main content

AppleAPI

基于appstore connect api封装功能。 代码是基于OKAppleAPI原码。只是在原代码基础上,新增了部分接口,封装了些自用功能。

安装

pip3 install appleapi

用法

#!/usr/bin/python3
# coding=utf-8

from AppleAPI import AppStore


if __name__ == '__main__':
    # 必填
    issuer_id = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' 
    # 必填
    key_id = 'XXXXXXXXXX'                       
    # 必填
    key = """
    -----BEGIN PRIVATE KEY-----
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXX
    -----END PRIVATE KEY----- 
    """

    bundle_id = 'com.test.test.a.b'
    name = 'Test'
    email = 'test@test.com'
    developer_name = 'Name'
    country = 'US'
    password = '123'
    appstore_version = '1.0'
    # 可以填写相对此文件的相对路径
    screenshots = {
        'zh-Hans' : {
            "APP_IPHONE_67"             : "C:/Users/Administrator/Desktop/python/iPhone14PM-6.7",
            # "APP_IPHONE_65"           : "iPhone11PM-6.5",
            # "APP_IPHONE_55"           : "iPhone8P-5.5",
            # "APP_IPAD_PRO_3GEN_129"   : "iPadPro-12.9",
            # "APP_IPAD_PRO_129"        : "iPadPro-12.9",
        }
    }   
    devices = {
        'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx设备id' : '设备名称(可选),比如:iphone6s'
    }
    # https://developer.apple.com/documentation/appstoreconnectapi/capabilitytype
    capabilitys = ['ASSOCIATED_DOMAINS'] # APPLE_ID_AUTH
    app = AppStore(issuer_id, key_id, key, save_fold_name=email)
    # 创建Bundle Id
    app.create_bundle_id(bundle_id=bundle_id, bundle_name=name, capabilitys=capabilitys)
    # 添加测试设备
    app.add_devices(devices=devices)
    # 创建证书
    app.create_certificate(is_dev=False, email=email, developer_name=developer_name, password=password, country=country)
    # 创建描述文件
    app.create_profile(is_dev=False,bundle_id=bundle_id, name=name)
    # 上传5图
    app.upload_screenshot(bundle_id=bundle_id, appstore_version=appstore_version, screenshots=screenshots)

Metadata

Release files for AppleAPI 1.0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for AppleAPI 1.0.10
File Size Uploaded Provenance
appleapi-1.0.10.tar.gz 20.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for AppleAPI 1.0.10
File Interpreter ABI Platform
appleapi-1.0.10-py3-none-any.whl Python 3 none any Details

Total release size: 43.0 kB

Release files / appleapi-1.0.10.tar.gz

Download URL appleapi-1.0.10.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6b49606c664c6d7f680f68210bb584a5e9ef6b985c53c52edb5774e64349919e
BLAKE2b-256 checksum
How to use checksums
6df15eb5a9d00181ddae1f027c778a53c610e8f65ed49afdfe61c9dace32fe4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release files / appleapi-1.0.10-py3-none-any.whl

Download URL appleapi-1.0.10-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f07f1cbf4c62df603c4de1afd1e4f040014064fe8135185a119d0cbdf456aafe
BLAKE2b-256 checksum
How to use checksums
d8174dc95cc93106f9c6df9925e0a4b7d6106a444420aae085a530b280051e45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Security for AppleAPI 1.0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page