Step 1:
brew install kdoctor
Step 2:
Install Kotlin Kotlin Multi-platform Mobile plugin in android studio and restratrt
Step 3:
Run command kdoctor in terminal to check all the pre configuraiton tool installed or not e-g
[✓] Operation System
[✓] Java
[✓] Android Studio
[✖] Xcode
✖ Current command line tools: /Library/Developer/CommandLineTools
You have to select command line tools bundled to Xcode
Command line tools can be configured in Xcode -> Settings -> Locations -> Locations
[✖] Cocoapods
✖ cocoapods not found
Get cocoapods from <https://guides.cocoapods.org/using/getting-started.html#installation>
Conclusion:
✖ KDoctor has diagnosed one or more problems while checking your environment.
Please check the output for problem description and possible solutions.
If you can see Kdoctor command checked and showed me that Xcode and Cocoapods are not configured
Step4:
Open Xcode -> Setting -> Location -> Command Line Tools: Select correct or reselect the showing one
[✓] Operation System
[✓] Java
[✓] Android Studio
[✓] Xcode
[✖] Cocoapods
✖ cocoapods not found
Get cocoapods from <https://guides.cocoapods.org/using/getting-started.html#installation>
Now Xcode is configured.
Step 5:
Installing Cocoapods:
- brew install cocoapods
- open -e ~/.zprofile (Once file opened then save below two commands in the file & restart terminal)
- export LANG=en_US.UTF-8
- export LC_ALL=en_US.UTF-8
apple@apples-MacBook-Pro ~ % kdoctor
Environment diagnose (to see all details, use -v option):
[✓] Operation System
[✓] Java
[✓] Android Studio
[✓] Xcode
[✓] Cocoapods
Conclusion:
✓ Your system is ready for Kotlin Multiplatform Mobile Development!
We are good to go with KMM