https://kotlinlang.org logo
k

Kris Wong

04/25/2019, 9:18 PM
I notice when using the cocoapod plugin, I need to delete the build directory in my mpp project any time I switch ABIs (device/sim). is that expected?
p

pardom

04/25/2019, 9:30 PM
Are you using the podspec wrapper?
k

Kris Wong

04/25/2019, 9:31 PM
i am using the podspec that was generated
p

pardom

04/25/2019, 9:32 PM
In order to avoid compatibility issues during an Xcode build, the plugin requires using a Gradle wrapper. To generate the wrapper automatically during execution of the podspec task, run it with the parameter -Pkotlin.native.cocoapods.generate.wrapper=true.
k

Kris Wong

04/25/2019, 9:33 PM
i have the gradle wrapper committed to my source repo, like an android project
it's the same wrapper?
p

pardom

04/25/2019, 9:33 PM
Nope
k

Kris Wong

04/25/2019, 9:33 PM
interesting
i wonder why the plugin doesn't include that if it's necessary
k

Kris Wong

04/25/2019, 9:35 PM
sure seems like the same gradle wrapper
p

pardom

04/25/2019, 9:38 PM
Hmm maybe I misinterpreted that section.
i

ilya.matveev

04/26/2019, 10:22 AM
it's the same wrapper?
Yes, it's the same wrapper generated by Gradle.
I notice when using the cocoapod plugin, I need to delete the build directory in my mpp project any time I switch ABIs (device/sim). is that expected?
No, it isn't expected. What happens if you don't delete the build directory?
k

Kris Wong

04/26/2019, 1:14 PM
then the .klib won't be regenerated for the new ABI
and it gets skipped during linking
i

ilya.matveev

04/26/2019, 1:24 PM
I cannot reproduce this behaviour. Could you share a link to your project?
k

Kris Wong

04/26/2019, 1:31 PM
unfortunately this is proprietary code
i can try to get some logs for you if there's a certain command I can run
i

ilya.matveev

04/29/2019, 11:15 AM
i can try to get some logs for you if there's a certain command I can run
You can add the
--debug
flag to the Gradle command in the generated podspec. It enables verbose logging for the Gradle build started from Xcode.