Installation
Learn how to install MobileCtl on your system.
System Requirements
Minimum Requirements
- Java: JDK 11 or higher
- Git: 2.0 or higher
- Operating System: Linux, macOS, or Windows
Platform-Specific Requirements
For Android Builds
- Android SDK
- Gradle 7.0 or higher
- Android Studio (recommended)
For iOS Builds
- macOS only
- Xcode 13 or higher
- CocoaPods (if using)
Installation Methods
Method 1: Build from Source (Recommended)
This is the current installation method while package managers are being set up.
Step 1: Clone the Repository
git clone https://github.com/AhmedNader65/MobileCtl.git
cd MobileCtlStep 2: Build the Project
./gradlew buildThis will:
- Download all dependencies
- Compile the Kotlin source code
- Run tests
- Create the CLI executable
Step 3: Test the Installation
./mobilectl.sh --helpYou should see the MobileCtl help output.
Step 4: Add to PATH (Optional)
On Linux/macOS:
# Add to ~/.bashrc or ~/.zshrc
export PATH="$PATH:/path/to/MobileCtl"
# Or create a symlink
sudo ln -s /path/to/MobileCtl/mobilectl.sh /usr/local/bin/mobilectlOn Windows:
# Use mobilectl.bat
# Add the MobileCtl directory to your PATH environment variableMethod 2: Homebrew (Coming Soon)
brew tap AhmedNader65/mobilectl
brew install mobilectlMethod 3: Direct Binary Download (Coming Soon)
Download pre-built binaries from GitHub Releases.
Linux:
curl -L https://github.com/AhmedNader65/MobileCtl/releases/latest/download/mobilectl-linux -o mobilectl
chmod +x mobilectl
sudo mv mobilectl /usr/local/bin/macOS:
curl -L https://github.com/AhmedNader65/MobileCtl/releases/latest/download/mobilectl-macos -o mobilectl
chmod +x mobilectl
sudo mv mobilectl /usr/local/bin/Windows:
# Download mobilectl.exe from releases
# Add to PATHMethod 4: NPM (Coming Soon)
npm install -g mobilectlMethod 5: Docker (Coming Soon)
docker pull ahmednader65/mobilectl:latest
# Run with your project mounted
docker run -v $(pwd):/app ahmednader65/mobilectl build androidVerify Installation
Check that MobileCtl is properly installed:
mobilectl --versionExpected output:
MobileCtl v0.3.2
Kotlin Multiplatform CLI for Mobile DevOpsCheck available commands:
mobilectl --helpPlatform-Specific Setup
Android Setup
1. Install Android SDK
Download from Android Studio or use sdkmanager:
sdkmanager "platform-tools" "platforms;android-33"2. Set Environment Variables
export ANDROID_HOME=/path/to/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools3. Create Keystore (for Release Builds)
keytool -genkey -v -keystore release.keystore -alias my-app-key \
-keyalg RSA -keysize 2048 -validity 10000Configure in mobileops.yaml:
build:
android:
keyStore: release.keystore
keyAlias: my-app-key
keyPassword: ${MOBILECTL_KEY_PASSWORD}
storePassword: ${MOBILECTL_STORE_PASSWORD}iOS Setup
1. Install Xcode
Download from the Mac App Store.
2. Install Command Line Tools
xcode-select --install3. Accept Xcode License
sudo xcodebuild -license accept4. Configure Code Signing
In mobileops.yaml:
build:
ios:
scheme: MyApp
codeSignIdentity: "iPhone Distribution"
provisioningProfile: "path/to/profile.mobileprovision"Credential Setup
Firebase Setup
1. Download Service Account Key
- Go to Firebase Console
- Select your project
- Go to Project Settings > Service Accounts
- Click "Generate New Private Key"
- Save as
firebase-service-account.json
2. Configure in MobileCtl
deploy:
android:
firebase:
enabled: true
serviceAccount: credentials/firebase-service-account.jsonTestFlight Setup
1. Create App Store Connect API Key
- Go to App Store Connect
- Users and Access > Keys
- Create new API key
- Download the
.p8file
2. Configure in MobileCtl
deploy:
ios:
testflight:
enabled: true
apiKeyPath: credentials/AuthKey_XXXXXXX.p8
bundleId: com.example.myapp
teamId: XXXXXXXXXXGoogle Play Console Setup
1. Create Service Account
- Go to Google Cloud Console
- Create Service Account
- Download JSON key
2. Configure in MobileCtl
deploy:
android:
playConsole:
enabled: true
serviceAccount: credentials/play-console-key.json
packageName: com.example.myappEnvironment Variables
Store sensitive credentials as environment variables:
# .env or in your shell profile
export MOBILECTL_KEY_PASSWORD="your_keystore_password"
export MOBILECTL_STORE_PASSWORD="your_store_password"
export SLACK_WEBHOOK_URL="https://hooks.slack.com/services/..."Then reference in config:
build:
android:
keyPassword: ${MOBILECTL_KEY_PASSWORD}
storePassword: ${MOBILECTL_STORE_PASSWORD}
notify:
slack:
webhookUrl: ${SLACK_WEBHOOK_URL}Updating MobileCtl
Update from Source
cd MobileCtl
git pull origin main
./gradlew buildUpdate from Homebrew (Coming Soon)
brew upgrade mobilectlUpdate from NPM (Coming Soon)
npm update -g mobilectlUninstallation
Remove Binary
# If installed via symlink
sudo rm /usr/local/bin/mobilectl
# If cloned
rm -rf /path/to/MobileCtlRemove Homebrew (Coming Soon)
brew uninstall mobilectlRemove NPM (Coming Soon)
npm uninstall -g mobilectlTroubleshooting
Java Version Issues
Error: "Unsupported class file major version"
Solution: Upgrade to JDK 11 or higher:
# macOS with Homebrew
brew install openjdk@17
# Linux with apt
sudo apt install openjdk-17-jdk
# Verify
java -versionPermission Denied
Error: "Permission denied" when running ./mobilectl.sh
Solution: Make the script executable:
chmod +x mobilectl.shBuild Failures
Error: Gradle build fails
Solution: Clean and rebuild:
./gradlew clean buildAndroid SDK Not Found
Error: "ANDROID_HOME not set"
Solution: Set the environment variable:
export ANDROID_HOME=/path/to/Android/SdkNext Steps
Now that MobileCtl is installed:
Need help? Check out: