AFCoreUI for iOS
AFCoreUI is a Swift Package that ships alongside AFCore SPM. Add the AFCoreUI product in addition to AFCore and import:
import AFCore
import AFCoreUI
The package source is at ui/afcore-ui-ios; README and examples there are the canonical reference.
What's inside
Theme
AFCoreUITheme— colors, typography, spacing, motion, hapticsAFCoreUITheme.advantaHealth— built-in AdvantaHealth palette (light + dark)\.afCoreUIThemeenvironment value; apply via.afCoreUITheme(_:)
Primitives
AHCard— themed surface with shadow / borderAHRing/AHRingTrio— Apple Activity-style progress ringsAHBadge— status pills (Accepted / Pending / Rejected / Queued / Custom)AHBanner— auto-rotating page bannerAHEmptyState— illustrated zero-state with CTAAHHero— section hero with eyebrow / title / subtitle / trailing slotAHTrayNotification— dismissable info / success / warning / error rowAHHaptics— theme-aware feedback wrappers
Feature views
WelcomeCarousel— onboarding value-prop pagesPermissionsPrompt— multi-step permission explainer with async request callbackActivityCalendarView— month grid with goal rings + summary pillsActivityDayDetailView— drill-down with status badges + swipe-to-deleteCheckInSheet— Scan / Map / Manual chooserBarcodeScannerView— AVFoundation scanner with themed overlayFacilityMapView— MapKit map with themed facility pinsSpotItDeckView— Tinder-style swipe deck with up/down feedback
Theming
Wrap your root view once:
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
RootView()
.afCoreUITheme(.advantaHealth)
}
}
}
To rebrand:
let myTheme = AFCoreUITheme(
colors: AFCoreUIColors(/* … */),
typography: .advantaHealth,
spacing: .standard
)
RootView().afCoreUITheme(myTheme)
Reference implementation
The iOS sample app is the working reference — every AFCoreUI primitive and feature view is wired to live AFCore APIs across the Home / Activity / Check-In / Wellness / Profile tabs.