Skip to main content

🧭 iOS β€” Navigation

Typed navigation with AzeooDestination after connectUser.

let sdk = AzeooSDK.shared

sdk.navigate(to: .nutrition(.plan(id: "summer-plan-2025")))
sdk.navigate(to: .nutrition(.recipe(id: 42, name: "Pasta")))
sdk.navigate(to: .nutrition(.scanner(.ai)))
sdk.navigate(to: .nutrition(.search(initialMealType: .lunch)))

// Cross-module
sdk.navigate(to: .training(.workouts))

Stack API​

sdk.navigate(to: .nutrition(.search))

sdk.back()
sdk.backToRoot()
sdk.canGoBack { result in
switch result {
case .success(let canPop): …
case .failure: …
}
}

sdk.getCurrentRoute { result in … }

On iOS, at the module root, system back does nothing (no β€œexit app” swipe).


Module containers​

sdk.setModuleContainer(AzeooUITabBarCoordinator(self, mapping: [
.nutrition: 1,
.training: 2,
]))
tip

Full UIKit + SwiftUI walkthrough: Multi-tab UI.
Example: example/ios_example_uikit.

SwiftUI: AzeooSwiftUITabCoordinator. Custom: implement AzeooModuleContainer.


Initialize​

Pass deep link config in AzeooSDK.initialize (see Configuration).

Info.plist​

<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>yourapp</string>
</array>
</dict>
</array>

Handle URL​

func application(_ app: UIApplication, open url: URL, …) -> Bool {
AzeooSDK.shared.handleDeepLink(url) { handled in
if !handled { /* parse + navigate */ }
}
return true
}

Universal links: forward the URL the same way after Associated Domains setup.


Embed + navigate​

let vc = sdk.modules.nutrition.getView(bottomSafeArea: false)
navigationController?.pushViewController(vc, animated: true)

// Or tab host
let tab = sdk.tabHost(for: .nutrition, bottomSafeArea: true)

See UI components Β· Nutrition module.


See also​