iOSアプリのコード署名・プロビジョニング支援。証明書管理、Provisioning Profile管理、Keychain設定、CI/CD環境での署名設定など、コード署名に関する包括的なサポートを提供する。「署名エラーを解決したい」「証明書を更新したい」「CIで署名を設定したい」と言った時に使用する。
Handles iOS code signing and provisioning profile issues. Diagnoses certificate errors, manages profiles, and provides CI/CD setup steps for Xcode projects.
/plugin marketplace add CAPHTECH/claude-marketplace/plugin install apple-platform-plugin@caphtech-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/certificate-guide.mdreferences/ci-signing-guide.mdreferences/provisioning-profile-guide.mdiOSアプリのコード署名設定とトラブルシューティングを支援する。
このスキルは以下の領域をカバーする:
# キーチェーン内の証明書一覧
security find-identity -v -p codesigning
# 有効な証明書のみ
security find-identity -v -p codesigning | grep "Apple Development\|Apple Distribution"
期待される出力例:
1) XXXXXXXXXX "Apple Development: Your Name (TEAM_ID)"
2) YYYYYYYYYY "Apple Distribution: Your Company (TEAM_ID)"
# インストール済みProfile一覧
ls -la ~/Library/MobileDevice/Provisioning\ Profiles/
# Profile内容の確認
security cms -D -i ~/Library/MobileDevice/Provisioning\ Profiles/XXXX.mobileprovision
# ビルド設定の署名関連項目
xcodebuild -showBuildSettings -project Project.xcodeproj | grep -E "CODE_SIGN|PROVISIONING|DEVELOPMENT_TEAM"
| エラー | 原因 | 解決方法 |
|---|---|---|
No signing certificate found | 証明書がない/期限切れ | 証明書の作成/更新 |
Profile doesn't include signing certificate | Profile と証明書の不一致 | Profile の再生成 |
App ID doesn't match bundle identifier | Bundle ID の不一致 | App ID の確認/修正 |
Provisioning profile expired | Profile 期限切れ | Profile の更新 |
Device not included in profile | デバイス未登録 | デバイス追加と Profile 再生成 |
1. 証明書は有効か?
├─ NO → 証明書を作成/更新
└─ YES
↓
2. Profile に証明書が含まれているか?
├─ NO → Profile を再生成
└─ YES
↓
3. Bundle ID が一致しているか?
├─ NO → Bundle ID を修正
└─ YES
↓
4. デバイスが登録されているか?(Ad Hoc/Development)
├─ NO → デバイス追加と Profile 再生成
└─ YES → その他の問題を調査
詳細は以下の参照ドキュメントを確認:
Keychain Access でCSRを作成
Apple Developer Portal で証明書発行
証明書のダウンロードとインストール
Automatic Signing(推奨: 開発時):
CODE_SIGN_STYLE = Automatic
DEVELOPMENT_TEAM = XXXXXXXXXX
Manual Signing(推奨: リリース時):
CODE_SIGN_STYLE = Manual
DEVELOPMENT_TEAM = XXXXXXXXXX
CODE_SIGN_IDENTITY = Apple Distribution
PROVISIONING_PROFILE_SPECIFIER = MyApp_AppStore
- name: Install Certificates
env:
CERTIFICATE_BASE64: ${{ secrets.CERTIFICATE_BASE64 }}
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# 一時キーチェーン作成
security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
# 証明書インストール
echo "$CERTIFICATE_BASE64" | base64 --decode > certificate.p12
security import certificate.p12 -k build.keychain -P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain
- name: Install Provisioning Profile
env:
PROVISIONING_PROFILE_BASE64: ${{ secrets.PROVISIONING_PROFILE_BASE64 }}
run: |
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
echo "$PROVISIONING_PROFILE_BASE64" | base64 --decode > ~/Library/MobileDevice/Provisioning\ Profiles/profile.mobileprovision
# 署名の検証
codesign -vvv --deep --strict /path/to/App.app
# Profile の検証
security cms -D -i ~/Library/MobileDevice/Provisioning\ Profiles/profile.mobileprovision | grep -A1 "ExpirationDate"
## 署名診断レポート
### 証明書ステータス
| 種類 | 名前 | 有効期限 | ステータス |
|------|------|----------|-----------|
| Development | Apple Development: Name | 2025-01-01 | OK |
| Distribution | Apple Distribution: Company | 2024-12-31 | WARNING: 30日以内に期限切れ |
### Provisioning Profile ステータス
| Profile名 | App ID | 種類 | 有効期限 | ステータス |
|-----------|--------|------|----------|-----------|
| MyApp_Dev | com.company.myapp | Development | 2024-06-01 | OK |
| MyApp_AppStore | com.company.myapp | App Store | 2024-03-15 | ERROR: 期限切れ |
### 検出された問題
#### ERROR
- [ ] Distribution Profile が期限切れです
- 影響: App Store へのアップロードができません
- 対応: Apple Developer Portal で Profile を再生成してください
#### WARNING
- [ ] Distribution 証明書が 30 日以内に期限切れになります
- 対応: 証明書の更新を計画してください
## 署名問題の解決手順
### 手順 1: 証明書の更新
1. Keychain Access で CSR を作成
2. Apple Developer Portal で証明書を発行
3. 証明書をダウンロードしてインストール
### 手順 2: Profile の再生成
1. Apple Developer Portal > Profiles にアクセス
2. 対象の Profile を編集または新規作成
3. 新しい証明書を選択
4. Profile をダウンロードしてインストール
### 手順 3: Xcode 設定の更新
1. Xcode > Preferences > Accounts で更新
2. プロジェクト設定で新しい Profile を選択
3. ビルドして確認
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.