I'm trying to understand what the best approach is to create a multiplaform app that runs on Android phone, Android Wear, iPhone and iWatch with a shared library. In my post from yesterday I was using Cocoapods for the shared library, but this gives me such a big headache, maybe I have to use XCFramework?
I just tried to get it to work with an empty (new) Kotlin Multiplatform App project from Android Studio to get the "Hello, <<platform>>" demo running with the "Regular framework". It runs on the iPhone, but after adding the watchOS target in XCode, the problems start. I have uploaded the demo project to github:
https://github.com/Chris-NL/Demo
Building and running for iPhone works fine. Building for WatchOS works fine, but give me a warning: "linking against a dylib which is not safe for use in application extensions". When trying to run on the iWatch gives xCode gives me an installation error: "A signed resource has been added, modified, or deleted."
I tried adding isStatic = true to build.gradle.kts, although that does remove the warning for watchOS, it results in installation errors on the iPhone.
iMac (Retina 5K, 27-inch, Late 2015 with an 3,3 GHz Quad-Core Intel Core i5 running MacOS Montery 12.4)
Android Studio Chipmunk
xCode 13.4.1
all the latest plugins installed
Anyone a clue on how to get this poperly to work?