Skip to main content

SDK API (iOS)

After AzeooSDK.initialize(...) then connectUser(...), use the SDK instance to access user, theme, navigation, and modules.nutrition.

Entry points​

  • AzeooSDK.initialize(apiKey:environment:config:theme:deepLinks:safeArea:connector:completion:) — Initializes the SDK and returns an AzeooSDK instance in completion.
  • AzeooSDK.shared — Singleton after init.
  • sdk.connectUser(token:gender:height:weight:completion:) — Connects a user; required before using modules and user-related flows.
  • sdk.disconnect(completion:) — Disconnects current user session while keeping SDK initialized.

API surface​

AreaAccessPurpose
Usersdk.userprofile access and user-related operations
Themesdk.themesetMode, setPrimaryColor, setTheme, getCurrentTheme, etc.
Navigationsdk.navigationto(), back(), backToRoot(), handleDeepLink(), getCurrentRoute()
Nutritionsdk.modules.nutritiongetViewController(), getView(), showDiary(date:), showPlans(), showScanner(), etc.

Quick example​

AzeooSDK.initialize(apiKey: "your-sdk-api-key", config: config, theme: theme) { initResult in
switch initResult {
case .success(let sdk):
sdk.connectUser(
token: "userToken",
gender: "male",
height: AzeooHeight(178.0),
weight: AzeooWeight(75.0)
) { connectResult in
guard case .success = connectResult else { return }
let vc = sdk.modules.nutrition.getViewController()
present(vc, animated: true)
}
case .failure:
break
}
}

Next steps​