ci: add iPhone deploy workflow + CI/CD setup docs #4

Merged
millianlmx merged 50 commits from ci/iphone-deploy-workflow into main 2026-06-27 22:49:53 +02:00
4 changed files with 25 additions and 1 deletions
Showing only changes of commit 58177102a4 - Show all commits

View File

@@ -36,6 +36,14 @@ jobs:
- name: Setup PATH
run: echo "/opt/homebrew/bin" >> $GITHUB_PATH
- name: Clean ALL caches
run: |
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Caches/org.swift.swiftpm
rm -rf ~/Library/org.swift.swiftpm
rm -rf .build
rm -rf ~/.cache/act/*/hostexecutor/tabatago-swift/build
- name: Install tools (xcodegen, node, firebase)
run: |
brew install xcodegen node || true
@@ -63,6 +71,7 @@ jobs:
-allowProvisioningUpdates \
-skipPackagePluginValidation \
SWIFT_ENABLE_EXPLICIT_MODULES=NO \
ONLY_ACTIVE_ARCH=NO \
CODE_SIGN_STYLE=Automatic DEVELOPMENT_TEAM=2MJF39L8VY
- name: Package IPA

5
.gitignore vendored
View File

@@ -58,3 +58,8 @@ Config/Secrets.xcconfig
_Users_*
swift-generated-sources/
tabatago-swift/build/
# Swift Package Manager
Package.resolved
.build/
DerivedData/

View File

@@ -1,30 +1,38 @@
import Foundation
#if canImport(PostHog)
import PostHog
#endif
/// PostHog analytics mirrors the event taxonomy from the Expo app.
final class AnalyticsService: @unchecked Sendable {
static let shared = AnalyticsService()
#if canImport(PostHog)
private let apiKey: String =
Bundle.main.infoDictionary?["POSTHOG_API_KEY"] as? String ?? ""
private let host = "https://eu.posthog.com"
#endif
private init() {}
func initialize() {
#if canImport(PostHog)
guard !apiKey.isEmpty else { return }
let config = PostHogConfig(apiKey: apiKey, host: host)
config.captureApplicationLifecycleEvents = true
config.captureScreenViews = false // manual tracking
PostHogSDK.shared.setup(config)
#endif
}
// Screens
func screen(_ name: String, properties: [String: Any] = [:]) {
#if canImport(PostHog)
PostHogSDK.shared.screen(name, properties: properties)
#endif
}
// Onboarding
@@ -100,6 +108,8 @@ final class AnalyticsService: @unchecked Sendable {
// Private
private func capture(_ event: String, properties: [String: Any] = [:]) {
#if canImport(PostHog)
PostHogSDK.shared.capture(event, properties: properties.isEmpty ? nil : properties)
#endif
}
}

View File

@@ -30,7 +30,7 @@ packages:
from: "5.0.0"
PostHog:
url: https://github.com/PostHog/posthog-ios
exactVersion: "3.62.0"
revision: "3.62.0"
targets:
TabataGo: