I'm building an independent watchOS app with a companion iOS app and to allow those two applications to talk to each other through the WatchConnectivity
framework, there's a weird quirk that the watchOS app target has to be embedded into the iOS app target, without signing or else the session connection won't be established correctly. I have my folder and manifest structure set up like
- Apps
- iOS
- Project.swift
- Watch
- Project.swift
In the iOS app, I want to reference the other watch os target in my dependences using .project(target: "WatchOSApp", path: .relativeToRoot("Apps/Watch")
but on project generation, the watch app isn't embedded as I would expect.
I was able to workaround this however by moving both my targets into the same manifest files so now my dependency is using .target
rather than .project
. It seems like the watch application target is being filtered out for some reason when it's coming from another project.
The test app is split into two project manifests and the iOS target references the watch target as a dependency via .project
. However it's not embedded in the generated project and subsequent checks with the watch session object will fail to connect:
If those targets are consolidated down to a single manifest, it works.
So it seems like it's just something about using .project
over .target
and the fact that it's defined in a different manifest
N/A
14.1.2
4.8.1
15.3
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too