Cognito KMM Template
  • Welcome
  • Getting Started
    • Quickstart: Getting Started
    • Prerequisites
    • Installation
    • Creating New App
  • Architecture
    • Overview
    • Modules
    • Data Flow
  • Feautures
    • Http Client
    • DataStore
    • Analytics
    • AdMob Integration
    • Crash Reporting
    • Built in Settings Page
  • Handle View States
    • StatelessSurface<T> Composable
    • Handle a screen with 3 states
  • Sequential Content with IndefiniteSurface
  • Handle multiple predefined states
  • Showing Paginated Data
  • Handling list data
Powered by GitBook
On this page
  1. Getting Started

Creating New App

PreviousInstallationNextOverview

Last updated 8 months ago

Generating a New App Module:

  1. Command: Open your terminal and navigate to the root directory of your project.

  2. Execute Script: Run the following command, replacing example with the desired name for your new app module:

    Bash

    ./scripts/gen.sh module example

Functionality:

The gen.sh script automates the process of creating a new app module with resources for both Android and iOS. The structure of these resources is detailed in the accompanying image (which you haven't provided, but I can still explain the general structure).

Expected Resource Structure (Based on Common Practices):

  • exampleApp (Native Android Prioject)

  • exampleIOS (Native IOS Project)

  • Shared Module:

    • shared/src/commonMain/kotlin/modules/exampleModule

    • shared/src/androidMain/kotlin/modules/exampleModule

    • shared/src/iosMain/kotlin/modules/exampleModule

Additional Notes:

  • The specific structure might vary depending on your project's configuration and the gen.sh script's implementation.

  • The script likely generates basic files and configurations to get you started with your new app module. You'll need to fill in the necessary code and resources to implement your app's functionality.

  • Refer to the documentation for your KMM tooling or the gen.sh script itself for detailed information on its functionalities and customization options.

By using this approach, you can efficiently create new app modules within your KMM project, maintaining a consistent codebase for both Android and iOS while leveraging platform-specific resources.