Combined Watch Os and iOS Framework

Combined Watch OS and iOS Framework

I wound up finding the answer buried in the documentation right after asking it... Rather than delete the question I will post the answer here for the interest of others:

According to Apple you cannot share frameworks between the watch and phone. Specifically:

Sharing Code Between an iOS App and a watchOS App

You can share code, but not frameworks, between your iOS app and Watch
app. Because the apps run on separate platforms with different
architectures, source files must be compiled separately for each
platform. If you still want to use a framework to manage any shared
source files, you must create separate framework targets for each
platform and add your shared source files to each framework.

If you already have an iOS framework, you can duplicate the framework
and modify it to support watchOS.

https://developer.apple.com/library/content/documentation/General/Conceptual/WatchKitProgrammingGuide/iOSSupport.html#//apple_ref/doc/uid/TP40014969-CH21-SW1

No suitable image for Combine found on watchOS 5.2 crash

I believe what you need to do is make the Combine.framework optionally linked. For some reason, Combine can't use the normal UI for this (yet?), but it seems there is a solution in another thread.



Related Topics



Leave a reply



Submit