Section 2/171 menit
2. Masalah yang Dipecahkan
2. Masalah yang Dipecahkan
Setup CI yang Rumit dan Mahal
Tanpa Xcode Cloud, tim iOS harus menyiapkan dan memelihara infrastruktur CI secara manual.
swift
# ❌ TANPA Xcode Cloud: setup macOS CI runner manual
# Harus provision mac mini / mac stadium, install Xcode versi spesifik,
# manage code signing certificates, renew provisioning profiles,
# setup fastlane, konfigurasi YAML panjang di GitHub Actions...
# .github/workflows/ios.yml
name: iOS CI
on: [push]
jobs:
build:
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- name: Install certificates
run: |
echo "$CERTIFICATE_BASE64" | base64 --decode > certificate.p12
security create-keychain -p "" build.keychain
security import certificate.p12 -k build.keychain -P "$CERT_PASSWORD" -T /usr/bin/codesign
# ... 50+ baris konfigurasi lagi
swift
# ✓ DENGAN Xcode Cloud: zero config infrastructure
# Buka Xcode → Product → Xcode Cloud → Create Workflow
# Pilih scheme, branch, action — selesai.
# Signing otomatis dikelola Apple.
Code Signing yang Tidak Konsisten
Salah satu sumber masalah terbesar di CI iOS adalah manajemen certificate dan provisioning profile.
swift
# ❌ TANPA Xcode Cloud: certificate expired, semua build gagal
# Perlu manual renew di developer.apple.com,
# update di Keychain CI runner,
# re-encode sebagai base64 secret di GitHub,
# update semua pipeline yang menggunakan certificate tersebut
swift
# ✓ DENGAN Xcode Cloud: Apple mengelola signing otomatis
# Tidak perlu menyentuh certificate sama sekali.
# Xcode Cloud menggunakan App Store Connect API untuk signing.
# Ketika certificate expired, Apple otomatis renew.
Distribusi TestFlight yang Manual
swift
// ❌ TANPA Xcode Cloud: upload ke TestFlight manual setiap sprint
// 1. Archive di Xcode lokal (15-30 menit)
// 2. Tunggu processing di App Store Connect (10-30 menit)
// 3. Kirim invitation email ke tester manual
// 4. Rentan human error — lupa archive, salah versi, salah group
swift
// ✓ DENGAN Xcode Cloud: otomatis setiap merge ke develop
// Workflow: merge ke develop → build → test → deploy ke TestFlight Internal
// Tester langsung dapat notifikasi email dari Apple
// Tidak ada langkah manual