Disable tag for previews
This commit is contained in:
1 parent
b509cf2797
commit
821af9ee08
1 file changed
+11
-3
@@ -113,12 +113,20 @@ enum 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
|
||||
}
|
||||
"""
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user