Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

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

Deploy locally

Instructions for running your application locally for testing and debugging.

Follow the appropriate steps to deploy your Optimizely Configured Commerce Mobile SDK app locally for iOS and Android.

iOS

  1. Go inside the iOS folder (cd ios) in your project root and run the command pod update.
  2. Return to your project root folder cd .. when all the pods are updated.
  3. Run the following commands from the project root:
    • flutter clean
    • flutter pub get
  4. Ensure iOS simulator is running when all the dependencies are resolved. Running open -a Simulator.app helps you launch iOS simulator. Then, execute the command from the command line at the root of your project.
    • flutter run
  5. Ensure you have installed the correct iOS provisioning profile that includes your device's UUID to run the app on an iOS device.
  6. Open ios/Runner.xcworkspace in Xcode.
    1. Project Navigator – Select Runner.
    2. Targets – Select Runner.
    3. Signing & Capabilities – Select the appropriate provisioning profile (development or adhoc).
  7. Execute flutter run to run the app on your device.
  8. Ensure you have installed the iOS App Store provisioning profile when you are ready to publish.
  9. Execute the command flutter build ipa to create the binary artifact for publication.

See Flutter's iOS documentation for information.

Android

  1. Connect your device or run an Android emulator.

    📘

    Note

    To resolve the Gradle dependencies required for Android, you should use Android Studio.

  2. Open the android folder in Android Studio to initiate the necessary Gradle sync.
  3. Run the following commands from the root of your project:
    • flutter clean
    • flutter pub get
    • flutter run
  4. Ensure you have created a keystore for Android to sign the apk/aab when you are ready to publish.
  5. Run the command flutter build appbundle.

See Flutter's Android documentation for information.