I am constructing a Flutter app and utilizing --dart-define
to go environment-specific variables like ENV, x-api-key, or base URLs. This works completely for Android utilizing:
flutter construct apk --dart-define=ENV=prod
For iOS, I can construct the app and generate a .ipa utilizing:
flutter construct ipa --dart-define=ENV=prod
Until Now
There was no surroundings variable setup. So I used to deploy app utilizing Xcode > Product > Archive which builds the app, and opens the Organizer window. From there, I can select distribution strategies akin to TestFlight, App Retailer, or export the .ipa as seen within the picture. Nevertheless, this methodology doesn’t embrace my –dart-define variables like ENV=prod, that are essential for my app’s configuration.
If I exploit flutter construct ipa --dart-define=ENV=prod
to construct the .ipa, I’ve to make use of Transporter app to add the .ipa. However it doesn’t give me as many possibility as I get in XCode proven I the picture.
My Query:
How can I:
Use Xcode to construct the iOS app and nonetheless embrace the –dart-define surroundings variables, like ENV=prod?
OR, is there a technique to get the identical App Retailer distribution choices (like Organizer window) after constructing by way of flutter construct ipa
?
Any steerage on easy methods to bridge this hole between Flutter CLI builds and the Xcode Organizer move could be actually useful.
Thanks!