build failure on using Nimble on visionOS Apps
- [x] I have read CONTRIBUTING and have done my best to follow them.
What did you do?
I am using Nimble for a Unit Testing Bundle on a visionOS app, and tried building the unit tests target in order to run the tests
What did you expect to happen?
Expected the unit tests target to be built successfully and the tests to be run succesfully.
What actually happened instead?
The build got failed with an error saying:
While building for visionOS Simulator, no library for this platform was found in '/Users/user_name/sample-apps/visionOS/visionOSCarthage/Carthage/Build/Nimble.xcframework'.
Environment
List the software versions you're using:
- Quick: 7.6.0
- Nimble: 13.3.0
- Xcode Version: 15.4 (15F31d)
- Swift Version: Xcode Default
Please also mention which package manager you used and its version. Delete the other package managers in this list:
- Carthage: 0.39.1
This is known. Though it was reported to Quick, making it a bit harder to find.
As this comment notes, a workaround is to manually add CwlPreconditionTesting as a swift package dependency to your unit test's library.
Fixing this is on my roadmap, and I'm still figuring out what a fix would look like.
@younata, I've tried adding the package you've mentioned, but I am still seeing the same error.
Moreover, I couldn't find folders for xros within the .xcframework files from your latest release. Attaching a screenshot of the same below:
Moreover, I believe the issue you are referring to is a bit different from the visionOS issue I've described here
I had tried generating .xcframework file locally using the task defined in your rakefile and was able to see the folders for xros too.
Can you please fix the .xcframework.zip included in the latest releases of both Quick and Nimble to include the folders for xros ?
Oh. Yes. That's also an issue for visionOS specifically.
This is an interesting challenge. Currently we build the Carthage artifacts on a version of Xcode that doesn't support visionOS. One possible solution is to build the visionOS slice on a different machine and then merge the slices together, but... that's a lot of effort compared to the other solution: bump the minimum Xcode/swift version.
Especially since Nimble 14 (the next version) will include an Xcode version bump anyway (right now, it's looking like we'll be going directly to Xcode 16).
For the time being, don't use the pre-built artifacts with Carthage. Sorry.