Dealing with a similar issue: https://stackoverflow.com/questions/75782846/cllocation-doesnt-work-from-cli-app-on-macos-ventura
Post
Replies
Boosts
Views
Activity
I'm having a similar issue, and I think it can be replicated with Swift only.
Start a new Swift project as type "Bundle"
Add some code (e.g. a class a method) to be tested
New -> Target -> Unit Test Bundle
Note that "target to be tested" cannot be set to your project, see also: https://stackoverflow.com/questions/55277832/xcode-unable-to-add-test-target-to-existing-swift-project-target-to-be-tested
Add a relevant test for your code from step 2 and a @testable import MyBundleName
Undefined symbol errors