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

Brandon Saunders

11/13/2019, 7:49 PM
Hi multiplatform, I'm trying to get a multiplatform setup similar to a co-worker who is also working on the same codebase. we have a MP kotlin module that has been built, grabbed the iOS framework file and dropped that into a swift host project to consume it. I've booted up AppCode and dropped in the kotlin source to the host project and am attempting to set breakpoints. The project runs, the kotlin code is being executed, I can set breakpoints, but upon start the breakpoints show up as unable to be hit. Per my co-worker for him it just magically worked when the source files were dropped in. Is there something I'm missing to make the link between the framework file and the underlying source?
k

kpgalligan

11/13/2019, 8:08 PM
" grabbed the iOS framework file and dropped that into a swift host project to consume it” Did you compile it or you coworker. the debugger matches on absolute paths
b

Brandon Saunders

11/13/2019, 8:10 PM
we wondered that, and I recompiled it. Does that mean it should not be copied into the project? I know there's those two options when you drop some source files into the project space
k

kpgalligan

11/13/2019, 8:11 PM
I don’t use appcode to dev in general, so I don’t know. However, if your kotlin files are in a folder different than where they were compiled, debugging won’t work
b

Brandon Saunders

11/13/2019, 8:12 PM
hmm ok, let me play around with that knowledge and see if i can get anything to work
Ah! I think I got it. It appears that both the framework file needs to be rebuilt on your machine (to your point) as well as have it be copied into the host project by reference (Create folder references for folders). When I do both then breakpoints light up. Thanks!
k

kpgalligan

11/13/2019, 8:19 PM
👍
3 Views