Mobile SDK quickstart
The prerequisites and required configuration to properly set up your development environment for the Optimizely Configured Commerce Mobile SDK.
Ensure you have the following prerequisites before developing the Commerce Mobile SDK.
Prerequisites
Configure
The following configuration is required. If you are interested in configuring the Mobile SDK further, refer to Mobile SDK Reference.
CommerceMobileApp.Core
All shared code is in the Core project. Update the following files according to your specifications:
AppColors.cs
- Controls colors used in the app.
AppConfigurationService
from the setting in the Admin Console will override the primary color.
- Controls colors used in the app.
Configuration.json
- Set
Domain
to the Optimizely Commerce instance you are building the app for and setShouldUseStaticDomain
totrue
:
"Domain": "www.example.com", "ShouldUseStaticDomain": true,
- If
ShouldUseStaticDomain
is false, the app will behave like an Optimizely testing app where you can change between domains from the settings screen. Setting ShouldUseStaticDomain to false can be helpful during testing or partner builds.
- Set
Important
When submitting the application to the Apple App Store or Google Play, DO NOT submit it with
ShouldUseStaticDomain
set asfalse
.
The app verifies that the Domain string is set in the Configuration.json
file upon launch. The app will use that value as the host for all requests if it is set. Otherwise, you are prompted in the app to enter a Domain URL for the app to use.
Updated 26 days ago
After configuring the Core project, you will need to set up the Android and iOS projects: