I downloaded a demo, hoping to learn more. Find a friend to help me to demo a good tune, his side has been running in the simulator, give me after I still can not run, there is error, it is recommended to perform pod install. This is the first time the IOS xcode use the required steps. Of course, to do this also depends on luck, good fast. I encountered various problems, eventually completed.
1. For the first pod of command you want to execute, you need to install CocoaPods: Open a terminal, if you do not have your execution pod setup, pod install, says you can not use this command
OS X 10.11 previously, the terminal enter the following command:
sudo gem install cocoapods
After 10.11 OS X, the terminal enter the following command:
sudo gem install -n /usr/local/bin cocoapods
2. Below you execute pod install, under normal circumstances will be unsuccessful, slow download speeds, the Metropolitan file fails, you will be prompted to perform the pod setup:
Need some understanding can look at the link below, thanks to the brothers
link: https: //www.jianshu.com/p/43a268ba8f47
Source: Jane books
Cloning into 'master'...
remote: Counting objects: 2002848, done.
remote: Compressing objects: 100% (445/445), done.
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
Reference this link: https: //blog.csdn.net/drift_axe/article/details/54924359:
git config –global http.postBuffer 524288000
This problem still occurs.
cd ~ / .cocoapods / rest /
You'll see a master
There are problems, we remove the master:
pod repo remove master
pod repo add master https://gitcafe.com/akuandev/Specs.git // github here Specs is not that, and that is too slow
This appears
[!] To setup the master specs repo, please run `pod setup`.
then
git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master
然后
pod repo update
然后
pod repo
出现下面就好了
master
- Type: git (master)
- URL: https://git.coding.net/CocoaPods/Specs.git
- Path: /Users/zhangzhihong/.cocoapods/repos/master
1 repo
然后 cd 到项目app.xcodeproj的同目录路径
cd /Users/..
然后
pod install --verbose --no-repo-update
执行完就好了。
项目老方式打开项目还是有bug:
no such module "..."
其实项目已经可以运行但是:请看下面
官方文档在pod install之后的操作是:
- open App.xcworkspace
到此就结束了,希望可以帮助到需要的人