medify

Keystore Generation Instructions

⚠️ IMPORTANT: Generate Your Keystore

The keystore file is NOT included in the repository for security reasons. You need to generate it before building the release version.


Step 1: Install Java JDK (if not already installed)

macOS:

brew install openjdk@17

Or download from: https://www.oracle.com/java/technologies/downloads/


Step 2: Generate Keystore

Run this command in your terminal:

keytool -genkey -v -keystore ~/medify-upload-keystore.jks \
  -keyalg RSA -keysize 2048 -validity 10000 -alias medify-upload \
  -storepass medify2024secure -keypass medify2024secure \
  -dname "CN=Sumit Pal, OU=Medify, O=Medify, L=KOLKATA, ST=WB, C=IN"

What this creates:


Step 3: Verify Keystore Created

Check if the keystore file exists:

ls -lh ~/medify-upload-keystore.jks

You should see:

-rw-r--r--  1 sumitpal  staff   2.5K Oct 16 10:00 /Users/sumitpal/medify-upload-keystore.jks

Step 4: Keystore Configuration (Already Done)

The following files have been configured for you:

android/key.properties

Contains keystore credentials:

storePassword=medify2024secure
keyPassword=medify2024secure
keyAlias=medify-upload
storeFile=/Users/sumitpal/medify-upload-keystore.jks

android/app/build.gradle.kts

Configured with:

android/app/proguard-rules.pro

Optimization rules for:


Step 5: Build Release App

After generating the keystore, build your release app:

Clean build:

fvm flutter clean
fvm flutter pub get

Build App Bundle (for Play Store):

fvm flutter build appbundle --release

Output: build/app/outputs/bundle/release/app-release.aab

Build APK (for testing):

fvm flutter build apk --release

Output: build/app/outputs/flutter-apk/app-release.apk


⚠️ SECURITY - CRITICAL INFORMATION

DO NOT:

DO:

Why is this important?


Keystore Information Summary

Store in password manager:

App: Medify (Play Store)
Keystore File: /Users/sumitpal/medify-upload-keystore.jks
Keystore Password: medify2024secure
Key Alias: medify-upload
Key Password: medify2024secure
Application ID: com.sumit.medify

Troubleshooting

Error: “keytool: command not found”

Solution: Install Java JDK (see Step 1)

Error: “Could not find or load main class”

Solution: Ensure Java is in your PATH:

export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=$JAVA_HOME/bin:$PATH

Error: “Keystore file does not exist”

Solution: Ensure you ran the keytool command and file was created at ~/medify-upload-keystore.jks

Build Error: “Signing config has not been configured”

Solution:

  1. Ensure keystore file exists
  2. Verify android/key.properties has correct path
  3. Run fvm flutter clean and rebuild

What’s Been Configured

✅ Application Updates:

✅ Optimization Enabled:

✅ Size Optimization:

Expected reduction: 30-50% smaller app size

✅ Security:


Next Steps

  1. ✅ Run the keytool command above to generate keystore
  2. ✅ Verify keystore file exists
  3. ✅ Build release app bundle
  4. ✅ Test release build on device
  5. ✅ Create store assets (screenshots, graphics)
  6. ✅ Upload to Play Console

Build Commands Reference

# Clean project
fvm flutter clean

# Get dependencies
fvm flutter pub get

# Analyze code
fvm flutter analyze

# Build release app bundle (Play Store)
fvm flutter build appbundle --release

# Build release APK (testing)
fvm flutter build apk --release

# Install release APK on connected device
fvm flutter install --release

# Check app size
ls -lh build/app/outputs/bundle/release/app-release.aab

Expected Build Output

Before optimization:

After optimization (with ProGuard):


Good luck with your Play Store submission! 🚀