VoiceYourTextアプリのApp Store Connectへのデプロイメントをサポートします。Fastlaneを使用したメタデータアップロード、xcodebuildによるアーカイブとアップロード、多言語対応のローカリゼーション管理を含みます。
VoiceYourTextアプリのApp Store Connect へのデプロイメントと公開管理を行うスキルです。
このスキルは以下の操作をサポートします:
目的: バイナリなしでアプリの説明文やスクリーンショットを更新
手順:
cd iOS
bundle install
bundle exec fastlane ios upload_metadata_only
対象ファイル:
iOS/fastlane/metadata/{locale}/ - 各言語のメタデータ
name.txt - アプリ名description.txt - アプリ説明keywords.txt - キーワードpromotional_text.txt - プロモーションテキストrelease_notes.txt - リリースノート対応言語:
目的: アプリバイナリをApp Store Connectにアップロード
手順:
cd iOS
# 0. Xcodeバージョンの確認(重要!)
xcodebuild -version
xcrun swift --version # Swiftバージョン確認
# 依存関係とSwiftバージョンが一致しない場合はXcodeを切り替え
# sudo xcode-select -s /Applications/Xcode-26.1.0.app/Contents/Developer
# 1. DerivedDataのクリーンアップ(推奨)
rm -rf ~/Library/Developer/Xcode/DerivedData/VoiceYourText-*
# 2. アーカイブの作成
xcodebuild -scheme VoiceYourText \
-project VoiceYourText.xcodeproj \
-archivePath build/VoiceYourText.xcarchive \
-configuration Release \
-destination 'generic/platform=iOS' \
archive
# 3. ExportOptions.plistの作成
cat > build/ExportOptions.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>teamID</key>
<string>4YZQY4C47E</string>
<key>uploadSymbols</key>
<true/>
<key>uploadBitcode</key>
<false/>
</dict>
</plist>
EOF
# 4. IPAのエクスポート
xcodebuild -exportArchive \
-archivePath build/VoiceYourText.xcarchive \
-exportOptionsPlist build/ExportOptions.plist \
-exportPath build/export \
-allowProvisioningUpdates
# 5. App Store Connectにアップロード
# API keyファイルが~/.appstoreconnect/private_keys/にあること確認
xcrun altool --upload-app \
--type ios \
--file build/export/VoiceYourText.ipa \
--apiKey R2Q4FFAG8D \
--apiIssuer 3cc1c923-009c-4963-a9db-83d030e4c4e3
# 6. ビルドフォルダのクリーンアップ
rm -rf build
重要: -destination 'generic/platform=iOS' を指定することで、特定デバイスではなくiOS全般向けにビルドされます。
目的: メタデータの更新とバイナリのアップロードを同時に実行
手順:
cd iOS
bundle exec fastlane ios upload_metadata
注意: このコマンドはバイナリが必要なため、事前にアーカイブを作成しておく必要があります。
目的: アプリの説明文やリリースノートを多言語で更新
手順:
iOS/fastlane/metadata/{locale}/description.txt - アプリの説明(最大4000文字)release_notes.txt - 更新内容(最大4000文字)keywords.txt - キーワード(カンマ区切り、最大100文字)例:
# 日本語の説明文を編集
vim iOS/fastlane/metadata/ja/description.txt
# 英語のリリースノートを編集
vim iOS/fastlane/metadata/en-US/release_notes.txt
# アップロード
cd iOS
bundle exec fastlane ios upload_metadata_only
目的: App Storeのスクリーンショットを更新
手順:
iOS/fastlane/screenshots/{locale}/{device}-{number}.pngデバイスサイズ:
目的: 新バージョンをリリースするためにバージョン番号を更新
手順:
cd iOS
# 1. 現在のバージョンを確認
xcodebuild -project VoiceYourText.xcodeproj -scheme VoiceYourText -showBuildSettings | grep -E "MARKETING_VERSION|CURRENT_PROJECT_VERSION"
# 2. バージョンを更新(agvtoolを使用)
xcrun agvtool new-marketing-version 0.16.0 # マーケティングバージョン
xcrun agvtool next-version -all # ビルド番号をインクリメント
# 3. project.pbxprojも直接更新(agvtoolで更新されない場合)
sed -i '' 's/MARKETING_VERSION = 0.15.1;/MARKETING_VERSION = 0.16.0;/g' VoiceYourText.xcodeproj/project.pbxproj
# 4. 変更を確認
git diff VoiceYourText.xcodeproj/project.pbxproj
# 5. リリースノートを全言語で更新
# fastlane/metadata/{locale}/release_notes.txt を編集
# 6. 変更をコミット
git add VoiceYourText.xcodeproj/project.pbxproj fastlane/metadata/*/release_notes.txt
git commit -m "release: Update version to 0.16.0"
# 7. Gitタグを作成
git tag v0.16.0
git push && git push --tags
目的: xcrun altoolでアップロードするためのAPI key設定
手順:
# 1. API keyディレクトリを作成
mkdir -p ~/.appstoreconnect/private_keys
# 2. fastlane/.envからAPI keyを取得してファイルを作成
# KEY_ID: R2Q4FFAG8D
# ISSUER_ID: 3cc1c923-009c-4963-a9db-83d030e4c4e3
cat > ~/.appstoreconnect/private_keys/AuthKey_R2Q4FFAG8D.p8 << 'EOF'
-----BEGIN PRIVATE KEY-----
[fastlane/.envのAPI_KEY_CONTENTをコピー]
-----END PRIVATE KEY-----
EOF
# 3. パーミッション設定
chmod 600 ~/.appstoreconnect/private_keys/AuthKey_R2Q4FFAG8D.p8
API key情報の取得:
iOS/fastlane/.env ファイルに保存されていますAPP_STORE_CONNECT_API_KEY_KEY_IDAPP_STORE_CONNECT_API_KEY_ISSUER_IDAPP_STORE_CONNECT_API_KEY_CONTENTユーザーの要求:
「次のバージョンのリリースノートを10言語すべてで更新してほしい」
実行内容:
release_notes.txtを編集結果: App Store Connectで次のバージョンのリリースノートが更新される
ユーザーの要求:
「バージョン1.2.0をApp Store Connectにアップロードしたい」
実行内容:
結果: App Store Connectに新しいビルドがアップロードされる
ユーザーの要求:
「アプリの説明文を全言語で更新したい」
実行内容:
iOS/fastlane/metadata/の各言語フォルダを確認description.txtを編集bundle exec fastlane ios upload_metadata_onlyを実行結果: 全言語のApp Store説明文が更新される
iOS/Fastfile - Fastlaneの設定ファイルiOS/Appfile - アプリIDとTeam IDの設定iOS/fastlane/metadata/{locale}/ - 各言語のメタデータiOS/VoiceYourText/locate/Localizable.xcstrings - アプリ内テキストiOS/VoiceYourText/{locale}.lproj/InfoPlist.strings - App名とパーミッション説明iOS/VoiceYourText.xcodeproj/project.pbxproj - Xcodeプロジェクト設定iOS/VoiceYourText/Info.plist - アプリメタデータとバージョンiOS/VoiceYourText/config/*.xcconfig - 環境別設定ファイル原因: App Store Connect APIキーまたはApple IDの認証が失敗
解決策:
fastlane/AppfileでApple IDを確認fastlane spaceauthで認証情報を更新原因: コード署名またはプロビジョニングプロファイルの問題
解決策:
4YZQY4C47E-allowProvisioningUpdatesフラグを使用原因: 特定言語のメタデータファイルが不正
解決策:
原因: スクリーンショットのサイズが要件を満たしていない
解決策:
4YZQY4C47E は環境に応じて変更してくださいGemfileで管理されているため、bundle exec経由で実行Releaseビルド構成を使用