TestStore not in scope even in debug mode

I have 3 configurations for my project - DEV, STG, and PROD - instead of the default DEBUG and RELEASE. However, as shown in the screenshot, I added DEBUG to active compliation conditions so that the debug flag can work in my project (for DEV).

However, I noticed that I'm getting "Cannot find TestStore in scope" error in DEV even though I can import Composable Architecture in my test file. I presume it is because of the if #DEBUG flag in the TestStore.swift, but the flag works fine in my project, so I'm not sure what to do to make TestStore recognizable. Any advice without creating a new Debug config?

I had a similar issue. Everything started working when I got back to 'built-in' configuration names, sadly :( I think it's a bug in SwiftPM for not considering custom configuration names. ¯\_(ツ)_/¯

Can you confirm that your code works once you rename the scheme to Debug?

Thanks for your reply. Yeah, it works when I change the name to 'DEBUG.' Think it's SwiftPM bug as well :(

Terms of Service

Privacy Policy

Cookie Policy