2

I set some user-defined variables in Xcode app target build settings like this

enter image description here

as you can see, I set some variables that refer to local path on my Mac. it will work just fine when I run the app on simulator or on real device. but I will fail to build my iOS app on CI/CD Platform like Codemagic for example.

how do I make those variable compatible in CI/CD environment as well?

Alexa289
  • 8,089
  • 10
  • 74
  • 178
  • Could you explain a bit more about what you are trying to do by setting these different values for FLUTTER_TARGET ? as perhaps you could achieve the same thing in a different way using environment variables, which you can define different paths for your local versus on Codemagic. – Maks Feb 09 '23 at 06:53
  • 1
    @Maks fortunately I have solved this problem. the FLUTTER_TARGET variable is basically used to link my iOS code to my Flutter Dart code to set different 'Flavors' (or called as a Scheme in iOS). I post the answer below – Alexa289 Feb 10 '23 at 01:13

1 Answers1

1

in my case, I solve this problem by changing the path from

/Users/Your/Path/In/Here/lib/app/flavors/main_production.dart

to just:

lib/app/flavors/main_production.dart
Alexa289
  • 8,089
  • 10
  • 74
  • 178