Md Hanif
01/24/2021, 10:12 AMArtyom Degtyarev [JB]
01/25/2021, 7:48 AMpackForXcode
task deriving which build mode should be used from the schema name. Hardcoding it to be always DEBUG
should prove that this is the cause. Then, you’ll be able to change the rule being used to set the mode(e.g. checking
System.getenv("CONFIGURATION") == DEVELOPMENT
and setting an appropriate mode).Md Hanif
01/25/2021, 7:56 AMArtyom Degtyarev [JB]
01/25/2021, 11:25 AMDEBUG
’s duplicate with a fancy name(using Xcode), and it failed as expected. Setting mode = "DEBUG"
made this error gone. Maybe you faced another error after that?Md Hanif
01/25/2021, 11:37 AMSystem.getenv("CONFIGURATION") ?: "DEVELOPMENT"
here I had DEVELOPMENT
instead of default DEBUG
and I got the same error as mentioned in the question.Artyom Degtyarev [JB]
01/25/2021, 11:48 AMmode
variable containing inappropriate symbols. To figure it out, I recommended you to try setting it as
val packForXcode by tasks.creating(Sync::class) {
group = "build"
//val mode = System.getenv("CONFIGURATION") ?: "DEBUG"
val mode = "DEBUG"
val sdkName = System.getenv("SDK_NAME") ?: "iphonesimulator"
...
I already checked it locally, and it works as expected. Therefore, my second recommendation was:
2. Try changing the original line to be set on RELEASE
when you build for the release, and to DEBUG
when you build your development, debug, etc. To achieve that, I would recommend something like
val mode = if (System.getenv("CONFIGURATION").toUpperCase() == "DEBELOPMENT") "DEBUG" else System.getenv("CONFIGURATION")
...
Md Hanif
01/25/2021, 3:32 PM