I found a problem about active compilation condition with SwiftPM. A project side's active compilation conditions are not used without defining them in package side's Package.swift. It is mentioned in this swift forum post: https://forums.swift.org/t/compilation-conditions-and-swift-packages/34627
Additionally, I observed a strange behavior of Xcode. When a Package.swift doesn't define its compilation conditions, Xcode decides actual branch based on whether a configuration name is prefix matching or not.
About
Hi.
I found a problem about active compilation condition with SwiftPM. A project side's active compilation conditions are not used without defining them in package side's Package.swift. It is mentioned in this swift forum post: https://forums.swift.org/t/compilation-conditions-and-swift-packages/34627
Additionally, I observed a strange behavior of Xcode. When a Package.swift doesn't define its compilation conditions, Xcode decides actual branch based on whether a configuration name is prefix matching or not.
Related API
SwiftSetting.define https://github.com/apple/swift-package-manager/blob/11ae0a7bbfaab580c5695eea2c76db9ab092b8a4/Documentation/PackageDescription.md#methods-9
Reproduce
localReceipt
andverify
in ViewController.L93 will be executed if DEBUG compilation condition in the project configuration is active, but L95 is executed. (Cleaning package may be required)
Solution Proposal
Define "DEBUG" compilation condition in Package.swift.
I will submit the PR soon.