Revert "Capacitor 8 — Step B: migrate iOS from CocoaPods to Swift Package Manager"
This reverts commit 92f1f8f1a3.
This commit is contained in:
+15
-11
@@ -27,7 +27,7 @@ workflows:
|
||||
- ios_signing # ← Codemagic variable group holding CERTIFICATE_PRIVATE_KEY (secure). See below.
|
||||
vars:
|
||||
BUNDLE_ID: "com.bizgaze.connect"
|
||||
XCODE_PROJECT: "mobile/ios/App/App.xcodeproj"
|
||||
XCODE_WORKSPACE: "mobile/ios/App/App.xcworkspace"
|
||||
XCODE_SCHEME: "App"
|
||||
node: 22
|
||||
xcode: latest
|
||||
@@ -44,14 +44,13 @@ workflows:
|
||||
script: |
|
||||
cd mobile
|
||||
# `cap add ios` scaffolds ios/App; safe to re-run — it no-ops if it already exists.
|
||||
# Capacitor 8 Swift Package Manager: generate an SPM project (no Podfile). LiveKit is pulled via the
|
||||
# native-call plugin's Package.swift; `cap sync` wires all local plugins into the CapApp-SPM package.
|
||||
if [ ! -d "ios" ]; then npx cap add ios --packagemanager SPM; fi
|
||||
# Capacitor 8 DEFAULTS to Swift Package Manager, but our whole iOS pipeline (LiveKit Podfile pins,
|
||||
# share-extension injection, AppDelegate patches) is CocoaPods-based — so force CocoaPods.
|
||||
if [ ! -d "ios" ]; then npx cap add ios --packagemanager Cocoapods; fi
|
||||
npx cap sync ios
|
||||
# Sanity: the Xcode project must exist. Print the iOS dir so the log shows the SPM layout (CapApp-SPM
|
||||
# present, NO Podfile) — if a Podfile appears, the SPM flag didn't take and we'd need to fix it.
|
||||
test -d ios/App/App.xcodeproj || { echo "ERROR: iOS Xcode project not generated"; ls -la ios/App || true; exit 1; }
|
||||
echo "iOS project layout:"; ls -la ios/App
|
||||
# Fail LOUDLY if no Podfile was generated (flag ignored / SPM project) rather than fail later with a
|
||||
# confusing error — the CocoaPods pipeline downstream needs ios/App/Podfile to exist.
|
||||
test -f ios/App/Podfile || { echo "ERROR: no ios/App/Podfile — 'cap add' did not use CocoaPods"; exit 1; }
|
||||
# App icon + splash from resources/icon.png & resources/splash*.png (1024x1024 icon, 2732² splash).
|
||||
npx capacitor-assets generate --ios || echo "asset generation skipped"
|
||||
|
||||
@@ -96,8 +95,13 @@ workflows:
|
||||
--create
|
||||
keychain add-certificates
|
||||
|
||||
# (No "Install CocoaPods" step under SPM — there is no Podfile. Xcode resolves the Swift packages
|
||||
# (Capacitor, plugins, LiveKit + its WebRTC/UniFFI/SwiftProtobuf) during the archive below.)
|
||||
- name: Install CocoaPods
|
||||
script: |
|
||||
cd mobile/ios/App
|
||||
# --repo-update refreshes the cached spec repo so it knows LiveKit 2.15.3's transitive deps
|
||||
# (LiveKitUniFFI 0.0.6 + LiveKitWebRTC 144.7559.11) — they ARE on the trunk but the build box's
|
||||
# cached repo was stale ("Unable to find a specification for LiveKitUniFFI (= 0.0.6)").
|
||||
pod install --repo-update
|
||||
|
||||
- name: Build the signed IPA
|
||||
script: |
|
||||
@@ -108,7 +112,7 @@ workflows:
|
||||
# `xcode-project build-ipa` prints a PRETTIFIED summary and swallows the raw xcodebuild "error:"
|
||||
# lines — a failed archive shows only "Failed to archive" with no reason. On failure, surface the
|
||||
# actual errors from the raw log so we don't have to dig through the artifact.
|
||||
if ! xcode-project build-ipa --project "$XCODE_PROJECT" --scheme "$XCODE_SCHEME"; then
|
||||
if ! xcode-project build-ipa --workspace "$XCODE_WORKSPACE" --scheme "$XCODE_SCHEME"; then
|
||||
echo "======================= xcodebuild errors ======================="
|
||||
grep -h -E "error:|errSec|Provisioning profile|entitlement|Code ?Sign|does not (support|contain)|requires a provisioning|No profile|No signing|doesn't (include|match)|Command .* failed" /tmp/xcodebuild_logs/*.log 2>/dev/null | grep -vi "warning:" | tail -60 || echo "(no matching lines — open the xcodebuild_logs artifact)"
|
||||
echo "================================================================="
|
||||
|
||||
Reference in New Issue
Block a user