Skip to Content
Production

Production Release Checklist

Before releasing your app to production, ensure the following:

1. ProGuard/R8 Rules Configured (Android)

Critical for Android: The plugin automatically includes ProGuard rules via consumer-rules.pro, but verify:

  • Your app’s build.gradle includes ProGuard rules:

    buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } }
  • The plugin’s consumer rules are automatically merged (no action needed)

  • Test location functionality in a release build before publishing

Why this matters: Without proper ProGuard rules, location updates may fail silently in production. See the GPS Prewarming guide for details.

2. Permissions Properly Configured

Verify all required permissions are declared:

Android (AndroidManifest.xml):

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH_SCAN" /> <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />

iOS (Info.plist):

<key>NSLocationWhenInUseUsageDescription</key> <string>We need your location to provide navigation assistance</string> <key>NSLocationAlwaysAndWhenInUseUsageDescription</key> <string>We need your location to provide navigation assistance</string>

3. Test Release Builds

Always test release builds, not just debug builds:

# Android flutter build apk --release flutter build appbundle --release # iOS flutter build ios --release

Test these scenarios in release builds:

  • Location updates work correctly
  • Maps load and display properly
  • Routes are calculated and displayed
  • Markers appear correctly
  • No crashes or silent failures

4. Error Handling

Implement proper error handling for production:

try { await lazarilloMaps.initialize(); } catch (e) { // Log to crash reporting service (not console) crashReportingService.recordError(e, stackTrace); // Show user-friendly error message showErrorDialog('Unable to initialize maps. Please try again.'); }

5. Battery Optimization Considerations

Location tracking consumes battery. Consider:

  • GPS Prewarming: Only prewarm GPS when user is likely to need it (see GPS Prewarming Guide)
  • Background Location: Request background location only when necessary
  • Stop Updates: Stop location updates when not needed:
    // Stop location updates when user leaves map screen @override void dispose() { lazarilloMaps.stopUpdatingLocation(); super.dispose(); }

6. Privacy and Data Handling

  • Don’t log location data in production
  • Don’t store sensitive data in logs
  • Respect user privacy - only request permissions when needed
  • Handle location data securely - encrypt if storing locally

7. Performance Optimization

  • Lazy initialization: Initialize SDK only when needed
  • Resource cleanup: Dispose resources properly
  • Memory management: Remove markers and routes when not needed
  • Network optimization: Cache map tiles and data when possible

8. Check Common Issues

  1. Location not updating?

    • Verify ProGuard rules are applied
    • Check permissions are granted
    • Verify GPS is enabled on device
  2. Maps not loading?

    • Check network connectivity
    • Verify API key is valid
    • Check for API rate limits
  3. Routes not calculating?

    • Verify origin and destination are valid
    • Check network connectivity
    • Verify API key permissions

Best Practices Summary

✅ DO

  • Disable logging in production by default
  • Enable logging only when debugging specific issues
  • Test release builds before publishing
  • Verify ProGuard rules are applied (Android)
  • Handle errors gracefully
  • Clean up resources properly
  • Respect user privacy

❌ DON’T

  • Leave logging enabled in production
  • Log sensitive data (locations, API keys, user data)
  • Assume debug builds work the same as release builds
  • Ignore ProGuard/R8 configuration (Android)
  • Store location data unnecessarily
  • Request permissions unnecessarily

Support

If you encounter production issues:

  1. Check this guide for common issues
  2. Review the GPS Prewarming guide
  3. Enable logging temporarily to collect diagnostic information
  4. Contact support at lazarillo.app 
Last updated on