Skip to main content

Getting Started with AFCore

AFCore is the cross-platform SDK that provides the data layer and service engines consumer apps use to authenticate members, track activities, detect facility visits, synchronize health data, and communicate with Advanta Health's backend services.


Prerequisites

Before integrating AFCore, confirm the following with your Account Manager:

  • SDK access -- your project has access to the AFCore SDK repository.
  • API credentials -- you have received:
    • Client ID -- OAuth client identifier.
    • Client Secret -- OAuth client secret.
    • Base URL -- environment endpoint (QA or Production).
  • Account configuration -- your Account Manager has configured:
    • Member eligibility and enrollment method (eligibility file or SSO).
    • Program settings: monthly goal targets and entitlement mix.
    • Active entitlements: Gym Visits, SmartWalking, Fit@Home, Self-Report, and any premium entitlements.

Platform Setup

Follow the installation guide for your platform:

  • Install on iOS -- Xcode setup, xcframework integration, capabilities, and App Store guidelines.
  • Install on Android -- Gradle configuration, GitHub Packages, Health Connect, and Play Store guidelines.

Integration Overview

After installing the SDK, a typical integration follows this flow:

  1. Initialize AFCore with your API credentials (AFCore.initialize(config)). See Initialization.
  2. Authenticate the member using signInOrCreateMember with their external user ID from your identity provider.
  3. Query entitlements via programs() to determine which features to show.
  4. Enable activity engines based on the member's plan:
  5. Display progress using activities() for the monthly activity calendar.

Need Help?