Search Docs
Loading...
Skip to content

Configuration

Configure CE.SDK during initialization with a license key, an asset base URL, and a user ID.

5 mins
estimated time
GitHub

EngineSettings#

EngineSettings carries the values CE.SDK needs before the engine boots — the license that removes export watermarks, an optional user ID for accurate MAU tracking, and the base URL the engine resolves asset paths against. All three parameters are optional.

License Key#

Pass your trial or production license here so exports are produced without a watermark. Passing nil keeps the editor in evaluation mode (watermarked exports).

license: secrets.licenseKey,

User ID#

Provide a unique identifier tied to the signed-in user so monthly active users are counted accurately when one person uses the editor on multiple devices. Defaults to nil.

userID: "<your unique user id>",

Base URL#

The engine resolves relative asset paths (typefaces, stickers, video templates, etc.) against baseURL. The default points at the versioned IMG.LY CDN — fine for evaluation, but for production, self-host the assets directory and point baseURL at your own location.

baseURL: URL(string: "https://cdn.img.ly/packages/imgly/cesdk-swift/1.78.0/assets")!,

Apply the Configuration#

Pass EngineSettings into Editor(_:), then customize the surface with .imgly.configuration(_:). The configuration argument controls everything above the engine: the dock, navigation bar, inspector bar, canvas menu, asset library, color palette, and callbacks.

Editor(settings)
.imgly.configuration { GuideEditorConfiguration() }

The example wraps the editor in GuideEditorConfiguration, a small helper class the iOS guides repository ships as a minimal baseline. Substitute your own editor configuration class — the .imgly.configuration(_:) modifier accepts any EditorConfiguration subclass, so the rest of the call stays the same.

API Reference#

Symbol Description
EngineSettings(license:userID:baseURL:) The init-time configuration struct.
Editor(_:) SwiftUI view that mounts the editor with the given EngineSettings.
.imgly.configuration(_:) Applies an EditorConfiguration to the editor.

Next Steps#

  • Theming — Customize the editor’s visual appearance and color scheme
  • Localization — Translate the UI and add custom strings
  • Asset Library — Configure where stickers, templates, and media come from
  • Editing Workflow — Control editing access with Creator and Adopter roles
  • Engine Interface — Drive the engine directly without the editor UI