Disable tag for previews
Some checks failed
gitea-openium/resgen.swift/pipeline/pr-master There was a failure building this commit
Some checks failed
gitea-openium/resgen.swift/pipeline/pr-master There was a failure building this commit
This commit is contained in:
parent
2ec4ebcc66
commit
9a05ce29b8
@ -78,12 +78,20 @@ class AnalyticsGenerator {
|
||||
|
||||
private static func getEnabledContent() -> String {
|
||||
"""
|
||||
private var isEnabled: Bool = true
|
||||
private var isEnabled: Bool {
|
||||
if ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1" {
|
||||
false
|
||||
} else {
|
||||
_isEnabled
|
||||
}
|
||||
}
|
||||
|
||||
private var _isEnabled: Bool = true
|
||||
|
||||
// MARK: - Methods
|
||||
|
||||
func setAnalyticsEnabled(_ enable: Bool) {
|
||||
isEnabled = enable
|
||||
_isEnabled = enable
|
||||
}
|
||||
"""
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user