Does not work through CocoaPods
Closed this issue · 4 comments
Description
After adding RiveRuntime to a project with a simple pod 'RiveRuntime'
, the project fails to build when doing import RiveRuntime
:
Failed to build module 'RiveRuntime'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)', while this compiler is 'Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)'). Please select a toolchain which matches the SDK.
Since the code base is open source, is there a reason the pod ships a pre-compiled binary which is not compatible with current Xcode builds instead of shipping the source code to let CocoaPods build it with a matching compiler? Or alternatively, it seems you can use the option BUILD_LIBRARY_FOR_DISTRIBUTION
to make a library that is actually distributable.
Hi @DagAgren thank you for pointing this out, we're taking a look at this now to see what is happening here
It looks like this is very similar to #248, presumably now, the tables have turned here though as the toolchain used to build our RiveRuntime has been updated. having a look to see if we can keep compatibility across different swift version
We've also pushed new versions of the runtime since Jan 31 & so this should sort out the immediate problem you are reporting.
However I was not able to reproduce an issue building with previous version of RiveRuntime
(I went back as far as 3.05, which was built in October 22). I simply created a new project, and added RiveRuntime as a dependency in a podfile and installed the pod. Is there a repro that you can share for this @DagAgren ?
I am not sure if we can move away from distributing an xcframework with pre-compiled binaries completely. We include some c++ packages that have dependencies on skia, building those libraries from scratch requires large downloads. I do wonder if we need to compile our .swift sources though & if there is a way to avoid doing that. I think the first step would be to get a repro on the issue you've encountered to make sure we are looking at the same problem though
Also looking at our build options for RiveRuntime, the BUILD_LIBRARY_FOR_DISTRIBUTION
flag is already set to yes
.
I'm going to close this issue for now, as it should be resolved, if this is still causing problems please reopen the ticket.