cards-native/Sources/Features/Account/LoginView.swift
Till JS 2eb7f61f9c fix: ITMS-90129 — DisplayName Cards → Cardecky + Build 2
Apple lehnte Build 0.1.0(1) ab mit ITMS-90129: "The bundle uses a
bundle name or display name that is already taken." Im App-Store
gibt es schon Apps mit dem DisplayName "Cards" (u.a. Apples eigene
Grußkarten-App war so benannt). App-Store-Connect-App heißt sowieso
"Cardecky" — Brand-Konsistenz: DisplayName durchgehend "Cardecky".

Geändert:
- project.yml Main-App: CFBundleDisplayName Cards → Cardecky,
  CFBundleVersion 1 → 2 (Apple lehnt doppelte Build-Nummern ab)
- project.yml Widget: CFBundleDisplayName Cards Widget → Cardecky Widget,
  INFOPLIST_KEY_CFBundleDisplayName analog
- project.yml Share-Extension: CFBundleVersion 1 → 2
- LoginView Heading: "Cards" → "Cardecky"
- NotificationManager.content.title: "Cards" → "Cardecky"
- UITest: erwartet "Cardecky" statt "Cards"

Archive verifiziert: CFBundleDisplayName=Cardecky, CFBundleVersion=2,
ARCHIVE SUCCEEDED. Nach erneutem Upload via Xcode Organizer sollte
TestFlight den Build akzeptieren.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 15:05:33 +02:00

78 lines
2.9 KiB
Swift

import ManaCore
import SwiftUI
struct LoginView: View {
@Environment(AuthClient.self) private var auth
@State private var email = ""
@State private var password = ""
var body: some View {
ZStack {
CardsTheme.background.ignoresSafeArea()
VStack(spacing: 24) {
Text("Cardecky")
.font(.system(size: 48, weight: .bold))
.foregroundStyle(CardsTheme.primary)
Text("Karteikarten des Vereins mana e.V.")
.font(.subheadline)
.foregroundStyle(CardsTheme.mutedForeground)
VStack(spacing: 12) {
TextField("Email", text: $email)
.textContentType(.emailAddress)
.keyboardType(.emailAddress)
.textInputAutocapitalization(.never)
.autocorrectionDisabled()
.padding(.vertical, 12)
.padding(.horizontal, 16)
.background(CardsTheme.surface, in: RoundedRectangle(cornerRadius: 8))
SecureField("Passwort", text: $password)
.textContentType(.password)
.padding(.vertical, 12)
.padding(.horizontal, 16)
.background(CardsTheme.surface, in: RoundedRectangle(cornerRadius: 8))
}
.padding(.horizontal, 32)
Button {
Task { await auth.signIn(email: email, password: password) }
} label: {
HStack {
if case .signingIn = auth.status {
ProgressView()
.controlSize(.small)
.tint(CardsTheme.primaryForeground)
}
Text("Anmelden")
.fontWeight(.semibold)
}
.frame(maxWidth: .infinity)
.padding(.vertical, 14)
.background(CardsTheme.primary, in: RoundedRectangle(cornerRadius: 8))
.foregroundStyle(CardsTheme.primaryForeground)
}
.padding(.horizontal, 32)
.disabled(isSigningIn || email.isEmpty || password.isEmpty)
if case let .error(message) = auth.status {
Text(message)
.font(.footnote)
.foregroundStyle(CardsTheme.error)
.multilineTextAlignment(.center)
.padding(.horizontal, 32)
}
}
}
}
private var isSigningIn: Bool {
if case .signingIn = auth.status { return true }
return false
}
}
#Preview {
LoginView()
.environment(AuthClient(config: AppConfig.manaAppConfig))
}