Skip to main content

First App and Configuration

In 5 minutes you will have both Android and iOS app. Once you have set up your environment according to the requirements, you can proceed to create your first app using KAppMaker. Follow the steps below for initial configuration:

1. Clone or Fork the Repository

Start by cloning or forking the KAppMaker repository to your local machine:

git clone https://github.com/KAppMaker/KAppMaker

If you fork the repository, ensure that the new repo has private access.

2. Keeping Your Repository Up to Date

To keep your repository updated with the latest changes, follow these commands:

git remote add upstream https://github.com/KAppMaker/KAppMaker
git fetch upstream
git merge upstream/main

3. Open In Android Studio

After cloning the repository, open it in Android Studio. On the first attempt, the project may fail to open due to missing keys related to authentication and subscription. In the local.properties file, add the following keys with dummy values:

GOOGLE_WEB_CLIENT_ID=test
REVENUECAT_ANDROID_API_KEY=test
REVENUECAT_IOS_API_KEY=test

4. Run Android App

After adding the above keys, sync the project again. Once the sync is complete, you should be able to run the Android app.

5. Set Up the iOS App

If you successfully launch the Android app, proceed to set up the iOS app. Navigate to the iosApp folder and install the Pod dependencies:

cd iosApp
pod install --repo-update

6. Open the iOS Project in Xcode

Open the project in Xcode by using the .xcworkspace file (not the .xcodeproj file) from iosApp folder. Once opened, run the app in Xcode. At this point, you should be able to run both the Android and iOS apps.

7. Congratulations!

Congratulations! In just 5 minutes, you have set up both the Android and iOS apps. Your application already has authentication, notifications, and in-app purchase features configured (almost).

8. Change Application/Bundle Id and Name

Once you have successfully set up both the Android and iOS applications, you may want to change the application name and bundle ID to reflect your project. Follow the steps below to update these values:

  1. Open gradle/scripts/refactorPackage.gradle.kts.
  2. Update newApplicationBundleId and newApplicationName:
val newApplicationBundleId = "com.company.mynewappid"
val newApplicationName = "MyAmazingApp"
Important

It is advisable to create a backup of your project before proceeding with the next steps, in case any errors occur during the proces. Before running the command, ensure that Xcode is closed. Open it again after the changes are completed to reflect the updates.

  1. Sync the Gradle file and run the refactorPackage task.
./gradlew refactorPackage

Alternatively, you can choose this Gradle task from the Gradle tasks window in Android Studio under the composeApp -> tasks-> other -> section.

  1. Change gradle configuration cache to true. Navigate to the gradle.properties file in the root of your project. And set org.gradle.configuration-cache=true. Sync Gradle files once again to ensure all changes are applied correctly.

9. Further Configuration

There are a few more configurations to complete, such as creating a Firebase project for notifications/authentication and setting up in-app purchase products on the Play Store/App Store. Details on these configurations are provided in the Features sections.