Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

carthage update --platform macOS报错如何解决 #225

Open
HelloZQL opened this issue Oct 31, 2018 · 4 comments
Open

carthage update --platform macOS报错如何解决 #225

HelloZQL opened this issue Oct 31, 2018 · 4 comments

Comments

@HelloZQL
Copy link

HelloZQL commented Oct 31, 2018

No description provided.

@piaojin
Copy link

piaojin commented Jan 4, 2019

  1. 换成cocopod吧! 项目目录下:
    pod init
  2. 生成的文件Podfile中输入对应用到的库:
target '12306ForMac' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for 12306ForMac
  pod 'Alamofire', '~> 4.0.0'
  pod 'XCGLogger', '~> 5.0.5'
  pod 'SwiftyJSON', '~> 4.0.0'
  pod 'FMDB', '~> 2.6.2'
  pod 'OMGHTTPURLRQ', '~> 3.2.2'
  pod 'PromiseKit', '~> 4.1.0'
  pod 'MASPreferences', '~> 1.1.4'

end
  1. pod install
  2. 注释掉Xcode中的run script (## xxxxxxxxx)
    这样对应的pod 版本就可以运行了

@kissoflove
Copy link

kissoflove commented Jan 6, 2019

一般是路径和版本的问题,下面是我的Cartfile文件:

#github "Alamofire/Alamofire" == 4.0
#报错,改用github "https://github.com/Alamofire/Alamofire.git"
#A shell task (/usr/bin/env git clone --bare --quiet https://github.com/Alamofire/Alamofire.git /var/root/Library/Caches/org.carthage.CarthageKit/dependencies/Alamofire) failed with exit code 128:
#error: RPC failed; curl 18 transfer closed with outstanding read data remaining
#fatal: The remote end hung up unexpectedly
#fatal: early EOF
#fatal: index-pack failed
github "https://github.com/Alamofire/Alamofire.git"
github "ccgus/fmdb" == 2.6.2
github "mxcl/OMGHTTPURLRQ" == 3.2.2
github "mxcl/PromiseKit" == 4.1.0
github "DaveWoodCom/XCGLogger" # == 5.0.5
#若指定版本则报错
#A shell task (/usr/bin/env git clone --bare --quiet https://github.com/DaveWoodCom/XCGLogger.git /var/root/Library/Caches/org.carthage.CarthageKit/dependencies/XCGLogger) failed with exit code 128:
#error: RPC failed; curl 18 transfer closed with outstanding read data remaining
#fatal: The remote end hung up unexpectedly
#fatal: early EOF
#fatal: index-pack failed
github "shpakovski/MASPreferences" == 1.1.4
github "SwiftyJSON/SwiftyJSON"

执行成功
carthage

下载完成后生成的Cartfile.resolved文件

github "Alamofire/Alamofire" "4.8.0"
github "DaveWoodCom/XCGLogger" "6.1.0"
github "SwiftyJSON/SwiftyJSON" "4.2.0"
github "ccgus/fmdb" "2.6.2"
github "mxcl/OMGHTTPURLRQ" "3.2.2"
github "mxcl/PromiseKit" "4.1.0"
github "shpakovski/MASPreferences" "1.1.4"

@piaojin
Copy link

piaojin commented Jan 6, 2019

@kissoflove 哈哈我是没有安装carthage所以才改成cocopod

@CoderLeonidas
Copy link

@piaojin 我也改过cocoapods,遇到过很多奇奇怪怪的问题。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants