I created a new KMM project and selected Cocoapods for the iOS framework distribution and as soon as it finished building it threw the following error:
Executing of 'pod install' failed with code 1. Error message:
Please, check that file "/Users/barryalan/AndroidStudioProjects/PersonalProjects/deleteThis/iosApp/Podfile" contains following lines in header: source 'https://cdn.cocoapods.org'
Please, check that each target depended on shared contains following dependencies:
I can't complain given this is still in alpha, but I do need some guidance on how to fix this.
2022 UPDATE
How to run CocoaPods on Apple Silicon (M1) (credit goes to commenter Jakub Turcovsky)
Original post
Had a similar issue on M1 (Apple Silicon) Mac. It asked for dependencies but didn't tell which had been missing. Just the error code was different:
Executing of 'pod install' failed with code 134
After installing the cocoapods (and generate), I had to update ruby for M1 (see How to run CocoaPods on Apple Silicon (M1))
sudo arch -x86_64 gem install ffi
In the KMM project I ran (within the iosApp folder):
arch -x86_64 pod install
Shared dependency has been installed
/iosApp ❯ arch -x86_64 pod install
Analyzing dependencies
Downloading dependencies
Installing shared (1.0)
Generating Pods project
Integrating client project
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
After that, the project has been sync properly.
FYI:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With