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:
- Initialize AFCore with your API credentials (
AFCore.initialize(config)). See Initialization. - Authenticate the member using
signInOrCreateMemberwith their external user ID from your identity provider. - Query entitlements via
programs()to determine which features to show. - Enable activity engines based on the member's plan:
- Gym Visits: Load facilities, let the member add gyms from the map, then start geofence monitoring.
- SmartWalking: Connect to Apple HealthKit or Google Health Connect, then enable auto-sync.
- Fit@Home: Present a camera UI and submit selfies for workout verification.
- Self-Report: Allow manual visit logging as a fallback.
- Display progress using
activities()for the monthly activity calendar.
Need Help?
- Check the API Reference for detailed type and method documentation.
- Email: support@advantahealth.com
- Contact your Account Manager for Slack access.