macos Apple开发证书 应用签名p12证书 获取生成方法 codesign 证书获取 - preference

📅 2026-12-01 👤 拼多多助力营销技巧 📂 拼多多助力神器 👁️ 252 次阅读

在开发macos应用的时候必须要对自己开发的应用进行签名才能使用, 下面介绍个人如何获取Apple开发签名证书.

必备条件, 你需要先安装 xcode , 注册一个苹果开发者账号 免费的就可以, 以下为获取流程

You need to create a cert through xcode. Additionally, you need to have an apple developer account:

go to Sign In - Apple and make sure you have accepted the terms.install xcode through the app store. Open it.On the accounts tab, add your apple id. Select it.Select Manage Certificates.Add whatever cert you are using. I am using a free account, so I did "Mac Development" Take note of the cert name.

打开xcode->preference

从xcode中获取并添加开发证书

接下来打开 钥匙串访问 即可导出p12证书

选择证书后导出即可获取 p12格式的apple 开发证书 myAppleDev.p12

myAppleDev.p12 开发证书全局配置

将下面的内容添加到 ~/.bash_profile文件中

# 导出的p12密钥保存的位置

export CSC_LINK=$HOME/myAppleDev.p12

# p12密钥导出时设置的密钥密码

export CSC_KEY_PASSWORD=xxxx

使配置生效

# 使设置生效

source ~/.bash_profile

codesign使用签名

codesign --deep --force --verbose --sign "Mac Developer: MY NAME (MY CODE)" node_modules/electron/dist/Electron.app

文章来源 拼多多帮助力入口

标签: 拼多多助力网站平台 赚钱项目 拼多多助力网 首码项目 手赚APP
拼多多助力营销技巧