You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a library for iOS and macOS platforms. When on iOS, I'd like to include a specific, iOS only, dependency. I am using conditional target dependencies to achieve this:
However, when I compile on a macOS target, I get the following error which feels incorrect to me:
/Users/cbp/Library/Developer/Xcode/DerivedData/MyLibrary-hbfrabjxsrphnbbioeeyckityvdv/SourcePackages/checkouts/embrace-spm/Embrace.xcframework:1:1: While building for macOS, no library for this platform was found in '/Users/cbp/Library/Developer/Xcode/DerivedData/MyLibrary-hbfrabjxsrphnbbioeeyckityvdv/SourcePackages/checkouts/embrace-spm/Embrace.xcframework'.
It's true that the Embrace library does not have a macOS version, but I had figured my condition: .when(platforms: [.iOS]) would work around that.
The text was updated successfully, but these errors were encountered:
Bumping this. Running Xcode 13.3 toolchain with Swift 5.5 and still an issue. Conditional product dependencies not respected if said dependencies also depend on their own binary targets (e.g. xcframework).
I have dug into this issue and determined that Xcode completely ignores target conditionals, while swift-build mostly works as expected. #6554 (comment)
Please take the time to make some noise by filing an issue with apple through Feedback Assistant.
Environment
macOS 12.0.1, Xcode 13.2 (13C90)
macOS 12.3, Xcode 13.3 (13E113)
Additional Detail from JIRA
md5: 1d817448ccceb0cac34d0ba118636b94
Issue Description:
I am working on a library for iOS and macOS platforms. When on iOS, I'd like to include a specific, iOS only, dependency. I am using conditional target dependencies to achieve this:
However, when I compile on a macOS target, I get the following error which feels incorrect to me:
It's true that the Embrace library does not have a macOS version, but I had figured my
condition: .when(platforms: [.iOS])
would work around that.The text was updated successfully, but these errors were encountered: