https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

Sebastien Leclerc Lavallee

10/23/2020, 3:52 AM
I’m trying to make the Cocoapods plugin working with iOS app (Tried official and Touchlab fork). I’ve enabled the plugin and generated my podspec file (also fix the path of the script because my setup is a bit different). It does create the “dummy” framework in
shared/build/cocoapods/framework/shared.framework
Back to the ios folder, I’m doing
pod install
and it does install everything. When I hit build, it fails with error like
could not build module shared
. When inspecting the imported shared.framwork, I see it’s still have the
dummy.h
so makes me think the sync didn’t worked. Where can I get more info about that
before_compile
script which calls task
gradlew shared:syncFramework
? Also, I did try to manually call the
./gradle shared:syncFramework
task but it fails with
Task syncFramework not found in project shared
. Why? Did checkout Touchlab’s KampKit and can compile without any issue… when comparing what they did, it’s pretty much the same. I’m clearly missing something but can’t point exactly what… Anyone with some hint? Thanks!
Also worth mentioning that I am moving from the packForXcode task and framework directly inside the project Xcode project
j

John O'Reilly

10/23/2020, 7:01 AM
fwiw https://github.com/joreilly/PeopleInSpace also uses that plugin in case you can see anything different in it's use there
r

rocketraman

10/23/2020, 8:14 AM
If you used to have
packForXCode
you might have some cruft left over in your xcode project where it is still trying to build the old shared framework. Look for references to the shared framework and remove them, then
pod install
again to have cocoapods update the xcode project again.
e

Even André Fiskvik

10/23/2020, 8:39 PM
Do you have a custom Configuration in your Xcode project, or do you purely use Debug/Release ?
s

Sebastien Leclerc Lavallee

10/24/2020, 1:22 AM
@John O'Reilly Thanks I’ll have a look! @rocketraman I’ll double check to make sure I deleted everything @Even André Fiskvik I do have some more configurations but I don’t use them anymore as I have different scheme… I’ll delete those configurations just to be sure there isn’t any problem Thanks all!
6 Views