Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

feat: App Store metadata, subscription localizations, and zero-config marketing copy

libokai837ef5b12347
diff --git a/Codync-iOS/App/AppDelegate.swift b/Codync-iOS/App/AppDelegate.swift
index 5b63721f..11266a45 100644
--- a/Codync-iOS/App/AppDelegate.swift
+++ b/Codync-iOS/App/AppDelegate.swift
@@ -36,9 +36,6 @@ final class AppDelegate: NSObject, UIApplicationDelegate {
liveActivityManager.updateSessions(receiver.sessions)
primarySessionManager.autoSelect(from: receiver.sessions)
- let center = UNUserNotificationCenter.current()
- _ = try? await center.requestAuthorization(options: [.alert, .sound, .badge])
-
startForegroundPolling()
}
return true
@@ -69,8 +66,30 @@ final class AppDelegate: NSObject, UIApplicationDelegate {
_ application: UIApplication,
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data
) {
- let hex = deviceToken.prefix(4).map { String(format: "%02x", $0) }.joined()
- logger.info("APNs device token registered: \(hex)...")
+ let hex = deviceToken.map { String(format: "%02x", $0) }.joined()
+ logger.info("APNs device token registered: \(hex.prefix(8))...")
+ // Save device token to CloudKit for Pro alert push (session complete notifications)
+ Task {
+ guard PremiumManager.shared.isPro else { return }
+ let recordID = CKRecord.ID(
+ recordName: "device-push-token",
+ zoneID: CloudKitManager.zoneID
+ )
+ do {
+ let record: CKRecord
+ do {
+ record = try await CloudKitManager.shared.database.record(for: recordID)
+ } catch {
+ record = CKRecord(recordType: "DeviceToken", recordID: recordID)
+ }
+ record["token"] = hex as CKRecordValue
+ record["updatedAt"] = Date() as CKRecordValue
+ _ = try await CloudKitManager.shared.database.save(record)
+ logger.info("Saved device push token to CloudKit")
+ } catch {
+ logger.error("Failed to save device push token: \(error.localizedDescription)")
+ }
+ }
}
func application(
diff --git a/Codync-iOS/Views/Components/LiveActivityPreview.swift b/Codync-iOS/Views/Components/LiveActivityPreview.swift
index ea8e45ee..adf62725 100644
--- a/Codync-iOS/Views/Components/LiveActivityPreview.swift
+++ b/Codync-iOS/Views/Components/LiveActivityPreview.swift
@@ -14,27 +14,16 @@ struct LiveActivityPreview: View {
}
var body: some View {
- ZStack {
- // Subtle top glow
- RadialGradient(
- colors: [theme.primaryText.opacity(0.04), .clear],
- center: .top,
- startRadius: 0,
- endRadius: 60
- )
- .frame(height: 40)
- .frame(maxHeight: .infinity, alignment: .top)
-
- Group {
- if mode == .overall {
- overallPreview
- } else {
- individualPreview
- }
+ Group {
+ if mode == .overall {
+ overallPreview
+ } else {
+ individualPreview
}
- .transition(.opacity.combined(with: .scale(scale: 0.96)))
}
- .padding(16)
+ .transition(.opacity.combined(with: .scale(scale: 0.96)))
+ .padding(.horizontal, 12)
+ .padding(.vertical, 10)
.background(
RoundedRectangle(cornerRadius: 20, style: .continuous)
.fill(Color.black.opacity(0.6))
diff --git a/Codync-iOS/Views/IOSOnboardingView.swift b/Codync-iOS/Views/IOSOnboardingView.swift
index 2e892196..4670dadd 100644
--- a/Codync-iOS/Views/IOSOnboardingView.swift
+++ b/Codync-iOS/Views/IOSOnboardingView.swift
@@ -1,175 +1,511 @@
import SwiftUI
import CloudKit
+import UserNotifications
import CodyncShared
struct IOSOnboardingView: View {
@ObservedObject var liveActivityManager: LiveActivityManager
@Environment(\.theme) private var theme
@AppStorage("codync_onboardingComplete") private var onboardingComplete = false
+ @State private var currentPage = 0
@State private var iCloudStatus: ICloudStatus = .checking
@State private var selectedMode: LiveActivityMode = .overall
+ private let totalPages = 6
+
var body: some View {
- VStack(spacing: 0) {
- Spacer()
+ ZStack {
+ theme.background.ignoresSafeArea()
- Image(systemName: "waveform.path")
- .font(.system(size: 56, weight: .light))
- .foregroundStyle(theme.primaryText.opacity(0.4))
- .padding(.bottom, 20)
+ TabView(selection: $currentPage) {
+ welcomePage.tag(0)
+ macSetupPage.tag(1)
+ iCloudPage.tag(2)
+ notificationPage.tag(3)
+ modePage.tag(4)
+ proPage.tag(5)
+ }
+ .tabViewStyle(.page(indexDisplayMode: .never))
+ .animation(.easeInOut(duration: 0.3), value: currentPage)
+ }
+ .task {
+ await checkICloudStatus()
+ }
+ }
- Text("Codync")
- .font(.system(size: 28, weight: .semibold, design: .rounded))
- .foregroundStyle(theme.primaryText)
- .padding(.bottom, 6)
+ // MARK: - Page 1: Welcome
- Text("Monitor your Claude Code sessions\nin real time from your iPhone")
- .multilineTextAlignment(.center)
- .font(.system(size: 15))
- .foregroundStyle(theme.secondaryText)
- .padding(.bottom, 28)
-
- VStack(alignment: .leading, spacing: 16) {
- stepRow(
- icon: "icloud",
- title: "iCloud Sync",
- subtitle: iCloudSubtitle,
- isOK: iCloudStatus == .available,
- isError: iCloudStatus.isError,
- isLoading: iCloudStatus == .checking
- )
- stepRow(
- icon: "desktopcomputer",
- title: "Install on Mac",
- subtitle: "Install Codync on your Mac to sync sessions",
- isOK: false,
- isError: false,
- isLoading: false
- )
- }
- .padding(.horizontal, 24)
- .padding(.vertical, 20)
- .background(
- RoundedRectangle(cornerRadius: 12, style: .continuous)
- .fill(theme.cardBackground)
+ private var welcomePage: some View {
+ OnboardingPage(
+ theme: theme,
+ content: {
+ Spacer()
+
+ Image("CodyncIcon")
+ .resizable()
+ .aspectRatio(contentMode: .fit)
+ .frame(width: 100, height: 100)
+ .clipShape(RoundedRectangle(cornerRadius: 24, style: .continuous))
+ .shadow(color: .white.opacity(0.05), radius: 20)
+
+ Spacer().frame(height: 32)
+
+ Text("Welcome to Codync")
+ .font(.system(size: 32, weight: .bold))
+ .foregroundStyle(theme.primaryText)
+
+ Spacer().frame(height: 12)
+
+ Text("Monitor your Claude Code sessions\nin real time from your iPhone")
+ .multilineTextAlignment(.center)
+ .font(.system(size: 17))
+ .foregroundStyle(theme.secondaryText)
+ .lineSpacing(4)
+
+ Spacer()
+ },
+ primaryButton: "Get Started",
+ primaryAction: { withAnimation { currentPage = 1 } }
+ )
+ }
+
+ // MARK: - Page 2: Install on Mac
+
+ private var macSetupPage: some View {
+ OnboardingPage(
+ theme: theme,
+ content: {
+ Spacer()
+
+ // Mac mockup with notch
+ VStack(spacing: 0) {
+ ZStack(alignment: .top) {
+ RoundedRectangle(cornerRadius: 12, style: .continuous)
+ .fill(Color(white: 0.12))
+
+ VStack(spacing: 0) {
+ // macOS menu bar with notch
+ HStack(spacing: 0) {
+ // Left menu items
+ HStack(spacing: 6) {
+ Image(systemName: "apple.logo")
+ .font(.system(size: 10))
+ Text("Finder")
+ .font(.system(size: 9, weight: .semibold))
+ Text("File")
+ .font(.system(size: 9))
+ Text("Edit")
+ .font(.system(size: 9))
+ }
+ .foregroundStyle(.white.opacity(0.6))
+ .padding(.leading, 10)
+
+ Spacer()
+
+ // Notch — centered
+ RoundedRectangle(cornerRadius: 0, style: .continuous)
+ .fill(.black)
+ .frame(width: 60, height: 16)
+ .clipShape(
+ .rect(
+ topLeadingRadius: 0,
+ bottomLeadingRadius: 8,
+ bottomTrailingRadius: 8,
+ topTrailingRadius: 0
+ )
+ )
+ .offset(y: -4)
+
+ Spacer()
+
+ // Right menu items — Codync icon separated from notch
+ HStack(spacing: 5) {
+ Image("CodyncIcon")
+ .resizable()
+ .aspectRatio(contentMode: .fit)
+ .frame(width: 11, height: 11)
+ Text("2")
+ .font(.system(size: 8, weight: .medium))
+ Image(systemName: "wifi")
+ .font(.system(size: 8))
+ Image(systemName: "battery.75")
+ .font(.system(size: 8))
+ }
+ .foregroundStyle(.white.opacity(0.6))
+ .padding(.trailing, 10)
+ }
+ .frame(height: 22)
+ .background(.white.opacity(0.06))
+
+ Spacer().frame(height: 8)
+
+ // Terminal window mockup
+ VStack(alignment: .leading, spacing: 4) {
+ HStack(spacing: 4) {
+ Circle().fill(.red.opacity(0.6)).frame(width: 7, height: 7)
+ Circle().fill(.yellow.opacity(0.6)).frame(width: 7, height: 7)
+ Circle().fill(.green.opacity(0.6)).frame(width: 7, height: 7)
+ Spacer()
+ }
+ Text("$ claude")
+ .font(.system(size: 11, design: .monospaced))
+ .foregroundStyle(.white.opacity(0.6))
+ }
+ .padding(10)
+ .background(
+ RoundedRectangle(cornerRadius: 6, style: .continuous)
+ .fill(.white.opacity(0.05))
+ )
+ .padding(.horizontal, 10)
+
+ Spacer()
+ }
+ }
+ .frame(height: 140)
+ .clipShape(RoundedRectangle(cornerRadius: 12, style: .continuous))
.overlay(
RoundedRectangle(cornerRadius: 12, style: .continuous)
- .stroke(theme.border, lineWidth: 1)
+ .stroke(.white.opacity(0.1), lineWidth: 1)
)
- )
- .padding(.horizontal, 24)
+ }
+ .padding(.horizontal, 44)
+
+ Spacer().frame(height: 36)
+
+ Text("Install Codync on Mac")
+ .font(.system(size: 32, weight: .bold))
+ .foregroundStyle(theme.primaryText)
+
+ Spacer().frame(height: 12)
+
+ Text("Download Codync on your Mac to\nmonitor Claude Code sessions.")
+ .multilineTextAlignment(.center)
+ .font(.system(size: 17))
+ .foregroundStyle(theme.secondaryText)
+ .lineSpacing(4)
+
+ Spacer()
+ },
+ primaryButton: "Continue",
+ primaryAction: { withAnimation { currentPage = 2 } },
+ secondaryButton: "Back",
+ secondaryAction: { withAnimation { currentPage = 0 } }
+ )
+ }
+
+ // MARK: - Page 3: iCloud
+
+ private var iCloudPage: some View {
+ OnboardingPage(
+ theme: theme,
+ content: {
+ Spacer()
+
+ // Faux iCloud card
+ VStack(spacing: 0) {
+ RoundedRectangle(cornerRadius: 16, style: .continuous)
+ .fill(Color(white: 0.95))
+ .frame(height: 200)
+ .overlay(
+ VStack(spacing: 12) {
+ Image(systemName: "icloud.fill")
+ .font(.system(size: 40))
+ .foregroundStyle(.gray.opacity(0.4))
+ HStack(spacing: 8) {
+ Circle().fill(.gray.opacity(0.15)).frame(width: 36, height: 36)
+ VStack(alignment: .leading, spacing: 4) {
+ RoundedRectangle(cornerRadius: 3).fill(.gray.opacity(0.15)).frame(width: 120, height: 10)
+ RoundedRectangle(cornerRadius: 3).fill(.gray.opacity(0.1)).frame(width: 80, height: 8)
+ }
+ Spacer()
+ RoundedRectangle(cornerRadius: 6).fill(.gray.opacity(0.12)).frame(width: 50, height: 24)
+ }
+ .padding(.horizontal, 16)
+ }
+ )
+ .clipShape(RoundedRectangle(cornerRadius: 16, style: .continuous))
+ }
+ .padding(.horizontal, 40)
+
+ Spacer().frame(height: 40)
+
+ Text("iCloud Sync")
+ .font(.system(size: 32, weight: .bold))
+ .foregroundStyle(theme.primaryText)
+
+ Spacer().frame(height: 12)
+
+ Text("Session status, tasks, and costs sync\nbetween your Mac and iPhone via iCloud.")
+ .multilineTextAlignment(.center)
+ .font(.system(size: 17))
+ .foregroundStyle(theme.secondaryText)
+ .lineSpacing(4)
+
+ Spacer().frame(height: 14)
+
+ HStack(spacing: 6) {
+ Image(systemName: "person.crop.circle")
+ .font(.system(size: 13))
+ .foregroundStyle(theme.tertiaryText)
+ Text("Make sure both devices use the same Apple ID")
+ .font(.system(size: 13))
+ .foregroundStyle(theme.tertiaryText)
+ }
+
+ Spacer().frame(height: 14)
+
+ // Status badge
+ HStack(spacing: 6) {
+ if iCloudStatus == .checking {
+ ProgressView().scaleEffect(0.7)
+ } else if iCloudStatus == .available {
+ Image(systemName: "checkmark.circle.fill")
+ .foregroundStyle(.white)
+ } else {
+ Image(systemName: "exclamationmark.circle.fill")
+ .foregroundStyle(.white.opacity(0.7))
+ }
+ Text(iCloudSubtitle)
+ .font(.system(size: 14))
+ .foregroundStyle(theme.secondaryText)
+ }
+
+ // Action button for iCloud issues
+ if iCloudStatus == .noAccount || iCloudStatus == .restricted {
+ Button {
+ if let url = URL(string: UIApplication.openSettingsURLString) {
+ UIApplication.shared.open(url)
+ }
+ } label: {
+ Text("Open Settings")
+ .font(.system(size: 14, weight: .medium))
+ .foregroundStyle(theme.primaryText)
+ .padding(.horizontal, 16)
+ .padding(.vertical, 8)
+ .background(
+ RoundedRectangle(cornerRadius: 8, style: .continuous)
+ .fill(theme.primaryText.opacity(0.1))
+ )
+ }
+ .padding(.top, 8)
+ } else if iCloudStatus == .quotaExceeded {
+ Button {
+ // Open iCloud storage settings
+ if let url = URL(string: "App-Prefs:root=CASTLE&path=STORAGE_AND_BACKUP") {
+ UIApplication.shared.open(url)
+ }
+ } label: {
+ Text("Manage iCloud Storage")
+ .font(.system(size: 14, weight: .medium))
+ .foregroundStyle(theme.primaryText)
+ .padding(.horizontal, 16)
+ .padding(.vertical, 8)
+ .background(
+ RoundedRectangle(cornerRadius: 8, style: .continuous)
+ .fill(theme.primaryText.opacity(0.1))
+ )
+ }
+ .padding(.top, 8)
+ }
+
+ Spacer()
+ },
+ primaryButton: iCloudStatus.isError ? "Retry" : "Continue",
+ primaryAction: {
+ if iCloudStatus.isError {
+ iCloudStatus = .checking
+ Task { await checkICloudStatus() }
+ } else {
+ withAnimation { currentPage = 3 }
+ }
+ },
+ secondaryButton: iCloudStatus.isError ? "Skip" : "Back",
+ secondaryAction: {
+ if iCloudStatus.isError {
+ withAnimation { currentPage = 3 }
+ } else {
+ withAnimation { currentPage = 1 }
+ }
+ }
+ )
+ }
+
+ // MARK: - Page 3: Notifications
+
+ private var notificationPage: some View {
+ NotificationOnboardingPage(
+ theme: theme,
+ onContinue: { withAnimation { currentPage = 4 } },
+ onSkip: { withAnimation { currentPage = 4 } }
+ )
+ }
+
+ // MARK: - Page 4: Mode Selection
+
+ private var modePage: some View {
+ OnboardingPage(
+ theme: theme,
+ content: {
+ Spacer()
- // Mode selection
- VStack(spacing: 12) {
Text("Live Activity Format")
- .font(.system(size: 13, weight: .medium))
+ .font(.system(size: 32, weight: .bold))
+ .foregroundStyle(theme.primaryText)
+
+ Spacer().frame(height: 12)
+
+ Text("Choose how sessions appear\non your Dynamic Island and Lock Screen.")
+ .multilineTextAlignment(.center)
+ .font(.system(size: 17))
.foregroundStyle(theme.secondaryText)
- .frame(maxWidth: .infinity, alignment: .leading)
+ .lineSpacing(4)
+
+ Spacer().frame(height: 10)
+
+ HStack(spacing: 5) {
+ Image(systemName: "clock")
+ .font(.system(size: 12))
+ Text("Updates may have a slight delay from Mac")
+ .font(.system(size: 13))
+ }
+ .foregroundStyle(theme.tertiaryText)
+
+ Spacer().frame(height: 20)
ModePillToggle(mode: $selectedMode)
+ .padding(.horizontal, 24)
+
+ Spacer().frame(height: 16)
+
LiveActivityPreview(mode: selectedMode)
- }
- .padding(.horizontal, 24)
- .padding(.top, 20)
+ .padding(.horizontal, 24)
- Spacer()
+ Spacer()
+ },
+ primaryButton: "Continue",
+ primaryAction: { withAnimation { currentPage = 5 } },
+ secondaryButton: "Back",
+ secondaryAction: { withAnimation { currentPage = 3 } }
+ )
+ }
+
+ // MARK: - Page 6: Pro Upsell
+
+ private var proPage: some View {
+ OnboardingPage(
+ theme: theme,
+ content: {
+ Spacer()
+
+ Image(systemName: "bolt.fill")
+ .font(.system(size: 44))
+ .foregroundStyle(theme.primaryText.opacity(0.8))
+
+ Spacer().frame(height: 24)
+
+ Text("Codync Pro")
+ .font(.system(size: 32, weight: .bold))
+ .foregroundStyle(theme.primaryText)
+
+ Spacer().frame(height: 12)
+
+ Text("Real-time sync, even when\nthe app is closed.")
+ .multilineTextAlignment(.center)
+ .font(.system(size: 17))
+ .foregroundStyle(theme.secondaryText)
+ .lineSpacing(4)
+
+ Spacer().frame(height: 8)
- Button {
+ Text("Less than $1/month")
+ .font(.system(size: 15, weight: .medium))
+ .foregroundStyle(theme.primaryText.opacity(0.6))
+
+ Spacer().frame(height: 24)
+
+ VStack(alignment: .leading, spacing: 14) {
+ proFeatureRow(
+ icon: "antenna.radiowaves.left.and.right",
+ text: "Instant updates — under 2 seconds from Mac to iPhone"
+ )
+ proFeatureRow(
+ icon: "livephoto",
+ text: "Live Activity stays updated even when the app is closed or killed"
+ )
+ proFeatureRow(
+ icon: "bell.badge",
+ text: "Session completion alerts delivered in background"
+ )
+ proFeatureRow(
+ icon: "clock.arrow.circlepath",
+ text: "No more stale data — sessions stay fresh indefinitely"
+ )
+ }
+ .padding(.horizontal, 32)
+
+ Spacer()
+ },
+ primaryButton: "Start Monitoring",
+ primaryAction: {
+ liveActivityManager.mode = selectedMode
+ Task { await liveActivityManager.savePreference() }
+ onboardingComplete = true
+ },
+ secondaryButton: "Start Free",
+ secondaryAction: {
liveActivityManager.mode = selectedMode
Task { await liveActivityManager.savePreference() }
onboardingComplete = true
- } label: {
- Text("Get Started")
- .font(.system(size: 17, weight: .semibold))
- .foregroundStyle(theme.isDark ? .black : .white)
- .frame(maxWidth: .infinity)
- .padding(.vertical, 14)
- .background(
- RoundedRectangle(cornerRadius: 12, style: .continuous)
- .fill(iCloudStatus.isError
- ? theme.primaryText.opacity(0.2)
- : theme.primaryText)
- )
}
- .disabled(iCloudStatus.isError)
- .padding(.horizontal, 24)
- .padding(.bottom, 32)
- }
- .frame(maxWidth: .infinity, maxHeight: .infinity)
- .background(theme.background.ignoresSafeArea())
- .task {
- await checkICloudStatus()
+ )
+ }
+
+ private func proFeatureRow(icon: String, text: String) -> some View {
+ HStack(spacing: 12) {
+ Image(systemName: icon)
+ .font(.system(size: 15))
+ .foregroundStyle(theme.primaryText)
+ .frame(width: 28)
+ Text(text)
+ .font(.system(size: 15))
+ .foregroundStyle(theme.secondaryText)
}
}
+ // MARK: - Helpers
+
private var iCloudSubtitle: String {
switch iCloudStatus {
case .checking: return "Checking iCloud status…"
case .available: return "iCloud is ready"
case .noAccount: return "Sign in to iCloud in Settings"
case .restricted: return "iCloud is restricted on this device"
- case .quotaExceeded: return "iCloud 储存空间已满 — 前往 iCloud 相簿删除一张照片以释放空间"
+ case .quotaExceeded: return "iCloud storage is full"
case .error(let msg): return msg
}
}
- private func stepRow(
- icon: String, title: String, subtitle: String,
- isOK: Bool, isError: Bool, isLoading: Bool
- ) -> some View {
- let iconColor = isOK ? theme.primaryText : isError ? theme.primaryText : theme.tertiaryText
-
- return HStack(spacing: 12) {
- Image(systemName: icon)
- .font(.system(size: 16))
- .foregroundStyle(iconColor)
- .frame(width: 32, height: 32)
- .background(
- RoundedRectangle(cornerRadius: 8, style: .continuous)
- .fill(iconColor.opacity(0.1))
- )
-
- VStack(alignment: .leading, spacing: 2) {
- HStack(spacing: 6) {
- Text(title)
- .font(.system(size: 15, weight: .medium))
- .foregroundStyle(theme.primaryText)
- if isLoading {
- ProgressView()
- .scaleEffect(0.6)
- .frame(width: 14, height: 14)
- } else if isOK {
- Image(systemName: "checkmark.circle.fill")
- .font(.system(size: 13))
- .foregroundStyle(theme.primaryText.opacity(0.7))
- } else if isError {
- Image(systemName: "exclamationmark.circle.fill")
- .font(.system(size: 13))
- .foregroundStyle(theme.primaryText.opacity(0.7))
- } else {
- Circle()
- .fill(theme.tertiaryText)
- .frame(width: 8, height: 8)
- }
- }
- Text(subtitle)
- .font(.system(size: 13))
- .foregroundStyle(theme.secondaryText)
- .lineLimit(2)
- }
- }
- }
-
private func checkICloudStatus() async {
do {
let status = try await CKContainer.default().accountStatus()
- await MainActor.run {
- switch status {
- case .available: iCloudStatus = .available
- case .noAccount: iCloudStatus = .noAccount
- case .restricted: iCloudStatus = .restricted
- default: iCloudStatus = .error("iCloud unavailable")
+ switch status {
+ case .available:
+ // Account OK — verify CloudKit zone works (catches quota issues)
+ do {
+ try await CloudKitManager.shared.ensureZoneExists()
+ await MainActor.run { iCloudStatus = .available }
+ } catch let error as CKError where error.code == .quotaExceeded {
+ await MainActor.run { iCloudStatus = .quotaExceeded }
+ } catch {
+ // Zone might already exist, still OK
+ await MainActor.run { iCloudStatus = .available }
}
+ case .noAccount:
+ await MainActor.run { iCloudStatus = .noAccount }
+ case .restricted:
+ await MainActor.run { iCloudStatus = .restricted }
+ default:
+ await MainActor.run { iCloudStatus = .error("iCloud unavailable") }
}
} catch {
let nsError = error as NSError
@@ -184,12 +520,227 @@ struct IOSOnboardingView: View {
}
}
+// MARK: - Reusable Page Layout
+
+private struct OnboardingPage<Content: View>: View {
+ let theme: CodyncTheme
+ @ViewBuilder let content: () -> Content
+ let primaryButton: String
+ let primaryAction: () -> Void
+ var secondaryButton: String? = nil
+ var secondaryAction: (() -> Void)? = nil
+
+ var body: some View {
+ VStack(spacing: 0) {
+ content()
+
+ // Buttons
+ VStack(spacing: 12) {
+ Button(action: primaryAction) {
+ Text(primaryButton)
+ .font(.system(size: 17, weight: .semibold))
+ .foregroundStyle(theme.isDark ? .black : .white)
+ .frame(maxWidth: .infinity)
+ .padding(.vertical, 16)
+ .background(
+ RoundedRectangle(cornerRadius: 14, style: .continuous)
+ .fill(theme.primaryText)
+ )
+ }
+
+ if let secondaryButton, let secondaryAction {
+ Button(action: secondaryAction) {
+ Text(secondaryButton)
+ .font(.system(size: 15, weight: .medium))
+ .foregroundStyle(theme.secondaryText)
+ }
+ }
+ }
+ .padding(.horizontal, 24)
+ .padding(.bottom, 50)
+ }
+ }
+}
+
+// MARK: - Notification Page (animated)
+
+private struct NotificationOnboardingPage: View {
+ let theme: CodyncTheme
+ let onContinue: () -> Void
+ let onSkip: () -> Void
+
+ @State private var notificationEnabled = false
+ @State private var showBanner = false
+ @State private var appeared = false
+
+ var body: some View {
+ VStack(spacing: 0) {
+ Spacer().frame(height: 60)
+
+ // Faux iPhone screen
+ VStack(spacing: 0) {
+ // iPhone frame with notch
+ ZStack(alignment: .top) {
+ RoundedRectangle(cornerRadius: 28, style: .continuous)
+ .fill(Color(white: 0.94))
+
+ VStack(spacing: 0) {
+ // Top spacer + Notch
+ Spacer().frame(height: 8)
+
+ RoundedRectangle(cornerRadius: 20, style: .continuous)
+ .fill(.black)
+ .frame(width: 100, height: 28)
+
+ // Status bar
+ HStack {
+ Text("9:41")
+ .font(.system(size: 12, weight: .semibold))
+ Spacer()
+ HStack(spacing: 3) {
+ Image(systemName: "cellularbars")
+ Image(systemName: "wifi")
+ Image(systemName: "battery.100")
+ }
+ .font(.system(size: 10))
+ }
+ .foregroundStyle(.black.opacity(0.35))
+ .padding(.horizontal, 20)
+ .padding(.top, 6)
+
+ Spacer().frame(height: 8)
+
+ // Notification banner — slides down from top
+ HStack(spacing: 10) {
+ Image("CodyncIcon")
+ .resizable()
+ .aspectRatio(contentMode: .fit)
+ .frame(width: 34, height: 34)
+ .clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous))
+
+ VStack(alignment: .leading, spacing: 2) {
+ HStack {
+ Text("Session Complete")
+ .font(.system(size: 13, weight: .semibold))
+ .foregroundStyle(.black)
+ Spacer()
+ Text("now")
+ .font(.system(size: 11))
+ .foregroundStyle(.black.opacity(0.35))
+ }
+ Text("my-project finished · $0.42")
+ .font(.system(size: 12))
+ .foregroundStyle(.black.opacity(0.45))
+ }
+ }
+ .padding(10)
+ .background(
+ RoundedRectangle(cornerRadius: 16, style: .continuous)
+ .fill(.white)
+ .shadow(color: .black.opacity(0.06), radius: 10, y: 3)
+ )
+ .padding(.horizontal, 10)
+ .offset(y: showBanner ? 0 : -150)
+
+ Spacer()
+
+ // Faux app grid
+ LazyVGrid(columns: Array(repeating: GridItem(.flexible(), spacing: 8), count: 4), spacing: 8) {
+ ForEach(0..<8, id: \.self) { _ in
+ RoundedRectangle(cornerRadius: 12, style: .continuous)
+ .fill(.gray.opacity(0.08))
+ .aspectRatio(1, contentMode: .fit)
+ }
+ }
+ .padding(.horizontal, 14)
+ .padding(.bottom, 12)
+ }
+ }
+ .frame(height: 300)
+ .clipShape(RoundedRectangle(cornerRadius: 28, style: .continuous))
+ .overlay(
+ RoundedRectangle(cornerRadius: 28, style: .continuous)
+ .stroke(.white.opacity(0.1), lineWidth: 1)
+ )
+ }
+ .padding(.horizontal, 36)
+
+ Spacer().frame(height: 40)
+
+ Text("Stay Updated with\nPush Notifications")
+ .multilineTextAlignment(.center)
+ .font(.system(size: 32, weight: .bold))
+ .foregroundStyle(theme.primaryText)
+
+ Spacer().frame(height: 12)
+
+ Text("Get notified when your Claude Code\nsessions complete, even in background.")
+ .multilineTextAlignment(.center)
+ .font(.system(size: 17))
+ .foregroundStyle(theme.secondaryText)
+ .lineSpacing(4)
+
+ Spacer()
+
+ // Buttons
+ VStack(spacing: 12) {
+ Button {
+ if notificationEnabled {
+ onContinue()
+ } else {
+ Task {
+ let center = UNUserNotificationCenter.current()
+ let granted = (try? await center.requestAuthorization(options: [.alert, .sound, .badge])) ?? false
+ await MainActor.run {
+ if granted {
+ withAnimation(.spring(duration: 0.4)) {
+ notificationEnabled = true
+ }
+ }
+ }
+ }
+ }
+ } label: {
+ Text(notificationEnabled ? "Continue" : "Enable Push Notifications")
+ .font(.system(size: 17, weight: .semibold))
+ .foregroundStyle(theme.isDark ? .black : .white)
+ .frame(maxWidth: .infinity)
+ .padding(.vertical, 16)
+ .background(
+ RoundedRectangle(cornerRadius: 14, style: .continuous)
+ .fill(theme.primaryText)
+ )
+ }
+
+ Button(action: onSkip) {
+ Text("Ask Me Later")
+ .font(.system(size: 15, weight: .medium))
+ .foregroundStyle(theme.secondaryText)
+ }
+ }
+ .padding(.horizontal, 24)
+ .padding(.bottom, 50)
+ }
+ .onAppear {
+ guard !appeared else { return }
+ appeared = true
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.4) {
+ withAnimation(.spring(duration: 0.7, bounce: 0.25)) {
+ showBanner = true
+ }
+ }
+ }
+ .onDisappear {
+ showBanner = false
+ appeared = false
+ }
+ }
+}
+
+// MARK: - ICloud Status
+
private enum ICloudStatus: Equatable {
- case checking
- case available
- case noAccount
- case restricted
- case quotaExceeded
+ case checking, available, noAccount, restricted, quotaExceeded
case error(String)
var isError: Bool {
diff --git a/Codync-iOS/Views/PaywallView.swift b/Codync-iOS/Views/PaywallView.swift
index 1f45f493..83d3e336 100644
--- a/Codync-iOS/Views/PaywallView.swift
+++ b/Codync-iOS/Views/PaywallView.swift
@@ -195,6 +195,16 @@ struct CodyncPaywallView: View {
let result = try await Purchases.shared.purchase(package: pkg)
if !result.userCancelled {
await PremiumManager.shared.refreshStatus()
+ // Pro requires notifications for APNs push
+ let center = UNUserNotificationCenter.current()
+ let settings = await center.notificationSettings()
+ if settings.authorizationStatus == .notDetermined {
+ _ = try? await center.requestAuthorization(options: [.alert, .sound, .badge])
+ } else if settings.authorizationStatus == .denied {
+ if let url = URL(string: UIApplication.openNotificationSettingsURLString) {
+ await UIApplication.shared.open(url)
+ }
+ }
dismiss()
}
} catch {
diff --git a/Codync-iOS/Views/SettingsView.swift b/Codync-iOS/Views/SettingsView.swift
index fcfdf746..80aedc89 100644
--- a/Codync-iOS/Views/SettingsView.swift
+++ b/Codync-iOS/Views/SettingsView.swift
@@ -28,6 +28,26 @@ struct SettingsView: View {
Text("Appearance")
}
+ // MARK: - Notifications
+ Section {
+ Button {
+ if let url = URL(string: UIApplication.openNotificationSettingsURLString) {
+ UIApplication.shared.open(url)
+ }
+ } label: {
+ HStack {
+ Label("Push Notifications", systemImage: "bell.badge")
+ Spacer()
+ Image(systemName: "arrow.up.forward")
+ .font(.caption)
+ .foregroundStyle(.tertiary)
+ }
+ }
+ .tint(.primary)
+ } header: {
+ Text("Notifications")
+ }
+
// MARK: - Support
Section {
Link(destination: URL(string: "mailto:[email protected]")!) {
@@ -50,6 +70,13 @@ struct SettingsView: View {
Text(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "—")
.foregroundStyle(.secondary)
}
+ Button {
+ UserDefaults.standard.set(false, forKey: "codync_onboardingComplete")
+ dismiss()
+ } label: {
+ Label("Reset Onboarding", systemImage: "arrow.counterclockwise")
+ }
+ .tint(.secondary)
} header: {
Text("About")
}
@@ -74,7 +101,11 @@ struct SettingsView: View {
private var subscriptionRow: some View {
let premium = PremiumManager.shared
Button {
- if !premium.isPro {
+ if premium.isPro {
+ if let url = URL(string: "https://apps.apple.com/account/subscriptions") {
+ UIApplication.shared.open(url)
+ }
+ } else {
showPaywall = true
}
} label: {
@@ -82,14 +113,13 @@ struct SettingsView: View {
Label {
Text("Codync Pro")
} icon: {
- Image(systemName: premium.isPro ? "crown.fill" : "crown")
- .foregroundStyle(premium.isPro ? .yellow : .secondary)
+ Image(systemName: premium.isPro ? "checkmark.seal.fill" : "seal")
}
Spacer()
if premium.isPro {
- Text("Active")
- .font(.subheadline)
- .foregroundStyle(.green)
+ Image(systemName: "arrow.up.forward")
+ .font(.caption)
+ .foregroundStyle(.tertiary)
} else {
Text("$0.99/mo")
.font(.subheadline)
diff --git a/Codync-macOS/Services/APNsPushService.swift b/Codync-macOS/Services/APNsPushService.swift
index b9a67f35..6218d9c1 100644
--- a/Codync-macOS/Services/APNsPushService.swift
+++ b/Codync-macOS/Services/APNsPushService.swift
@@ -88,6 +88,29 @@ final class APNsPushService {
pushTokens.removeValue(forKey: sessionId)
}
+ // MARK: - Alert Push (Pro: session completion)
+
+ func sendCompletionAlert(session: SessionState) async {
+ // Fetch device push token from CloudKit
+ let recordID = CKRecord.ID(
+ recordName: "device-push-token",
+ zoneID: CloudKitManager.zoneID
+ )
+ guard let record = try? await CloudKitManager.shared.database.record(for: recordID),
+ let tokenHex = record["token"] as? String else {
+ return
+ }
+
+ let cost = String(format: "$%.2f", session.costUSD)
+ let payload: [String: Any] = [
+ "pushToken": tokenHex,
+ "type": "alert",
+ "title": "Session Complete",
+ "body": "\(session.projectName) finished · \(cost)"
+ ]
+ await post(payload: payload, label: "alert \(session.projectName)")
+ }
+
// MARK: - Push Token Sync (from CloudKit)
func fetchPushTokens(sessionIds: [String] = []) async {
@@ -140,15 +163,20 @@ final class APNsPushService {
do {
let (data, response) = try await URLSession.shared.data(for: request)
if let http = response as? HTTPURLResponse {
+ #if DEBUG
if http.statusCode == 200 {
Self.log("APNs → \(label) ✓")
} else {
let reason = String(data: data, encoding: .utf8) ?? ""
Self.log("APNs → \(label) ✗ \(http.statusCode): \(reason)")
}
+ #endif
+ _ = data // suppress unused warning in release
}
} catch {
+ #if DEBUG
Self.log("APNs → \(label) ✗ \(error.localizedDescription)")
+ #endif
}
}
diff --git a/Codync-macOS/Services/CloudKitSync.swift b/Codync-macOS/Services/CloudKitSync.swift
index 73793978..3a16889f 100644
--- a/Codync-macOS/Services/CloudKitSync.swift
+++ b/Codync-macOS/Services/CloudKitSync.swift
@@ -102,6 +102,13 @@ final class CloudKitSync {
}
if !toSave.isEmpty {
+ // Send completion alert for newly completed sessions (Pro only)
+ for session in toSave where session.status == .completed {
+ if previousStates[session.sessionId]?.status != .completed {
+ await APNsPushService.shared.sendCompletionAlert(session: session)
+ }
+ }
+
let desc = toSave.map { "\($0.projectName):\($0.status.rawValue)" }.joined(separator: ", ")
Self.log("save \(toSave.count): \(desc)")
try await CloudKitManager.shared.saveBatch(toSave)
@@ -112,7 +119,9 @@ final class CloudKitSync {
// Push to APNs via Worker relay for Live Activity background updates
await APNsPushService.shared.fetchPushTokens(sessionIds: sessions.map(\.sessionId))
+ #if DEBUG
Self.log("APNs tokens: \(APNsPushService.shared.tokenCount)")
+ #endif
// Individual mode: per-session push
for session in toSave {
await APNsPushService.shared.sendUpdate(session: session)
diff --git a/Codync-web/app/components/features.tsx b/Codync-web/app/components/features.tsx
index 37b1dc63..e393c7f7 100644
--- a/Codync-web/app/components/features.tsx
+++ b/Codync-web/app/components/features.tsx
@@ -70,9 +70,9 @@ const features = [
<path d="M12 9.5V7M12 17v-2.5" strokeLinecap="round" />
</svg>
),
- title: "Privacy First",
+ title: "Zero Configuration",
description:
- "No accounts, no analytics, no tracking. Code never leaves your devices. Everything stays in iCloud.",
+ "One-click install, no login, no account. No analytics, no tracking. Your code never leaves your devices.",
},
];
diff --git a/Codync-web/app/components/hero.tsx b/Codync-web/app/components/hero.tsx
index 09c667fe..ae37571d 100644
--- a/Codync-web/app/components/hero.tsx
+++ b/Codync-web/app/components/hero.tsx
@@ -32,7 +32,7 @@ export default function Hero() {
<p className="mt-4 text-lg sm:text-xl text-neutral-400 max-w-md leading-relaxed">
Monitor your Claude Code sessions in real-time.
<br />
- <span className="text-neutral-500">iPhone. Mac. Dynamic Island.</span>
+ <span className="text-neutral-500">Zero config. One-click install. No login required.</span>
</p>
<motion.a
diff --git a/Codync-web/app/page.tsx b/Codync-web/app/page.tsx
index ebdab40e..d0c1a954 100644
--- a/Codync-web/app/page.tsx
+++ b/Codync-web/app/page.tsx
@@ -27,7 +27,7 @@ export default function Home() {
Download on the App Store
</a>
<p className="text-sm text-neutral-500">
- Free with optional Pro subscription
+ Free &amp; open source. No account needed — just download and go.
</p>
</div>
</section>
diff --git a/Codync.xcodeproj/project.pbxproj b/Codync.xcodeproj/project.pbxproj
index 3c7b57cb..387e7776 100644
--- a/Codync.xcodeproj/project.pbxproj
+++ b/Codync.xcodeproj/project.pbxproj
@@ -93,6 +93,7 @@
22479FA0953120F3B50A1AF3 /* CloudKitSync.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CloudKitSync.swift; sourceTree = "<group>"; };
3935CEE144EC8AFCA3AEAEA3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
3B652652FD106495A82565C8 /* CodyncLiveActivity.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = CodyncLiveActivity.appex; sourceTree = BUILT_PRODUCTS_DIR; };
+ XC0001SHARED00000000000000 /* Shared.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = "<group>"; };
3BCD1168005B123A7F9ACB37 /* CodyncLiveActivityBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodyncLiveActivityBundle.swift; sourceTree = "<group>"; };
3EB0548BFADFAFC3616A8C4B /* Codync.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Codync.app; sourceTree = BUILT_PRODUCTS_DIR; };
42BAF66F7C50D732B7E69333 /* SessionScanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionScanner.swift; sourceTree = "<group>"; };
@@ -532,7 +533,7 @@
05A665239A83C10C704662CC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CURRENT_PROJECT_VERSION = 2;
+
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = CodyncLiveActivity/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = CodyncLiveActivity;
@@ -543,7 +544,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
- MARKETING_VERSION = 1.0.0;
+
PRODUCT_BUNDLE_IDENTIFIER = com.pokai.Codync.ios.LiveActivity;
PRODUCT_NAME = CodyncLiveActivity;
SDKROOT = iphoneos;
@@ -610,6 +611,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CURRENT_PROJECT_VERSION = 2;
+ MARKETING_VERSION = 1.0.0;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
@@ -685,6 +688,7 @@
INFOPLIST_KEY_NSSupportsLiveActivitiesFrequentUpdates = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
+ INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
INFOPLIST_KEY_UIBackgroundModes = "remote-notification";
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
@@ -694,8 +698,8 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- CURRENT_PROJECT_VERSION = 2;
- MARKETING_VERSION = 1.0.0;
+
+
PRODUCT_BUNDLE_IDENTIFIER = com.pokai.Codync.ios;
PRODUCT_NAME = Codync;
SDKROOT = iphoneos;
@@ -716,6 +720,7 @@
INFOPLIST_KEY_NSSupportsLiveActivitiesFrequentUpdates = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
+ INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
INFOPLIST_KEY_UIBackgroundModes = "remote-notification";
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
@@ -725,8 +730,8 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- CURRENT_PROJECT_VERSION = 2;
- MARKETING_VERSION = 1.0.0;
+
+
PRODUCT_BUNDLE_IDENTIFIER = com.pokai.Codync.ios;
PRODUCT_NAME = Codync;
SDKROOT = iphoneos;
@@ -738,7 +743,7 @@
BBB96964FECC01CD9E90CE59 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CURRENT_PROJECT_VERSION = 2;
+
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = CodyncLiveActivity/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = CodyncLiveActivity;
@@ -749,7 +754,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
- MARKETING_VERSION = 1.0.0;
+
PRODUCT_BUNDLE_IDENTIFIER = com.pokai.Codync.ios.LiveActivity;
PRODUCT_NAME = CodyncLiveActivity;
SDKROOT = iphoneos;
@@ -763,6 +768,8 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
+ CURRENT_PROJECT_VERSION = 2;
+ MARKETING_VERSION = 1.0.0;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
diff --git a/Shared.xcconfig b/Shared.xcconfig
new file mode 100644
index 00000000..acdf65b4
--- /dev/null
+++ b/Shared.xcconfig
@@ -0,0 +1,2 @@
+MARKETING_VERSION = 1.0.0
+CURRENT_PROJECT_VERSION = 2
diff --git a/metadata/app-info/en-US.json b/metadata/app-info/en-US.json
new file mode 100644
index 00000000..691b7acd
--- /dev/null
+++ b/metadata/app-info/en-US.json
@@ -0,0 +1,5 @@
+{
+ "name": "Codync",
+ "subtitle": "Claude Code Session Monitor",
+ "privacyPolicyUrl": "https://codync.dev/privacy"
+}
\ No newline at end of file
diff --git a/metadata/app-info/zh-Hant.json b/metadata/app-info/zh-Hant.json
new file mode 100644
index 00000000..fa666474
--- /dev/null
+++ b/metadata/app-info/zh-Hant.json
@@ -0,0 +1,5 @@
+{
+ "name": "Codync",
+ "subtitle": "Claude Code 即時監控",
+ "privacyPolicyUrl": "https://codync.dev/privacy"
+}
\ No newline at end of file
diff --git a/metadata/version/en-US.json b/metadata/version/en-US.json
new file mode 100644
index 00000000..5a2e92a3
--- /dev/null
+++ b/metadata/version/en-US.json
@@ -0,0 +1,7 @@
+{
+ "description": "Monitor your Claude Code sessions in real time, right from your iPhone.\n\nCodync is the companion app for developers who use Claude Code on their Mac. Get instant visibility into your AI coding sessions — status, costs, tasks, and context — all synced automatically through iCloud.\n\nLIVE ACTIVITIES & DYNAMIC ISLAND\nSee your active sessions on your Lock Screen and Dynamic Island without unlocking your phone. Choose between two display modes:\n• Overall Mode — a unified dashboard showing all sessions at a glance\n• Individual Mode — separate activity cards for each session\n\nREAL-TIME SESSION MONITORING\n• Track session status: working, idle, needs input, completed, or error\n• See which AI model is running (Opus, Sonnet, Haiku)\n• Monitor token costs in real time\n• View task progress and current tool activity\n• Check context window usage percentage\n\nSEAMLESS iCLOUD SYNC\nZero configuration required. Codync syncs all session data from your Mac through iCloud automatically. Just sign in and go.\n\nPRIMARY SESSION CONTROL\nPin your most important session as \"primary\" for priority placement in Live Activities and notifications.\n\nCODYNC PRO ($0.99/month)\n• Background push updates — Live Activities stay current even when the app is closed\n• Always-on Dynamic Island — persistent session status on your Lock Screen\n• Instant APNs delivery — real-time updates with zero delay\n\nPerfect for developers running long AI coding tasks who want to stay informed on the go.",
+ "keywords": "claude,code,ai,session,monitor,developer,live activity,coding,assistant,cost",
+ "promotionalText": "Monitor Claude Code sessions in real time with Live Activities, Dynamic Island, and instant push notifications. Stay informed while away from your Mac.",
+ "supportUrl": "mailto:[email protected]",
+ "whatsNew": "Initial release."
+}
\ No newline at end of file
diff --git a/metadata/version/zh-Hant.json b/metadata/version/zh-Hant.json
new file mode 100644
index 00000000..41f16be8
--- /dev/null
+++ b/metadata/version/zh-Hant.json
@@ -0,0 +1,7 @@
+{
+ "description": "在 iPhone 上即時監控你的 Claude Code 工作階段。\n\nCodync 是專為使用 Mac 上 Claude Code 的開發者打造的隨身監控 app。即時掌握 AI 程式開發的狀態、費用、任務和上下文,透過 iCloud 自動同步。\n\n即時動態與動態島\n無需解鎖手機,直接在鎖定畫面和動態島查看工作階段狀態。提供兩種顯示模式:\n• 總覽模式 — 一覽所有工作階段的統一儀表板\n• 個別模式 — 每個工作階段獨立顯示\n\n即時工作階段監控\n• 追蹤狀態:運作中、閒置、等待輸入、已完成、錯誤\n• 查看正在使用的 AI 模型(Opus、Sonnet、Haiku)\n• 即時監控 token 費用\n• 檢視任務進度和當前工具活動\n• 查看上下文視窗使用百分比\n\niCloud 無縫同步\n零設定。Codync 透過 iCloud 自動從 Mac 同步所有工作階段資料。登入即可使用。\n\n主要工作階段控制\n將最重要的工作階段釘選為「主要」,在即時動態和通知中優先顯示。\n\nCODYNC PRO($0.99/月)\n• 背景推播更新 — app 關閉時即時動態仍保持更新\n• 動態島常駐 — 在鎖定畫面持續顯示工作階段狀態\n• 即時 APNs 推送 — 零延遲即時更新\n\n專為執行長時間 AI 程式開發任務、希望隨時掌握進度的開發者而設計。",
+ "keywords": "claude,code,ai,工作階段,監控,開發者,即時動態,程式,助手,費用",
+ "promotionalText": "透過即時動態、動態島和即時推播通知,即時監控 Claude Code 工作階段。離開 Mac 也能隨時掌握進度。",
+ "supportUrl": "mailto:[email protected]",
+ "whatsNew": "首次發佈。"
+}
\ No newline at end of file
diff --git a/worker/src/index.ts b/worker/src/index.ts
index 42eaddbd..82e34920 100644
--- a/worker/src/index.ts
+++ b/worker/src/index.ts
@@ -11,6 +11,10 @@ interface PushRequest {
pushToken: string;
event?: "update" | "end";
contentState?: Record<string, unknown>;
+ // Alert push fields
+ type?: "liveactivity" | "alert";
+ title?: string;
+ body?: string;
}
export default {
@@ -35,11 +39,44 @@ export default {
return new Response("Missing pushToken", { status: 400 });
}
- const event = body.event ?? "update";
+ const signingKey = env.APNS_SIGNING_KEY.replace(/\\n/g, "\n");
const bundleId = "com.pokai.Codync.ios";
+ const pushType = body.type ?? "liveactivity";
- // .dev.vars escapes newlines as literal \n — restore them
- const signingKey = env.APNS_SIGNING_KEY.replace(/\\n/g, "\n");
+ if (pushType === "alert") {
+ // Regular alert notification (e.g., session completed)
+ const client = new ApnsClient({
+ team: env.APNS_TEAM_ID,
+ keyId: env.APNS_KEY_ID,
+ signingKey,
+ defaultTopic: bundleId,
+ host: "api.sandbox.push.apple.com",
+ });
+
+ const notification = new Notification(body.pushToken, {
+ type: PushType.alert,
+ priority: Priority.immediate,
+ aps: {
+ alert: {
+ title: body.title ?? "Codync",
+ body: body.body ?? "",
+ },
+ sound: "default",
+ },
+ });
+
+ try {
+ await client.send(notification);
+ return Response.json({ success: true });
+ } catch (err: unknown) {
+ const message = err instanceof Error ? err.message : String(err);
+ console.error("APNs alert error:", message);
+ return Response.json({ success: false, error: message }, { status: 502 });
+ }
+ }
+
+ // Live Activity push
+ const event = body.event ?? "update";
const client = new ApnsClient({
team: env.APNS_TEAM_ID,