Xcode vs VS Code
Apple's Xcode versus Microsoft's VS Code for iOS development: IDE features, performance, debugging, plugins, and the modern dual-IDE workflow.
A structured branching strategy — main, develop, feature, release, hotfix
A single main branch, frequent commits, safe deployment via feature flags
For web services and SaaS products, Trunk-Based Development is the modern standard — excellent fit with CI/CD, fast iteration. For iOS apps, a lightweight version of Git Flow (just main plus feature branches) is practical: the App Store review process and release cycles suit this structure better. GitHub Flow (main plus short-lived feature branches) is a good middle ground.
| Category | Git Flow | Trunk-Based Development |
|---|---|---|
| Performance | 6/10 | 9/10 |
| Ease of Learning | 5/10 | 7/10 |
| Ecosystem | 8/10 | 9/10 |
| Community | 8/10 | 9/10 |
| Job Market | 8/10 | 9/10 |
| Future-Proof | 5/10 | 10/10 |
# Git Flow - Full workflow example
# Initial setup
git flow init -d
# Branches: main, develop, feature/, release/, hotfix/
# Developing a new feature
git flow feature start user-profile-redesign
# → feature/user-profile-redesign branch created
# Development process
git add src/views/ProfileView.swift
git commit -m "feat(profile): redesign user profile card"
git add src/viewmodels/ProfileViewModel.swift
git commit -m "feat(profile): add avatar lazy loading"
# Feature complete — merge into develop
git flow feature finish user-profile-redesign
# → feature branch deleted, merged into develop
# Preparing a release
git flow release start 2.4.0
# → release/2.4.0 branch created
# Only bug fixes on the release branch!
git commit -m "fix: avatar cache invalidation on logout"
git commit -m "chore: bump version to 2.4.0"
# Release complete
git flow release finish 2.4.0
# → merged into main, tag created (v2.4.0), merged back into develop
# Production issue detected
git flow hotfix start fix-crash-on-launch
git commit -m "fix: nil pointer in AppDelegate startup"
git flow hotfix finish fix-crash-on-launch
# → merged into main and develop, v2.4.1 tag# Trunk-Based Development - Daily workflow
# Every morning: start from latest
git pull origin main
# Short feature branch (max 1-2 days!)
git checkout -b feat/quick-login-improvement
# Small, atomic commits
git add src/views/LoginView.swift
git commit -m "feat: add biometric login button"
git add tests/LoginTests.swift
git commit -m "test: biometric auth unit tests"
# Merge into trunk right away (even if unfinished, behind a feature flag!)
git checkout main
git pull origin main
git merge feat/quick-login-improvement
git push origin main
git branch -d feat/quick-login-improvement
# Hide the incomplete feature behind a feature flag (Swift)
# FeatureFlags.swift
enum FeatureFlag: String {
case newLoginUI = "new_login_ui"
case profileV2 = "profile_v2"
case darkModeV3 = "dark_mode_v3"
}
class FeatureFlagService {
static func isEnabled(_ flag: FeatureFlag) -> Bool {
// Read from remote config or a local override
return RemoteConfig.shared.bool(forKey: flag.rawValue)
}
}
// Usage in a View
if FeatureFlagService.isEnabled(.newLoginUI) {
NewLoginView()
} else {
LegacyLoginView()
}
# CI/CD pipeline (GitHub Actions)
# .github/workflows/ci.yml:
# on: push (branches: [main])
# → lint → test → build → deploy staging → smoke test → deploy productionFor web services and SaaS products, Trunk-Based Development is the modern standard — excellent fit with CI/CD, fast iteration. For iOS apps, a lightweight version of Git Flow (just main plus feature branches) is practical: the App Store review process and release cycles suit this structure better. GitHub Flow (main plus short-lived feature branches) is a good middle ground.
Get Free ConsultationGitHub Flow is a simplified version: there's only a main branch and feature branches. No release branch, no develop branch. An ideal middle ground for small-to-medium teams.