First, you need to initialize the SDK. To do this, use the same project key that you use to initialize the Qonversion SDK.
Copy
// You can initialize using only project keylet configuration = NoCodesConfiguration(projectKey: "projectKey")NoCodes.initialize(with: configuration)
Then you can set the delegates for handling events and customizing screens as follows - (optional):
Copy
// The first delegate is used for main events (e.g., screen opened, button tapped).NoCodes.shared.set(delegate: self)// The second is for screen customization (if you want to override default styles).NoCodes.shared.set(screenCustomizationDelegate: self)// Delegates can be also passed via the initialization through the configuration:let noCodesConfig = NoCodesConfiguration(projectKey: "projectKey", delegate: self, screenCustomizationDelegate: self)
After initializing the SDK, you can move forward and display the No-Codes screen:
The main delegate is needed so that you can receive messages about what is happening during the execution of No-Codes, as well as to provide us with the screen from which to start navigation and display the No-Codes screen. Let’s go through this step by step.
On Android, when a No-Codes screen is displayed, Unity’s game loop is paused because the No-Codes screen runs as a separate Activity on top of Unity’s Activity. This means that all delegate events will be delivered with a delay - they will only be received after the No-Codes screen is closed and Unity resumes.
In this function, you must return a UIViewController from which we will start displaying the No-Codes flow. If you do not provide one, we will take the topmost screen in the current stack.
Screen shown event
Copy
func noCodesHasShownScreen(id: String)
This function notifies about the display of a screen with a specific identifier
By default, No-Code screens automatically detect the device’s system language and display the appropriate localization if available. You can override this behavior by setting a custom locale, which takes priority over the automatic system language detection.The locale should be in standard format (e.g., "en", "en-US", "de", "de-DE"). Pass nil/null to reset to the system default locale.Setting locale during initialization:
Copy
var config = NoCodesConfiguration( projectKey: "your_project_key", locale: "de-DE")NoCodes.initialize(with: config)
Setting locale after initialization:
Copy
NoCodes.shared.setLocale("fr-FR")NoCodes.shared.showScreen(withContextKey: "your_context_key")// Reset to system defaultNoCodes.shared.setLocale(nil)
No-Code screens support light and dark themes. By default, screens automatically adapt to the device’s system appearance (Auto mode). You can override this behavior by setting a specific theme, which takes priority over the automatic system theme detection.
Currently, the theme only affects skeleton loader colors, with full theming support for the No-Code Builder coming soon
Available theme modes:
Auto (default) - Follows the device’s system appearance
Light - Forces light theme regardless of device settings
Dark - Forces dark theme regardless of device settings
Setting theme during initialization:
Copy
var config = NoCodesConfiguration( projectKey: "your_project_key", theme: .dark)NoCodes.initialize(with: config)
Setting theme after initialization:
Copy
NoCodes.shared.setTheme(.light)NoCodes.shared.showScreen(withContextKey: "your_context_key")// Reset to auto (follow system appearance)NoCodes.shared.setTheme(.auto)
Use the screen customization delegate to customize the screen opening animation. For example, to enable or disable the animation (iOS only), specify the type of opening: push/popover (iOS only)/full screen. You can also pass a statusBarHidden flag that determines whether to show or hide the status bar when displaying the screen (iOS only).For example:
By default, the SDK displays a skeleton loading view while the No-Code screen is loading. You can replace it with your own custom loading view by implementing the noCodesCustomLoadingView() method in the screen customization delegate.Your custom view must conform to the NoCodesLoadingView protocol (iOS) or implement the NoCodesLoadingView interface (Android). The SDK calls startAnimating() when the loading begins and stopAnimating() when the screen content is ready.
Copy
// Conform to NoCodesLoadingViewclass MyLoadingView: UIView, NoCodesLoadingView { func startAnimating() { // Start your loading animation } func stopAnimating() { // Stop your loading animation }}// Return it from the screen customization delegatefunc noCodesCustomLoadingView() -> NoCodesLoadingView? { return MyLoadingView(frame: .zero)}
If noCodesCustomLoadingView() returns nil / null, the default skeleton loading view will be used.