Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Mobile SDK quickstart

The prerequisites and required configuration to properly set up your development environment for the Optimizely Configured Commerce Mobile SDK.

Prerequisites

Ensure you have the following prerequisites before developing the Optimizely Configured Commerce Mobile SDK:

Configure

The following configuration is required.

Update the following files with your specifications:

  • lib/core/colors/app_colors.dart – Controls colors used in the app. The Admin Console setting AppConfigurationService overrides the primary color.
  • assets/config/base_config.json – Set Domain to your Configured Commerce instance and set shouldUseStaticDomain to true:
    "domain": "www.example.com",
    "shouldUseStaticDomain": true,
    
    If shouldUseStaticDomain is false, the app behaves like a testing app where you can change between domains from the settings screen. This can be helpful during testing or partner builds.

❗️

Warning

When submitting the application to the Apple App Store or Google Play, do not submit it with shouldUseStaticDomain set as false.

The app verifies that the domain string is set in the base_config.json file upon launch. The app uses that value as the host for all requests if it is set. Otherwise, you must enter a domain URL for the app to use.

🚧

Important

Do not add any properties or tamper with base_config.json except for altering its existing property values. If you wish to implement custom logic based on a new property, use custom_config.json.

If you are interested in configuring the Mobile SDK further, refer to Mobile SDK Reference.


Next

After configuring the Core project, you will need to set up the Android and iOS projects: