HI, does anyone know why xcode cant resolve this ?...
# compose-ios
a
HI, does anyone know why xcode cant resolve this ? when i build it from android studio it's just fine
p
Some times xCode takes its time. When you run the build, does it fails?
a
yes it is failed .. i noticed that if you delete Pods folder .. then rebuild the project or clean then run for ios Target .. xcode suddenly can resolve all the reference .. but again if i re run the code from android studio with some changes .. xcode cant resolve the reference again
if i take a look inside ComposeApp .. it’s empty
p
Are you using cocoapods? Run the podAssembleFramework task
a
@Pablichjenkov.. another question related to this .. if i remove all Cocoapods reference .. and use something like this .. how can i add specific ios dependencies for example i need Lokalise for my project .. for now i use pod(“Lokalise”, “1.10.5") inside cocoapod
p
This is the official documentation of how to add dependencies. https://kotlinlang.org/docs/multiplatform-mobile-ios-dependencies.html Tbh cocoapods makes it easy the fact that it generates the objective-c/kotlin bindings automagically. As you can read in the docs using a plain framework you gotta write the file that generates the headers and is more work.
I was using cocoapods before but I discovered that I prefer using plain interfaces to bridge Kotlin and Swift. Basically an interface is a header file at a high scale. Whatever code that I do in swift I wrap it into an interface and send it to Compose/Kotlin land. Haven't tried but you can import a swift library and use it in swift too. I don't see any technical limitations
a
do you have any sample or article for what you said please ? im still new to ios ..
p
I can give you some links later. A bit busy atm
a
Cannot locate tasks that match ':composeApp:podAssembleFramework' as task 'podAssembleFramework' not found in project ':composeApp'.
got this error when podAssembleFramework
im using cocoapods
p
Is that the right name? I don't recall but I believe is different. Sorry I didn't post the exact name just a clue. Go to your gradle panel and try the tasks under shared/cocoapods
a
Heres the list
p
Yes
podPublishDebugXCFramework
should work
a
okay thanks .. ill try that
Still can resolve the main issue
p
Are you exporting LifecycleHelper.kt class. You need a public file in
iosMain
sourcet that expose your class as a public input/ output parameter of a function.