https://kotlinlang.org logo
#compose-ios
Title
# compose-ios
s

Sudhir Singh Khanger

06/12/2023, 5:32 PM
I am not able to build the KMM template - https://github.com/JetBrains/compose-multiplatform-ios-android-template
Copy code
Execution failed for task ':shared:podInstall'.
> 'pod install' command failed with code 1.
  Full command: pod install
  Error message:
      [33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
      Consider adding the following to ~/.profile:
      export LANG=en_US.UTF-8
      [0m
  /usr/local/Cellar/ruby@3.0/3.0.6/lib/ruby/3.0.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
I have added the following in the
~/.zprofile
file.
Copy code
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
There is only one podfile in the root of the project where I have already run pod install
👍 1
d

Dima Avdeev

06/12/2023, 7:18 PM
Hello! You can try to run:
Copy code
brew install kdoctor
kdoctor
It will help to investigate what's wrong with the environment
s

Sudhir Singh Khanger

06/12/2023, 7:51 PM
According to kdoctor, the environment is setup properly.
k

KimJason

06/13/2023, 1:40 AM
@Sudhir Singh Khanger
Copy code
iosApp % 
rm -rf Pods
rm Podfile.lock
pod install
and, try again!
s

Sudhir Singh Khanger

06/13/2023, 3:42 AM
@KimJason what is the best way to install cocoapod on Intel Mac? I have used the following way.
sudo gem install cocoapods
And
iosApp %
meaning I should be in that folder? But I think the podfile is in root folder.
k

KimJason

06/13/2023, 3:46 AM
@Sudhir Singh Khanger Run the three commands in the iosApp folder under the root project!
s

Sudhir Singh Khanger

06/13/2023, 4:46 AM
@KimJason still not able to build. Here is the full log. https://gist.github.com/sudhirkhanger/5553bdf9fa987be1c2ebe59514fcf5a5
Copy code
➜  iosApp git:(main) pod install
Analyzing dependencies
Downloading dependencies
Installing shared (1.0.0)
Generating Pods project
Integrating client project
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
k

KimJason

06/13/2023, 4:57 AM
I’m not quite sure. 😢 Would you like to try ‘Rebuild Project’?
s

Sudhir Singh Khanger

06/13/2023, 4:58 AM
I can’t do anything because the first gradle sync hasn’t happened yet. So there are no tasks to be executed even the rebuild.
k

KimJason

06/13/2023, 5:02 AM
ChatGPT was a great help when I was trying out Compose Multiplatform. Have you tried sending the error messages to GPT?
Don’t give up! You just need to overcome a few initial hurdles!
a

AlHussain96

06/13/2023, 9:30 AM
@Sudhir Singh Khanger look what I did in 1 hour and the problem fixed, I used chat gpt to add
Copy code
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
to two file /.profile /.zprofile and the problem didn't solve after that I change the mac user then back to the user and the project build successfully, it seems that the changes in terminal command have applied after re-login to user,
s

Sudhir Singh Khanger

06/13/2023, 6:46 PM
I don’t know what exactly is the solution but I set shell and environment variables eagerly in both the system and Android Studio. After which a few restarts and it started working.
7 Views