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

curioustechizen

05/11/2020, 1:08 PM
I have a mobile multiplatform app that is pretty close in structure to the KaMPKit sample. The app builds and runs fine. Now I added a Test target in XCode and the test target fails to build (even the default XCTestCase sub-class generated by XCode doesn't build). By looking into the build error, I isolated the problem to this: In my case, only
shared.release.xcconfig
is generated; I don't see
shared.debug.xcconfig
Has anybody faced this problem before? How do I get XCode to generate
.xcconfig
for all targets?
My podspec file looks fine. I compared it with the one from KaMPKit and I don't spot any difference, specifically in the xcconfig section of the podscpec file.
w

wingchi

05/11/2020, 7:34 PM
Does it work fine when you manually create your xcconfig file?
c

curioustechizen

05/11/2020, 7:39 PM
I tried that but I think I'm doing something wrong (sorry, I'm not too familiar with iOS development). The xcconfig file was created somewhere in a temp build folder. I tried duplicating it and renaming it but XCode doesn't see it.
w

wingchi

05/11/2020, 7:44 PM
If you go to the
Info
tab in Xcode for your project do you see configurations set for your target?
Should look something like this
c

curioustechizen

05/11/2020, 7:53 PM
Yes. I do see configurations for my target. If I click on "Pods" in XCode, and then see my Configurations, I see that for Debug configuration, it is still configured as
shared.release
. I don't see
shared.debug
in the drop down at all.
w

wingchi

05/11/2020, 8:43 PM
Would you mind sharing a screenshot?
c

curioustechizen

05/12/2020, 8:01 AM
Sure: Here's what I see in KaMPKit project (this is what I expect to see in my project as well):
However, what I see in my project is this (notice only
.release.xcconfig
):
w

wingchi

05/12/2020, 4:43 PM
So you’ve tried creating
multiplatform.debug.xcconfig
?
c

curioustechizen

05/12/2020, 4:46 PM
Yes. But like I said, it got created in a temp build folder somewhere (or at least that's what I think). And I suspect it gets deleted on the next build
w

wingchi

05/12/2020, 8:15 PM
What about from the Android Studio end. Do you see something like this?
c

curioustechizen

05/13/2020, 8:30 AM
Tis is interesting. I do see .debug.xcconfig in te folder (i.e. in Finder). So I guess I'm close