FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

dotenv CI/CD: XCode Cloud - how to define env vars ? Android appbundle - how to define env vars ? · Issue #97 · java-james/flutter_dotenv · GitHub

Repository navigation

dotenv CI/CD: XCode Cloud - how to define env vars ? Android appbundle - how to define env vars ? #97

Description

I am using flutter_dotenv 5.1.0

Everything works if I compile my flutter app locally:

import 'package:flutter_dotenv/flutter_dotenv.dart';

// Load .env file
await dotenv.load(fileName: '.env');

// Initialize Stripe
String myKey = dotenv.env['MY_KEY']!;

But how does it work for Xcode Cloud CI ??

And how for Google Playstore (appbundle) ??

For XCode Cloud:

I am using the default ci_post_clone.sh as described here in the official Flutter documentation.

What do I need to add to this ci_post_clone.sh script in order to make the environment variables defined in .env work.

(And I do not want to add .env to git)


For XCode Cloud, I also tried to directly mention the env vars in the XCode mask (under Intergrate Workflows)

But it does not work - Apple still throws the error that .env cannot be found under /assets/.env .

How can I use .env in Flutter and still use XCode Cloud CI ??

For Android I am clueless. Any idea ? (I'm using flutter build appbundle)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL