Hello. I am new here. I am working on a kmm projec...
# multiplatform
k
Hello. I am new here. I am working on a kmm project and encountered a problem. Please help me. https://stackoverflow.com/questions/77584346/kmm-cant-run-app-in-ios-simulator-app-uses-cocoapods-dependency
p
I think the problem may be related to that framework not having support for emulators. Could you confirm it has support for it?
k
The library is in swift. But, I am able to use it in code: ////// import cocoapods.TwilioConversations.TCHConversation //////
Screenshot 2023-12-01 at 5.47.48 PM.png
Also it should have support for simulator
I am following exactly the same with the documentation but not getting results
p
What if you run it from xCode?
k
It is not for TwilioConversations If I simply add "JSONModel" pod, it shows the same error
p
Humm I see, are you building from Android Studio or Xcode?
k
Yes, tried running with Xcode also. Same error. Also tried running on Rosetta (Because I use M1 chip). But did not work
p
Ah ok
k
Both AS and XCOde
p
I first thought that the swift Interoperability could be the issue but as you said you have visibility of it.
However, the official documentation said something about swift pure libraries.
k
I also thought about it. If other libs work and only Twilio did not work, I could conclude this is related to pure swift. But I am unable to run with 'JSONModel' pod according to docs.
image.png
p
That's right. I am trying to find a section I saw with common issues when using cocoapods but don't see it now
b
Did you close Xcode and open the xcworkspace instead?
You also need to update AS run configuration to use it as well over the xcodeproj
k
image.png
Do you mean opening like this?
@brandonmcansh
b
Yes.
That’s the file you use with cocoapods
k
image.png
Blank
b
Did you run pod install in the iosapp directory?
Close Xcode
In terminal in the iosapp directory, run
Copy code
pod deintegrate
rm -rf Podfile.lock
pod install
Then reopen the workspace
k
@brandonmcansh I sample project from template. And tried adding same dependencies. Encountered the same problems. And did what you said:
Did you close Xcode and open the xcworkspace instead?
Now it is running 🤝
b
so you're up and running?
k
Yes, project is working. I was just testing the idea of 'integrating twilio conversations sdk' to kmm.
b
good. when switching to cocoapods the project changes so gets a little different in terms of setup
k
But still did not understand why AS is failing to run the app
b
need to switch the run configuration
delete the existing iosApp one and make a new one and pick the xcworkspace file instead of the proj file
👍 1
k
ok, understood