One-command setup for Bluetooth and WiFi functionality in Dala apps.
This task automates ALL production setup steps for Bluetooth and WiFi:
iOS Setup
- Adds Bluetooth source files to Xcode project
- Links CoreBluetooth.framework
- Adds required Info.plist entries:
- NSBluetoothAlwaysUsageDescription
- NSBluetoothPeripheralUsageDescription
- NSLocalNetworkUsageDescription
- NSBonjourServices
- Patches AppDelegate to initialize Bluetooth bridge
- Configures background Bluetooth modes
Android Setup
- Adds Bluetooth/WiFi permissions to AndroidManifest.xml
- Adds required features for BLE
- Copies DalaBridge.java if not present
- 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 --verboseOptions
--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 --checkExamples
# 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 --verboseIdempotent
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)