1

I'm currently trying to run cocoapods on Windows, but after installing it I try to run pod --version and get the following output:

Traceback (most recent call last):
    4: from C:/Ruby26-x64/bin/pod:23:in '<main>'
    3: from C:/Ruby26-x64/bin/pod:23:in 'load'
    2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.0/bin/pod:55:in '<top (required)>'
    1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/command.rb:50:in 'run'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/command.rb:168:in 'verify_xcode_license_approved!': invalid byte sequence in UTF-8 (ArgumentError)

I can't figure out what might be causing it. Any ideas?

Diego Garcia
  • 506
  • 3
  • 10
  • Are you sure Cocoapods is supported on Windows? I can't imagine a dependency manager for iOS and Mac projects having Windows support. – Swift Dev Journal Mar 04 '20 at 22:43
  • [CocoaPods added Windows support on 1.7.0](http://blog.cocoapods.org/CocoaPods-1.7.0-beta/#windows-support), as far as I know it only covers a few basic operations, but it should be able to do what I need – Diego Garcia Mar 05 '20 at 13:33

2 Answers2

7

Answering my own question, the problem seems to be related to the terminal encoding. Windows terminal does not use UTF-8 by default, so you have to change it's encoding, you can set it to UTF-8 by running:

chcp 65001

Diego Garcia
  • 506
  • 3
  • 10
0

In my case, this command wasn't work in powershell, but in cmd.exe work fine! maybe this can help

Resende
  • 55
  • 6