Skip to main content

Run the iOS Sample

git clone https://github.com/AdvantaHealth/AFCore.git
cd AFCore

# Build the embedded XCFramework so the sample's local SPM dep resolves
./gradlew :core:assembleAFCoreXCFramework

# Open the Xcode project
open sample/ios/iosApp.xcodeproj

In Xcode:

  1. Select the iosApp (iOS) scheme
  2. Pick an iPhone simulator (iOS 17+) or a real device
  3. ⌘R to run

On first launch the Initialize screen will ask for:

After Initialize, the Login screen accepts a test member credential or an external user id for signInOrCreateMember.


What's wired up

The sample organizes AFCore demos into five user-facing tabs plus a hidden Developer tab:

TabDemonstrates
HomeInitialization state, session lifecycle, programs & entitlements
ActivityActivityCalendarView, drill-down per day, status badges
Check-InCheckInSheet with scan / map / manual flows
WellnessSmartWalking sync state, Mental Fitness SpotIt feedback
ProfileMember profile, payments, settings, sign-out
Developer (hidden)The original 28 function-by-function screens — every single API surface

The visible tabs are built with AFCoreUI; the Developer tab uses plain SwiftUI for ground-truth testing.


XCTests

xcodebuild test \
-project sample/ios/iosApp.xcodeproj \
-scheme iosAppTests \
-destination 'platform=iOS Simulator,name=iPhone 16'

Covers SDK initialization, Keychain storage, HealthKit availability, geofence regions, boot-config persistence, and session-state observation.