iOS Examples
Use AzeooSDK.initialize(...) then connectUser(...), then access sdk.modules.nutrition and sdk.user / sdk.theme.
Init and connect
AzeooSDK.initialize(apiKey: "your-sdk-api-key", config: config, theme: theme) { initResult in
switch initResult {
case .success(let sdk):
sdk.connectUser(
token: "user-token",
gender: "male",
height: AzeooHeight(178.0),
weight: AzeooWeight(75.0)
) { connectResult in
switch connectResult {
case .success:
break // Use sdk.modules, sdk.user, sdk.theme
case .failure(let error):
print(error)
}
}
case .failure(let error):
print(error)
}
}
Embed and open screens
let nutritionVC = sdk.modules.nutrition.getViewController()
present(nutritionVC, animated: true)
Full example app
See the example/ios_example project for a complete iOS integration.