-
Notifications
You must be signed in to change notification settings - Fork 0
feat(mobile): スマホアプリのネイティブ化 — Capacitor 8 + 買い切りIAP実配線 + iOS/Android CI #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
1llum1n4t1s
wants to merge
4
commits into
main
Choose a base branch
from
feature/mobile-native
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
373e7b0
feat(mobile): Capacitor 8 化+買い切りIAPを @capgo/native-purchases で実配線
1llum1n4t1s d5a17b9
ci(mobile): Android を Cap8(JDK21)+課金/カメラ権限へ・iOS ビルド検証CIを追加
1llum1n4t1s 48b6973
fix(mobile): PR#9 レビュー対応 — 課金所有判定の厳密化+CI供給網リスク低減
1llum1n4t1s ab0010b
ci(mobile): pnpm install に --frozen-lockfile を付与(lockfile drift 検出・再現…
1llum1n4t1s File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # ぺたりん モバイル: iOS ビルド検証(Capacitor 8・Swift Package Manager)。 | ||
| # web を Vite でビルド → cap add ios(毎回生成・ios/ は gitignore)→ Info.plist に NSCameraUsageDescription を | ||
| # 注入(QR スキャナの getUserMedia 用・Android の CAMERA 注入と対称)→ 署名なしで simulator 向けにコンパイル検証。 | ||
| # 署名・実機 .ipa・App Store 申請は Apple Developer 証明書(macOS/署名)が要るので別途。ここはコンパイルが通るかの検証。 | ||
| # Capacitor 8 は Xcode 26+ を要求=runner の Xcode 次第(未達ならこの job は環境要件待ちとして赤くなる)。 | ||
| # Actions はサプライチェーン対策で full commit SHA にピン留め(publish.yml / mobile-android.yml と同方針・Dependabot 更新)。 | ||
| name: mobile-ios | ||
|
|
||
| on: | ||
| workflow_dispatch: {} | ||
| push: | ||
| tags: | ||
| - "mobile-v*" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: macos-latest | ||
| defaults: | ||
| run: | ||
| working-directory: mobile | ||
| steps: | ||
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.0 | ||
| with: | ||
| persist-credentials: false # 読み取り専用ビルド=認証情報を .git/config に残さない | ||
|
|
||
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0 | ||
| with: | ||
| node-version: 22 | ||
| package-manager-cache: false # PR 由来の cache poisoning を release に伝播させない | ||
|
|
||
| - name: Enable corepack (pnpm) | ||
| run: corepack enable | ||
|
|
||
| - name: Install deps | ||
| run: pnpm install --ignore-workspace --config.dangerouslyAllowAllBuilds=true | ||
|
1llum1n4t1s marked this conversation as resolved.
Outdated
|
||
|
|
||
| - name: Build web (Vite) | ||
| run: pnpm build | ||
|
|
||
| - name: Add iOS platform | ||
| run: pnpm exec cap add ios | ||
|
|
||
| - name: Capacitor sync | ||
| run: pnpm exec cap sync ios | ||
|
|
||
| - name: Info.plist へ NSCameraUsageDescription 注入 (QR スキャナの getUserMedia 用) | ||
| working-directory: mobile/ios | ||
| run: | | ||
| # iOS 14.3+ の WKWebView は getUserMedia 対応だが、Info.plist のカメラ用途説明が無いと実行時に拒否される。 | ||
| # Android の CAMERA 注入と対称に「生成物に依存せず再現可能」に注入する(Delete→Add で冪等)。 | ||
| plist=App/App/Info.plist | ||
| /usr/libexec/PlistBuddy -c "Delete :NSCameraUsageDescription" "$plist" 2>/dev/null || true | ||
| /usr/libexec/PlistBuddy -c "Add :NSCameraUsageDescription string 'QRコードを読み取ってグループに参加するためにカメラを使用します'" "$plist" | ||
| echo "--- Info.plist のカメラ用途 ---"; /usr/libexec/PlistBuddy -c "Print :NSCameraUsageDescription" "$plist" | ||
|
|
||
| - name: Xcode で署名なしコンパイル検証 (simulator) | ||
| working-directory: mobile/ios/App | ||
| run: | | ||
| # 署名・provisioning は Apple Developer 証明書が要るので CI ではコンパイル検証のみ(simulator SDK)。 | ||
| # 実機 .ipa / App Store 申請は別(証明書を Secrets に入れてから署名ビルドを足す)。 | ||
| # In-App Purchase(StoreKit2) は entitlement 不要=App Store Connect の product 登録で機能する。 | ||
| set -o pipefail | ||
| xcodebuild -project App.xcodeproj -scheme App -configuration Debug \ | ||
| -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' \ | ||
| CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO build | tail -40 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.