Bootstrap icon indicating copy to clipboard operation
Bootstrap copied to clipboard

Missing Values for Environment Variables Errors

Open altyus opened this issue 9 years ago • 4 comments

When I archive I get numerous errors stating that my production environment is missing values, 1 for each environment variable. This has no effect on my build (all the environment variables work) and I don't see the error at all when building for debug. The issue is, this crashes Xcode Build and by extension my continuous integration build automation process.

/Users/altyus/Development/MakeSpace/iOS/MakeSpaceConsumerApp/MakeSpace/support/KZBEnvironments.plist:1: missing value of variable googleAnalyticsTrackingId for env @\"PRODUCTION\" available values {
    DEVELOPMENT = "xxxxxxxxxxxxx";
    LOCALHOST = "xxxxxxxxxxxxx";
    PRODUCTION = "xxxxxxxxxxxxx";
    STAGING = "xxxxxxxxxxxxx";
}
/Users/altyus/Development/MakeSpace/iOS/MakeSpaceConsumerApp/DerivedData/MakeSpace/Build/Intermediates/ArchiveIntermediates/MakeSpace/InstallationBuildProductsLocation/Applications/MakeSpace.app/KZBEnvironments.plist
/Users/altyus/Development/MakeSpace/iOS/MakeSpaceConsumerApp/DerivedData/MakeSpace/Build/Products/Debug-iphoneos/MakeSpace.app/KZBEnvironments.plist
/Users/altyus/Development/MakeSpace/iOS/MakeSpaceConsumerApp/DerivedData/MakeSpace/Build/Products/Debug-iphonesimulator/MakeSpace.app/KZBEnvironments.plist
/Users/altyus/Development/MakeSpace/iOS/MakeSpaceConsumerApp/MakeSpace/support/KZBEnvironments.plist:1: missing value of variable webBaseURLString for env @\"PRODUCTION\" available values {
    DEVELOPMENT = "https://xxxxxxxxxxxxx.com";
    LOCALHOST = "https://xxxxxxxxxxxxx.com";
    PRODUCTION = "https://xxxxxxxxxxxxx.com";
    STAGING = "https://xxxxxxxxxxxxx.com";
}

Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure

altyus avatar Dec 15 '15 23:12 altyus

the string @"PRODUCTION" looks suspicious to me, if you see how the log message is logged in the example images there should not be NSString formatting involved, how did you set the values?

krzysztofzablocki avatar Dec 16 '15 06:12 krzysztofzablocki

kzbscreenshot

altyus avatar Dec 16 '15 14:12 altyus

What's the default env you set via xcodebuild or scheme?

krzysztofzablocki avatar Dec 16 '15 14:12 krzysztofzablocki

Thanks a ton for the responsiveness. I must admit, I inherited the usage of the library from a previous developer so i'm piecing things together, but I did find this when searching for @"PRODUCTION"

kzbstuff

If I try removing the formatting @" " however and leave the raw strings my build fails when attempting to set the KZBootstrap defaultbuildEnvironment

altyus avatar Dec 16 '15 14:12 altyus