Aller au contenu principal

iOS Quick Start

Get started with the Azeoo SDK in 5 minutes.

Prerequisites

Step 1: Installation

Swift Package Manager

  1. In Xcode: FileAdd Package Dependencies...
  2. Enter the package URL (see Downloads for the current link): https://bitbucket.org/azeoo/azeoo_sdk_spm
  3. Select version (e.g. 1.0.0) and add to your app target

See Installation Guide for details.

Step 2: Get your API key

  1. Register at Azeoo Client Platform
  2. Generate an SDK token

See Getting SDK Token.

Step 3: Initialize and connect

Use the Pigeon API: initialize the core, get the API, call initialize then connect.

import AzeooSDK

// In AppDelegate or app entry
AzeooCore.shared.initialize(enableMultipleInstances: false)
guard let engine = AzeooCore.shared.getFlutterEngine() else { return }
let api = AzeooClientApiFromEngine(engine)

api.initialize(
apiKey: "your-api-key",
config: configMessage, // e.g. from PigeonConfigBridge
theme: themeMessage,
deepLinks: deepLinkMessage,
safeArea: safeAreaMessage
) { result in
switch result {
case .success:
// Then connect when user is authenticated
api.connect(userId: "user-123", token: "jwt-token") { connectResult in
switch connectResult {
case .success(let profile): break // SDK ready
case .failure(let error): break
}
}
case .failure(let error): break
}
}

Use PigeonConfigBridge (or your Config → message mapping) to build config/theme/deepLinks/safeArea messages from your existing Config if needed. See the iOS example for a full integration.

Step 4: Show SDK UI

Get a view controller or view from the module and present it, or open a screen:

let sdk = AzeooSDK.shared  // or your SDK instance
let nutritionVC = sdk.modules.nutrition.getViewController()
present(nutritionVC, animated: true)

// Or open a screen
sdk.modules.nutrition.showDiary(dateTimestamp: nil)
sdk.modules.training.showWorkouts()

That's it! You should see the SDK UI when presenting the view controller or when calling the module methods.

What's next?