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. Fork or Clone the Repository
Start by cloning or forking the KAppMaker repository to your local machine (ensure that the new repo has private access):
SSH:
git clone git@github.com:KAppMaker/KAppMaker.git
or HTTPS:
git clone https://github.com/KAppMaker/KAppMaker.git
2. 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
3. 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.
4. 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
5. 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.
6. 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).
7. 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:
- Open
gradle/scripts/refactorPackage.gradle.kts
. - Update
newApplicationBundleId
andnewApplicationName
:
val newApplicationBundleId = "com.company.mynewappid"
val newApplicationName = "MyAmazingApp"
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.
- 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.
- Change gradle configuration cache to true. Navigate to the
gradle.properties
file in the root of your project. And setorg.gradle.configuration-cache=true
. Sync Gradle files once again to ensure all changes are applied correctly.
8. Keeping Your Repository Up to Date
To keep your repository updated with the latest changes, first set your own github repository as origin , then merge changes from KAppMaker repository:
git remote set-url origin <new-url> (YOUR GITHUB REPO)
git remote add upstream git@github.com:KAppMaker/KAppMaker.git
git fetch upstream
git merge upstream/main
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.