mix dala.setup_bluetooth_wifi (dala v0.1.4)

Copy Markdown View Source

One-command setup for Bluetooth and WiFi functionality in Dala apps.

This task automates ALL production setup steps for Bluetooth and WiFi:

iOS Setup

  1. Adds Bluetooth source files to Xcode project
  2. Links CoreBluetooth.framework
  3. Adds required Info.plist entries:
    • NSBluetoothAlwaysUsageDescription
    • NSBluetoothPeripheralUsageDescription
    • NSLocalNetworkUsageDescription
    • NSBonjourServices
  4. Patches AppDelegate to initialize Bluetooth bridge
  5. Configures background Bluetooth modes

Android Setup

  1. Adds Bluetooth/WiFi permissions to AndroidManifest.xml
  2. Adds required features for BLE
  3. Copies DalaBridge.java if not present
  4. Patches MainActivity to call DalaBridge.init()

Usage

# Set up everything (recommended)
mix dala.setup_bluetooth_wifi

# Set up specific platform
mix dala.setup_bluetooth_wifi --platform ios
mix dala.setup_bluetooth_wifi --platform android

# Check current setup without making changes
mix dala.setup_bluetooth_wifi --check

# Verbose output
mix dala.setup_bluetooth_wifi --verbose

Options

--platform PLATFORM   Target platform: ios, android, or all (default: all)
--check              Verify setup without making changes
--verbose            Show detailed output
--no-color           Disable colored output
--dry-run            Alias for --check

Examples

# First time setup
mix dala.setup_bluetooth_wifi

# Verify everything is configured correctly
mix dala.setup_bluetooth_wifi --check

# Re-run after adding new permissions
mix dala.setup_bluetooth_wifi --verbose

Idempotent

Safe to run multiple times - will not duplicate entries or cause conflicts.

Prerequisites

  • iOS: Xcode project must exist in ios/ directory
  • Android: Android project must exist in android/ directory
  • Ruby (optional, for iOS Xcode project modification)