Hello guys, I'm trying to run offical cocoapds sam...
# multiplatform
v
Hello guys, I'm trying to run offical cocoapds sample https://github.com/Kotlin/kmp-with-cocoapods-compose-sample, when trying to run on iOS side it give me error
Copy code
> Compiling ContentView.swift
  > Compile ContentView.swift (arm64)
    > (7, 9) Cannot find 'MainViewControllerKt' in scope
Does anyone know what is wrong in here?
Screenshot 2025-07-26 at 20.35.47.png
Screenshot 2025-07-26 at 20.36.23.png
Is this normal that
Copy code
build/cocoapods/framework/ComposeApp.framework/Headers/placeholder.h
will be empty?
Copy code
Android Studio Narwhal | 2025.1.1 Patch 1
Build #AI-251.25410.109.2511.13752376, built on July 9, 2025
Runtime version: 21.0.6+-13391695-b895.109 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 15.5
Kotlin plugin: K2 mode
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 10
Metal Rendering is ON
Registry:
  ide.experimental.ui=true
  com.android.studio.ml.activeModel=com.android.studio.ml.AidaModel
Non-Bundled Plugins:
  com.jetbrains.kmm (0.9-251.25410-AS-69)
k
did you try running with
pod install
first then building again for iOS?
v
No I didn't try running the
pod install
, but what makes a difference? It's already a pod file there. Could you please explain to me more? Thank you
k
The
pod install
creates a new workspace file that links the project with the dependencies (in this case, the shared module). You must now open your project in xcode with the newly created or updated
.xcworkspace
file and build the project there.
v
thanks for explaning, I tried to run the
pod install
inside iosApp and tried to open update
.xcworkspace
then build the project it gives me error