'Failed to create a bundle instance representing' when trying to run unit tests for a framework project

Hi!

I've run into some problems with running unit tests for iOS framework project recently. It had worked, but it stopped since one of the command line tool's updates.

When I try to run unit tests with a command line (xcodebuild) I get 'Failed to create a bundle instance representing' error. But only for an iOS framework project and when -derivedDataPath is set with a custom path.

Code Block
xcodebuild -project TestFramework.xcodeproj -scheme TestFramework -derivedDataPath ./output  -destination 'platform=iOS Simulator,id=***' clean build test


In the Xcode I can run tests without any problems.
When I remove -derivedDataPath parameter, it works like a charm as well. On the other hand, unit tests for an iOS application project works from command line and Xcode, whenever I set -derivedDataPath flag or not.

Has any of you been dealing with the same problem? Or do you know any solution? Or is it a known issue?

Cheers!

PS.
Code Block
$ xcodebuild -version 
Xcode 12.4
Build version 12D4e
$ sw_vers 
ProductName: Mac OS X
ProductVersion: 10.15.7
BuildVersion: 19H2

Replies

Go to XCode -> Preferences -> Locations, select Advanced, check Shared Folder.