Aller au contenu principal

SDK API (iOS)

After AzeooSDK.init (or Pigeon initialize + connect), you use the SDK instance to access user, theme, navigation, and modules.nutrition / modules.training.

Entry point

  • AzeooSDK.init(apiKey, config, theme, deepLinks, safeArea, ...) — Returns the SDK instance (or use Pigeon AzeooClientApi initialize + connect as in Quick Start).
  • AzeooSDK.shared — Singleton after init.
  • connect(userId, token, completion) — Attach a user; required before using modules or user API.

API surface

AreaAccessPurpose
Usersdk.usergetProfile, getId, getName, updateProfile, refreshProfile, etc.
Themesdk.themesetMode, setPrimaryColor, setLightMode, setDarkMode, getCurrentTheme, etc.
Navigationsdk.navigationto(), back(), backToRoot(), handleDeepLink(), getCurrentRoute()
Nutritionsdk.modules.nutritiongetViewController(), getView(), showDiary(), showPlans(), showScanner(), etc.
Trainingsdk.modules.traininggetViewController(), getView(), showWorkouts(), showPlans(), showExercises(), etc.

Quick example

let sdk = AzeooSDK.init(apiKey: "key", config: config, theme: theme, ...)
sdk.connect(userId: "user-123", token: "jwt") { result in
guard case .success = result else { return }
let vc = sdk.modules.nutrition.getViewController()
present(vc, animated: true)
}

Next steps