I am constructing a Flutter app and utilizing --dart-define to cross 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 setting 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 comparable to TestFlight, App Retailer, or export the .ipa as seen within the picture. Nonetheless, this methodology doesn’t embrace my –dart-define variables like ENV=prod, that are vital for my app’s configuration
.
If I take advantage of flutter construct ipa --dart-define=ENV=prod to construct the .ipa, I’ve to make use of Transporter app to add the .ipa. Nevertheless it doesn’t give me as many choice 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 setting variables, like ENV=prod?
OR, is there a approach to get the identical App Retailer distribution choices (like Organizer window) after constructing by way of flutter construct ipa?
Any steerage on how you can bridge this hole between Flutter CLI builds and the Xcode Organizer movement can be actually useful.
Thanks!
