Get Started
Hey builder, Welcome to SwiftApps! 👋🏻
Here's a quick overview of the boilerplate. Follow along to get your app up and running.
Setting up Android Studio
Set up Android Studio in just a few clicks. First, check the system requirements. Then download the latest version of Android Studio here (opens in a new tab).
Once downloaded, follow the official Android documentation (opens in a new tab) to set up and run Android Studio.
Running your app
Install
Clone the SwiftApps boilerplate repository and open the project in Android Studio
In your terminal, run the following commands:
git clone https://github.com/burhanshakir/swift-apps-android.git [YOUR_PROJECT_NAME]
cd [YOUR_PROJECT_NAME]
git remove remote origin
Update the project name
Open settings.gradle.kts
file and change the rootProject.name
to your project name
rootProject.name = "My New App"
Add your keystore keys
Open the keystore.properties
file and update the keystorePassword
and keystoreAlias
values
keystorePassword=password1
keystoreAlias=swiftnewsalias
Once you've added them inm open the Terminal window inside from Android Studio (Go To View -> Tool Windows -> Terminal) and run:
./gradlew generateKeyStores
This will generate the debug.keystore and release.keystore files which are used to sign the debug and release variants of the app.
You should see them in the /signing
directory
To upload your app to Play Store, you need to have the app signed with a keystore. This is to make sure no one can have unauthorized access to your app!
Add your App ID
Open the app.properties
file and add your own unique App ID.
appId=[YOUR_UNIQUE_ID]
Every Android app has a unique application ID that looks like a Java or Kotlin package name, such as com.example.myapp. This ID uniquely identifies your app on the device and in the Google Play Store. Important: Once you publish your app, you cannot change the application ID
Set up Supabase [Optional]
Go to the Supabase dashboard, create a new project, and note the Supabase Anon Key and the URL. Add them in to the toolbox/AppConstants.kt
file
const val SUPABASE_ANON_KEY = "YOUR_SUPABASE_ANON_KEY"
const val SUPABASE_URL = "YOUR_SUPABASE_URL
Add your App Name and Logo
You can update your apps display name by going to the string.xml
file and changing the app_name key
<resources>
<string name="app_name">Your App Name</string>
</resources>
To add the logo, you can use the Image Asset Studio tool that comes with Android Studio, and build logos for different Android versioned devices. Its also super quick!
- In the Project view, switch to Android
- Right-click the res folder and select New > Image Asset
- Update path of the image to your selected image
- Click Next and Finish
Run your app
Before connecting your Android device to your computer, you need to enable Developer Mode and USB debugging on your device.
To enable developer options on your device, you can:
- Go to Settings > About phone
- Scroll down to Build number
- Tap Build number seven times
- Once developer options are activated, you will see a message that reads, You are now a develope
Connect your android device to your computer and click on the "Run" button