periphery: How to resolve "Units have conflicting build targets" error?
We have some types that are used both on our main iOS app target and its Apple Watch extension. These types are not grouped into their own module/framework. This results in a “Units have conflicting build targets” error, which I assume is due to the architectures being different. Is there a recommended way to avoid this conflict, short of duplicating code, creating modules, or creating a new target?
Found conflicting index store units for [path-to-file] in module 'WatchCompanion_Extension'. The units have conflicting build targets: arm64-apple-ios14.0-simulator, arm64-apple-watchos6.2-simulator, i386-apple-watchos6.2-simulator, x86_64-apple-watchos6.2-simulator.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 17 (4 by maintainers)
Commits related to this issue
- Fix indexing multi-platform projects. Closes #597 — committed to peripheryapp/periphery by ileitch a year ago
- Fix indexing multi-platform projects. Closes #597 — committed to peripheryapp/periphery by ileitch a year ago
- Fix indexing multi-platform projects. Closes #597 — committed to peripheryapp/periphery by ileitch a year ago
- Fix indexing multi-platform projects. Closes #597 (#628) — committed to xygkevin/periphery by ileitch a year ago
Done, that works too
@ileitch gentle reminder on the above issue, kindly guide !
Thanks for that. I’ve tried both ways, actually. I tried the Periphery build first, and added the
--index-store-path
to try and troubleshoot, to no avail. I just tried both again with--clean-build
, and am still getting the error.Do you think this could be due to including source files in multiple modules (in this case, the main app and watch extension)?
Sorry for the long wait, but I’m finally getting around to fixing this. Could a couple of you please give the attacthed beta build a try? It should just work 🤞, no need to change any parameters.
periphery.zip