Closed johnhess closed 1 year ago
FWIW, my archive succeeds when I add an #else
block
#if DEBUG
/**
Simulates a running Network Extension to get nice screenshots.
NEVER EVER remove the `#if DEBUG` condition around this and any code using this.
Should positively never end up in production code!
*/
class var screenshotMode: Bool {
UserDefaults.standard.bool(forKey: "FASTLANE_SNAPSHOT")
}
/**
Show the Snowflake Proxy experimental button.
*/
class var snowflakeProxyExperiment: Bool {
!screenshotMode && true
}
/**
Show VPN Log, Leaf Log, Leaf Configuration and Webserver log segments in log view for debugging.
*/
class var extendedLogging: Bool {
!screenshotMode && true
}
#else
class var screenshotMode: Bool {
false
}
#endif
Oh, thanks for catching this!
It's only defined on DEBUG
on purpose. Belts and suspenders, so I don't accidentally use code in production, which absolutely shouldn't be there. Somehow, I forgot about it in my latest additions. 😆🤷
I'll fix it!
I get the following error trying to Archive the app.
I see this both in Bitrise and in XCode. Removing the
|| Config.screenshotMode
portion of the two offending lines results in a successful build.I think Shared/Config.swift defines that var within the
#if DEBUG
block. Is it simply undefined otherwise? If so, does it just want to be false in an#else
?