# Active Compilation Conditions & Other Swift Flags

**URL:** <https://forums.swift.org/t/active-compilation-conditions-other-swift-flags/79534>\
**Category:** Swift Build\
**Tags:** other-swift-flags\
**Created:** [April 27, 2025, 8:27am UTC](https://forums.swift.org/t/active-compilation-conditions-other-swift-flags/79534 "2025-04-27T08:27:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkarunakar](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/bkarunakar/32/38739_2.png) [@bkarunakar](https://forums.swift.org/u/bkarunakar)\
**Post date:** [April 27, 2025, 8:27am UTC](https://forums.swift.org/t/active-compilation-conditions-other-swift-flags/79534/1 "2025-04-27T08:27:55Z")

</div>

Hello All,

I have been trying to send a conditional flag via **Other Swift Flags**. Based on that flag, I need to display an alert to the user. However, setting the flag in **Build Settings** is not working as expected.

```swift
#if ALPHA_WARNING
    let shouldDisplayAlphaWarning = true
  #else
    let shouldDisplayAlphaWarning = false
#endif

```

Any advice on this would be highly appreciated.

Regards,  
Karunakar

---

<div class="post-metadata">

**Author:** ![bkarunakar](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/bkarunakar/32/38739_2.png) [@bkarunakar](https://forums.swift.org/u/bkarunakar)\
**Post date:** [April 27, 2025, 10:32am UTC](https://forums.swift.org/t/active-compilation-conditions-other-swift-flags/79534/2 "2025-04-27T10:32:09Z")

</div>

My bad, I was trying the flag in a local package. 🙂 Checking the condition in SceneDelegate is working and the flag is being passed as a dependency to the screens in the local package.
