title: How to access .env variables in AppDelegate.m from Flutter applications?
body: <p>as instructed from a similar problem <a href="https://stackoverflow.com/questions/57575973/hide-google-maps-api-key-from-source-control-in-a-flutter-app/59590990#59590990">Hide Google Maps API key from source control in a Flutter app</a></p>
  
  <p>AppDelegate.m</p>
  
  <pre><code>#include "AppDelegate.h"
  #include "GeneratedPluginRegistrant.h"
  #import "GoogleMaps/GoogleMaps.h"
  
  @implementation AppDelegate
  
  - (BOOL)application:(UIApplication *)application
      didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
       NSString* mapsApiKey = [[NSProcessInfo processInfo] environment][@"FLUTTER_GMAPS_API_KEY"];
    [GMSServices provideAPIKey: mapsApiKey];
    [GeneratedPluginRegistrant registerWithRegistry:self];
    return [super application:application didFinishLaunchingWithOptions:launchOptions];
  }
  
  @end
  </code></pre>
  
  <p>If i change provideApiKey to @"theApiKeyImTryingToHide" everything works fine.</p>